Make it possible to drag a handle between handlers

Make it possible to drag a handle between handlers,
this way the configuration of the dive is more acurate
and easyer to make. I'v discovered a problem where it's
a bit hard to 'grab' the handler, investigating it now.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
This commit is contained in:
Tomaz Canabrava 2013-07-04 10:29:28 -03:00
parent 603d2f5cb3
commit 20ec98f2a5
2 changed files with 26 additions and 33 deletions

View file

@ -73,7 +73,6 @@ protected:
bool isPointOutOfBoundaries(const QPointF& point);
void deleteTemporaryDivePlan(struct divedatapoint* dp);
qreal fromPercent(qreal percent, Qt::Orientation orientation);
private slots:
void increaseTime();
void increaseDepth();
@ -96,8 +95,9 @@ private:
/* This is the handler that's being dragged. */
DiveHandler *activeDraggedHandler;
// helper to save the positions where the drag-handler is valid.
QPointF lastValidPos;
// When we start to move the handler, this pos is saved.
// so we can revert it later.
QPointF originalHandlerPos;
/* this is the background of the dive, the blue-gradient. */
QGraphicsPolygonItem *diveBg;