diff options
author | jan Iversen <jani@apache.org> | 2018-08-05 10:57:24 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-08-12 07:36:10 -0700 |
commit | cb2dc7515b3b14eed268ff580b30759d2c2272a5 (patch) | |
tree | 1c5c2e29308890e1ec9627d46d3f1065a7eda101 /profile-widget | |
parent | b98ba9ba94cb4d7293daa80139c6bd7ecda882fe (diff) | |
download | subsurface-cb2dc7515b3b14eed268ff580b30759d2c2272a5.tar.gz |
core: activate qPrefTechnicalDetails
remove TechnicalDetails from SettingsObjectWrapper and reference qPrefTechnicalDetails
update files using SettingsObjectWrapper/TechnicalDetails to use qPrefTechnicalDetails
this activated qPrefTechnicalDetails and removed the similar class from
SettingsObjectWrapper.
Signed-off-by: Jan Iversen <jani@apache.org>
Diffstat (limited to 'profile-widget')
-rw-r--r-- | profile-widget/diveprofileitem.cpp | 22 | ||||
-rw-r--r-- | profile-widget/profilewidget2.cpp | 12 | ||||
-rw-r--r-- | profile-widget/ruleritem.cpp | 2 |
3 files changed, 18 insertions, 18 deletions
diff --git a/profile-widget/diveprofileitem.cpp b/profile-widget/diveprofileitem.cpp index eca2637cf..2c17b67ad 100644 --- a/profile-widget/diveprofileitem.cpp +++ b/profile-widget/diveprofileitem.cpp @@ -112,8 +112,8 @@ void AbstractProfilePolygonItem::modelDataChanged(const QModelIndex&, const QMod DiveProfileItem::DiveProfileItem() : show_reported_ceiling(0), reported_ceiling_in_red(0) { - connect(SettingsObjectWrapper::instance()->techDetails, &TechnicalDetailsSettings::dcceilingChanged, this, &DiveProfileItem::settingsToggled); - connect(SettingsObjectWrapper::instance()->techDetails, &TechnicalDetailsSettings::redceilingChanged, this, &DiveProfileItem::settingsToggled); + connect(SettingsObjectWrapper::instance()->techDetails, &qPrefTechnicalDetails::dcceiling_changed, this, &DiveProfileItem::settingsToggled); + connect(SettingsObjectWrapper::instance()->techDetails, &qPrefTechnicalDetails::redceiling_changed, this, &DiveProfileItem::settingsToggled); } void DiveProfileItem::settingsToggled(bool) @@ -267,7 +267,7 @@ DiveHeartrateItem::DiveHeartrateItem() pen.setCosmetic(true); pen.setWidth(1); setPen(pen); - connect(SettingsObjectWrapper::instance()->techDetails, &TechnicalDetailsSettings::hrgraphChanged, this, &DiveHeartrateItem::setVisible); + connect(SettingsObjectWrapper::instance()->techDetails, &qPrefTechnicalDetails::hrgraph_changed, this, &DiveHeartrateItem::setVisible); } void DiveHeartrateItem::modelDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight) @@ -348,7 +348,7 @@ void DiveHeartrateItem::paint(QPainter *painter, const QStyleOptionGraphicsItem* DivePercentageItem::DivePercentageItem(int i) { - connect(SettingsObjectWrapper::instance()->techDetails, &TechnicalDetailsSettings::percentageGraphChanged, this, &DivePercentageItem::setVisible); + connect(SettingsObjectWrapper::instance()->techDetails, &qPrefTechnicalDetails::percentagegraph_changed, this, &DivePercentageItem::setVisible); tissueIndex = i; settingsChanged(); } @@ -465,7 +465,7 @@ void DiveAmbPressureItem::paint(QPainter *painter, const QStyleOptionGraphicsIte painter->setPen(pen()); painter->drawPolyline(polygon()); painter->restore(); - connect(SettingsObjectWrapper::instance()->techDetails, &TechnicalDetailsSettings::percentageGraphChanged, this, &DiveAmbPressureItem::setVisible); + connect(SettingsObjectWrapper::instance()->techDetails, &qPrefTechnicalDetails::percentagegraph_changed, this, &DiveAmbPressureItem::setVisible); } DiveGFLineItem::DiveGFLineItem() @@ -510,7 +510,7 @@ void DiveGFLineItem::paint(QPainter *painter, const QStyleOptionGraphicsItem*, Q painter->setPen(pen()); painter->drawPolyline(polygon()); painter->restore(); - connect(SettingsObjectWrapper::instance()->techDetails, &TechnicalDetailsSettings::percentageGraphChanged, this, &DiveAmbPressureItem::setVisible); + connect(SettingsObjectWrapper::instance()->techDetails, &qPrefTechnicalDetails::percentagegraph_changed, this, &DiveAmbPressureItem::setVisible); } DiveTemperatureItem::DiveTemperatureItem() @@ -635,7 +635,7 @@ void DiveMeanDepthItem::paint(QPainter *painter, const QStyleOptionGraphicsItem* painter->setPen(pen()); painter->drawPolyline(polygon()); painter->restore(); - connect(SettingsObjectWrapper::instance()->techDetails, &TechnicalDetailsSettings::showAverageDepthChanged, this, &DiveAmbPressureItem::setVisible); + connect(SettingsObjectWrapper::instance()->techDetails, &qPrefTechnicalDetails::show_average_depth_changed, this, &DiveAmbPressureItem::setVisible); } void DiveMeanDepthItem::createTextItem() { @@ -821,7 +821,7 @@ DiveCalculatedCeiling::DiveCalculatedCeiling(ProfileWidget2 *widget) : profileWidget(widget), is3mIncrement(false) { - connect(SettingsObjectWrapper::instance()->techDetails, &TechnicalDetailsSettings::calcceilingChanged, this, &DiveCalculatedCeiling::setVisible); + connect(SettingsObjectWrapper::instance()->techDetails, &qPrefTechnicalDetails::calcceiling_changed, this, &DiveCalculatedCeiling::setVisible); setVisible(prefs.calcceiling); settingsChanged(); } @@ -862,8 +862,8 @@ void DiveCalculatedCeiling::paint(QPainter *painter, const QStyleOptionGraphicsI DiveCalculatedTissue::DiveCalculatedTissue(ProfileWidget2 *widget) : DiveCalculatedCeiling(widget) { settingsChanged(); - connect(SettingsObjectWrapper::instance()->techDetails, &TechnicalDetailsSettings::calcalltissuesChanged, this, &DiveCalculatedTissue::setVisible); - connect(SettingsObjectWrapper::instance()->techDetails, &TechnicalDetailsSettings::calcceilingChanged, this, &DiveCalculatedTissue::setVisible); + connect(SettingsObjectWrapper::instance()->techDetails, &qPrefTechnicalDetails::calcalltissues_changed, this, &DiveCalculatedTissue::setVisible); + connect(SettingsObjectWrapper::instance()->techDetails, &qPrefTechnicalDetails::calcceiling_changed, this, &DiveCalculatedTissue::setVisible); } void DiveCalculatedTissue::setVisible(bool) @@ -878,7 +878,7 @@ void DiveCalculatedTissue::settingsChanged() DiveReportedCeiling::DiveReportedCeiling() { - connect(SettingsObjectWrapper::instance()->techDetails, &TechnicalDetailsSettings::dcceilingChanged, this, &DiveReportedCeiling::setVisible); + connect(SettingsObjectWrapper::instance()->techDetails, &qPrefTechnicalDetails::dcceiling_changed, this, &DiveReportedCeiling::setVisible); setVisible(prefs.dcceiling); settingsChanged(); } diff --git a/profile-widget/profilewidget2.cpp b/profile-widget/profilewidget2.cpp index 942996df1..7c70b15f9 100644 --- a/profile-widget/profilewidget2.cpp +++ b/profile-widget/profilewidget2.cpp @@ -347,11 +347,11 @@ void ProfileWidget2::setupItemOnScene() //WARNING: The old code was broken, I'm not sure what should trigger the visibility of those graphs, since the old code didn't triggered them // because it was using a wrong settings. - connect(SettingsObjectWrapper::instance()->techDetails, &TechnicalDetailsSettings::showCCRSetpointChanged, o2SetpointGasItem, &PartialPressureGasItem::setVisible); - connect(SettingsObjectWrapper::instance()->techDetails, &TechnicalDetailsSettings::showSCROCpO2Changed, ocpo2GasItem, &PartialPressureGasItem::setVisible); - connect(SettingsObjectWrapper::instance()->techDetails, &TechnicalDetailsSettings::showCCRSensorsChanged, ccrsensor1GasItem, &PartialPressureGasItem::setVisible); - connect(SettingsObjectWrapper::instance()->techDetails, &TechnicalDetailsSettings::showCCRSensorsChanged, ccrsensor2GasItem, &PartialPressureGasItem::setVisible); - connect(SettingsObjectWrapper::instance()->techDetails, &TechnicalDetailsSettings::showCCRSensorsChanged, ccrsensor3GasItem, &PartialPressureGasItem::setVisible); + connect(SettingsObjectWrapper::instance()->techDetails, &qPrefTechnicalDetails::show_ccr_setpoint_changed, o2SetpointGasItem, &PartialPressureGasItem::setVisible); + connect(SettingsObjectWrapper::instance()->techDetails, &qPrefTechnicalDetails::show_scr_ocpo2_changed, ocpo2GasItem, &PartialPressureGasItem::setVisible); + connect(SettingsObjectWrapper::instance()->techDetails, &qPrefTechnicalDetails::show_ccr_sensors_changed, ccrsensor1GasItem, &PartialPressureGasItem::setVisible); + connect(SettingsObjectWrapper::instance()->techDetails, &qPrefTechnicalDetails::show_ccr_sensors_changed, ccrsensor2GasItem, &PartialPressureGasItem::setVisible); + connect(SettingsObjectWrapper::instance()->techDetails, &qPrefTechnicalDetails::show_ccr_sensors_changed, ccrsensor3GasItem, &PartialPressureGasItem::setVisible); heartBeatAxis->setTextVisible(true); heartBeatAxis->setLinesVisible(true); @@ -825,7 +825,7 @@ void ProfileWidget2::plotDive(struct dive *d, bool force, bool doClearPictures) // so if we are calculation TTS / NDL then let's force that off. #ifndef SUBSURFACE_MOBILE if (measureDuration.elapsed() > 1000 && prefs.calcndltts) { - SettingsObjectWrapper::instance()->techDetails->setCalcndltts(false); + SettingsObjectWrapper::instance()->techDetails->set_calcndltts(false); report_error(qPrintable(tr("Show NDL / TTS was disabled because of excessive processing time"))); } #endif diff --git a/profile-widget/ruleritem.cpp b/profile-widget/ruleritem.cpp index 94b863800..4c49bdc9e 100644 --- a/profile-widget/ruleritem.cpp +++ b/profile-widget/ruleritem.cpp @@ -83,7 +83,7 @@ RulerItem2::RulerItem2() : source(new RulerNodeItem2()), textItemBack->setFlag(QGraphicsItem::ItemIgnoresTransformations); setPen(QPen(QColor(Qt::black), 0.0)); #ifndef SUBSURFACE_MOBILE - connect(SettingsObjectWrapper::instance()->techDetails, &TechnicalDetailsSettings::rulerGraphChanged, this, &RulerItem2::settingsChanged); + connect(SettingsObjectWrapper::instance()->techDetails, &qPrefTechnicalDetails::rulergraph_changed, this, &RulerItem2::settingsChanged); #endif } |