diff options
author | Tomaz Canabrava <tcanabrava@kde.org> | 2013-06-20 16:48:24 -0300 |
---|---|---|
committer | Tomaz Canabrava <tcanabrava@kde.org> | 2013-06-20 16:48:24 -0300 |
commit | f129024fc7ad17638cfa9fc7c3948dbc791bd4ca (patch) | |
tree | 8cace5e46adc14560edec3df2651867578eb642b /qt-ui/diveplanner.h | |
parent | 636550d413093bee27e86b26c1a4ae408e89a8cd (diff) | |
download | subsurface-f129024fc7ad17638cfa9fc7c3948dbc791bd4ca.tar.gz |
Added a 2 Ruler Items, Time and Depth.
The ruler items are needed so I can get the correct
coordinates of the planned dive. This is a very
rudimentary ruler and it needs a bit of love, but
it already gives me something to work on.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Diffstat (limited to 'qt-ui/diveplanner.h')
-rw-r--r-- | qt-ui/diveplanner.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/qt-ui/diveplanner.h b/qt-ui/diveplanner.h index 13218e4ae..5557a7b56 100644 --- a/qt-ui/diveplanner.h +++ b/qt-ui/diveplanner.h @@ -12,22 +12,21 @@ public: QGraphicsLineItem *to; }; -class Ruler : public QGraphicsItem{ +class Ruler : public QGraphicsLineItem{ public: Ruler(); void setMinimum(double minimum); void setMaximum(double maximum); void setTickInterval(double interval); void setOrientation(Qt::Orientation orientation); - void setLine(qreal x1, qreal y1, qreal x2, qreal y2); + void updateTicks(); private: - void updateTicks(); Qt::Orientation orientation; QList<QGraphicsLineItem*> ticks; double min; double max; - + double interval; double posBegin; double posEnd; }; @@ -56,5 +55,9 @@ private: QGraphicsLineItem *verticalLine; QGraphicsLineItem *horizontalLine; DiveHandler *activeDraggedHandler; + + Ruler *timeLine; + Ruler *depthLine; + }; #endif |