mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
More Profile Itens on the new Settings
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
2d96139566
commit
2d3f7f0a90
3 changed files with 23 additions and 30 deletions
|
@ -784,6 +784,8 @@ DiveCalculatedCeiling::DiveCalculatedCeiling(ProfileWidget2 *widget) :
|
|||
profileWidget(widget),
|
||||
is3mIncrement(false)
|
||||
{
|
||||
connect(SettingsObjectWrapper::instance()->techDetails, &TechnicalDetailsSettings::dcceilingChanged, this, &DiveCalculatedCeiling::setVisible);
|
||||
setVisible(prefs.calcceiling);
|
||||
settingsChanged();
|
||||
}
|
||||
|
||||
|
@ -835,7 +837,7 @@ void DiveCalculatedTissue::setVisible(bool visible)
|
|||
|
||||
void DiveCalculatedTissue::settingsChanged()
|
||||
{
|
||||
setVisible(prefs.calcalltissues && prefs.calcceiling);
|
||||
DiveCalculatedCeiling::setVisible(prefs.calcalltissues && prefs.calcceiling);
|
||||
}
|
||||
|
||||
void DiveReportedCeiling::modelDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight)
|
||||
|
@ -879,12 +881,6 @@ void DiveCalculatedCeiling::settingsChanged()
|
|||
recalc();
|
||||
}
|
||||
is3mIncrement = prefs.calcceiling3m;
|
||||
setVisible(prefs.calcceiling);
|
||||
}
|
||||
|
||||
void DiveReportedCeiling::settingsChanged()
|
||||
{
|
||||
setVisible(prefs.dcceiling);
|
||||
}
|
||||
|
||||
void DiveReportedCeiling::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
|
||||
|
@ -956,18 +952,6 @@ PartialPressureGasItem::PartialPressureGasItem() :
|
|||
{
|
||||
}
|
||||
|
||||
void PartialPressureGasItem::settingsChanged()
|
||||
{
|
||||
QSettings s;
|
||||
s.beginGroup("TecDetails");
|
||||
setVisible(s.value(visibilityKey).toBool());
|
||||
}
|
||||
|
||||
void PartialPressureGasItem::setVisibilitySettingsKey(const QString &key)
|
||||
{
|
||||
visibilityKey = key;
|
||||
}
|
||||
|
||||
void PartialPressureGasItem::setColors(const QColor &normal, const QColor &alert)
|
||||
{
|
||||
normalColor = normal;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue