summaryrefslogtreecommitdiffstats
path: root/qt-ui/profile/diveprofileitem.h
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tcanabrava@kde.org>2014-01-21 18:16:19 -0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-01-21 14:25:34 -0800
commitbd960368922f16bc96d114c684cc381754c58a6a (patch)
tree7d96acab8b7b70d5b20093bd7237d4297397bb12 /qt-ui/profile/diveprofileitem.h
parentb08da94007d7a2e71f932bff67750051c1ad5d65 (diff)
downloadsubsurface-bd960368922f16bc96d114c684cc381754c58a6a.tar.gz
Better use of the preferences changed signal.
When the preferences changed signal is fired, the items that can change their visual based on the preferences now have to reimplement the preferencesChanged method, so they know if they need to be replotted on screen. I already implemented that for two of the items ( ProfileDepth and Ceiling ) but others might need that too. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/profile/diveprofileitem.h')
-rw-r--r--qt-ui/profile/diveprofileitem.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/qt-ui/profile/diveprofileitem.h b/qt-ui/profile/diveprofileitem.h
index 9b737db5e..57b1e70e8 100644
--- a/qt-ui/profile/diveprofileitem.h
+++ b/qt-ui/profile/diveprofileitem.h
@@ -38,6 +38,7 @@ public:
void setVerticalDataColumn(int column);
virtual void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget = 0) = 0;
public slots:
+ virtual void preferencesChanged();
virtual void modelDataChanged();
protected:
DiveCartesianAxis *hAxis;
@@ -54,7 +55,11 @@ class DiveProfileItem : public AbstractProfilePolygonItem{
public:
virtual void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget = 0);
virtual void modelDataChanged();
+ virtual void preferencesChanged();
void plot_depth_sample(struct plot_data *entry,QFlags<Qt::AlignmentFlag> flags,const QColor& color);
+private:
+ unsigned int show_reported_ceiling;
+ unsigned int reported_ceiling_in_red;
};
class DiveTemperatureItem : public AbstractProfilePolygonItem{
@@ -93,5 +98,6 @@ class DiveReportedCeiling : public AbstractProfilePolygonItem{
public:
virtual void modelDataChanged();
virtual void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget = 0);
+ virtual void preferencesChanged();
};
#endif \ No newline at end of file