Make the plot and handle movement stick to an 'Grid'

Make the plot and the handle stick to a grid, the
grid is defined by the integers in the rulers, so
a time of 10,2 is converted to 10, and will put the
point at 10.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
This commit is contained in:
Tomaz Canabrava 2013-06-21 16:28:17 -03:00
parent c9159da43a
commit 01d1a49d94
2 changed files with 25 additions and 16 deletions

View file

@ -51,11 +51,11 @@ protected:
void clear_generated_deco();
void create_deco_stop();
bool isPointOutOfBoundaries(QPointF point);
bool isPointOutOfBoundaries(const QPointF& point);
private:
void moveActiveHandler(QPointF pos);
void moveActiveHandler(const QPointF& pos);
QList<QGraphicsLineItem*> lines;
QList<DiveHandler *> handles;
QGraphicsLineItem *verticalLine;