summaryrefslogtreecommitdiffstats
path: root/qt-ui/diveplanner.h
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tcanabrava@kde.org>2013-06-20 16:48:24 -0300
committerGravatar Tomaz Canabrava <tcanabrava@kde.org>2013-06-20 16:48:24 -0300
commitf129024fc7ad17638cfa9fc7c3948dbc791bd4ca (patch)
tree8cace5e46adc14560edec3df2651867578eb642b /qt-ui/diveplanner.h
parent636550d413093bee27e86b26c1a4ae408e89a8cd (diff)
downloadsubsurface-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.h11
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