Change how the handler handlers itself.

This patch adds a itemChange method, that emits a 'changed'
signal when the handler is moved. I'll use that signal on
the profile to call the correct method.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Tomaz Canabrava 2014-05-23 19:50:09 -03:00 committed by Dirk Hohndel
parent 3a2ceed33d
commit e1dcd8eac3
2 changed files with 8 additions and 18 deletions

View file

@ -139,9 +139,10 @@ public:
DiveHandler();
protected:
void mousePressEvent(QGraphicsSceneMouseEvent *event);
void contextMenuEvent(QGraphicsSceneContextMenuEvent *event);
virtual QVariant itemChange(GraphicsItemChange change, const QVariant &value);
signals:
void moved();
private:
int parentIndex();
public
@ -161,7 +162,6 @@ protected:
virtual void mouseMoveEvent(QMouseEvent *event);
virtual void mousePressEvent(QMouseEvent *event);
virtual void mouseReleaseEvent(QMouseEvent *event);
bool isPointOutOfBoundaries(const QPointF &point);
qreal fromPercent(qreal percent, Qt::Orientation orientation);
public
slots: