summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--profile-widget/diveprofileitem.cpp21
-rw-r--r--profile-widget/diveprofileitem.h6
-rw-r--r--qt-models/diveplotdatamodel.cpp10
-rw-r--r--qt-models/diveplotdatamodel.h3
4 files changed, 1 insertions, 39 deletions
diff --git a/profile-widget/diveprofileitem.cpp b/profile-widget/diveprofileitem.cpp
index c6df6ee50..138dbbc49 100644
--- a/profile-widget/diveprofileitem.cpp
+++ b/profile-widget/diveprofileitem.cpp
@@ -820,8 +820,7 @@ void DiveGasPressureItem::paint(QPainter *painter, const QStyleOptionGraphicsIte
}
DiveCalculatedCeiling::DiveCalculatedCeiling(ProfileWidget2 *widget) :
- profileWidget(widget),
- is3mIncrement(false)
+ profileWidget(widget)
{
connect(qPrefTechnicalDetails::instance(), &qPrefTechnicalDetails::calcceilingChanged, this, &DiveCalculatedCeiling::setVisible);
setVisible(prefs.calcceiling);
@@ -830,8 +829,6 @@ DiveCalculatedCeiling::DiveCalculatedCeiling(ProfileWidget2 *widget) :
void DiveCalculatedCeiling::modelDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight)
{
- connect(profileWidget, SIGNAL(dateTimeChangedItems()), this, SLOT(recalc()), Qt::UniqueConnection);
-
// We don't have enougth data to calculate things, quit.
if (!shouldCalculateStuff(topLeft, bottomRight))
return;
@@ -914,22 +911,6 @@ void DiveReportedCeiling::modelDataChanged(const QModelIndex &topLeft, const QMo
setBrush(pat);
}
-void DiveCalculatedCeiling::recalc()
-{
-#ifndef SUBSURFACE_MOBILE
- dataModel->calculateDecompression();
-#endif
-}
-
-void DiveCalculatedCeiling::settingsChanged()
-{
- if (dataModel && is3mIncrement != prefs.calcceiling3m) {
- // recalculate that part.
- recalc();
- }
- is3mIncrement = prefs.calcceiling3m;
-}
-
void DiveReportedCeiling::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
{
if (polygon().isEmpty())
diff --git a/profile-widget/diveprofileitem.h b/profile-widget/diveprofileitem.h
index df46b6e12..58e16190b 100644
--- a/profile-widget/diveprofileitem.h
+++ b/profile-widget/diveprofileitem.h
@@ -177,15 +177,9 @@ public:
DiveCalculatedCeiling(ProfileWidget2 *profileWidget);
void modelDataChanged(const QModelIndex &topLeft = QModelIndex(), const QModelIndex &bottomRight = QModelIndex()) override;
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0) override;
- void settingsChanged() override;
-
-public
-slots:
- void recalc();
private:
ProfileWidget2 *profileWidget;
- bool is3mIncrement;
};
class DiveReportedCeiling : public AbstractProfilePolygonItem {
diff --git a/qt-models/diveplotdatamodel.cpp b/qt-models/diveplotdatamodel.cpp
index c964d4ba2..538771331 100644
--- a/qt-models/diveplotdatamodel.cpp
+++ b/qt-models/diveplotdatamodel.cpp
@@ -218,13 +218,3 @@ void DivePlotDataModel::emitDataChanged()
{
emit dataChanged(QModelIndex(), QModelIndex());
}
-
-#ifndef SUBSURFACE_MOBILE
-void DivePlotDataModel::calculateDecompression()
-{
- struct divecomputer *dc = select_dc(&displayed_dive);
- init_decompression(&plot_deco_state, &displayed_dive);
- calculate_deco_information(&plot_deco_state, &(DivePlannerPointsModel::instance()->final_deco_state), &displayed_dive, dc, &pInfo, false);
- dataChanged(index(0, CEILING), index(pInfo.nr - 1, TISSUE_16));
-}
-#endif
diff --git a/qt-models/diveplotdatamodel.h b/qt-models/diveplotdatamodel.h
index cb0d0e3c0..d034a62b3 100644
--- a/qt-models/diveplotdatamodel.h
+++ b/qt-models/diveplotdatamodel.h
@@ -86,9 +86,6 @@ public:
double pn2Max();
double po2Max();
void emitDataChanged();
-#ifndef SUBSURFACE_MOBILE
- void calculateDecompression();
-#endif
private:
struct plot_info pInfo;