Make skeleton of 'create_deco_stop'.

This is a skeleton of 'create_deco_stop' plus a bit of
code cleanup. I'v commented the create_deco_stop so that
the other developers can help me a bit here - since I don't
know too well the internals of subsurface. In the original
GTK code - a new dive was created every time a user changed
something on the dive, I don't know if this will be needed,
I jusst need two things: the correct time of dive calculated
by the app, and the points to put the decompression lines.

The usability of the widget right now is 'ok', nothing to
be proud of, it's ugly as hell too, and the Rules are in
the wrong position ( they are 'inside' the area where
the lines are being drawn, but htis is easily fixable. )

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
This commit is contained in:
Tomaz Canabrava 2013-06-20 18:25:03 -03:00
parent 0539a5fab6
commit 8fcd465a65
2 changed files with 36 additions and 18 deletions

View file

@ -7,12 +7,8 @@
class DiveHandler : public QGraphicsEllipseItem{
public:
DiveHandler();
void setTime(qreal t);
void setDepth(qreal d);
QGraphicsLineItem *from;
QGraphicsLineItem *to;
private:
qreal time;
qreal depth;
};
@ -26,6 +22,7 @@ public:
void setOrientation(Qt::Orientation orientation);
void updateTicks();
qreal valueAt(const QPointF& p);
qreal posAtValue(qreal value);
private:
Qt::Orientation orientation;