diff options
author | Tomaz Canabrava <tcanabrava@kde.org> | 2014-01-16 19:28:33 -0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-01-17 06:18:56 +0700 |
commit | f9784d876e70277d92d7607cd7699756e2f64d6d (patch) | |
tree | cbef5aba645c9225ce9d706bfd44359c5fe72aed /qt-ui/profile/divecartesianaxis.h | |
parent | 58aeb6ce4014899e040a3ef8f4483f18fb44b432 (diff) | |
download | subsurface-f9784d876e70277d92d7607cd7699756e2f64d6d.tar.gz |
Made the Axis be aware of Direction.
Now we can create an axis that's topToBottom, BottomToTop, LeftToRight and
RightToLeft.
This was needed for the Temperature Plot, because it should be inverted
(starting on the bottom).
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/profile/divecartesianaxis.h')
-rw-r--r-- | qt-ui/profile/divecartesianaxis.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/qt-ui/profile/divecartesianaxis.h b/qt-ui/profile/divecartesianaxis.h index 6add27548..3975de7e2 100644 --- a/qt-ui/profile/divecartesianaxis.h +++ b/qt-ui/profile/divecartesianaxis.h @@ -13,12 +13,13 @@ class DiveCartesianAxis : public QObject, public QGraphicsLineItem{ Q_PROPERTY(qreal x WRITE setX READ x) Q_PROPERTY(qreal y WRITE setY READ y) public: + enum Orientation{TopToBottom, BottomToTop, LeftToRight, RightToLeft}; DiveCartesianAxis(); virtual ~DiveCartesianAxis(); void setMinimum(double minimum); void setMaximum(double maximum); void setTickInterval(double interval); - void setOrientation(Qt::Orientation orientation); + void setOrientation(Orientation orientation); void setTickSize(qreal size); void updateTicks(); double minimum() const; @@ -34,7 +35,7 @@ signals: protected: virtual QString textForValue(double value); - Qt::Orientation orientation; + Orientation orientation; QList<DiveLineItem*> ticks; QList<DiveTextItem*> labels; double min; |