diff options
author | Tomaz Canabrava <tcanabrava@kde.org> | 2013-06-10 14:48:31 -0300 |
---|---|---|
committer | Tomaz Canabrava <tcanabrava@kde.org> | 2013-06-10 14:48:31 -0300 |
commit | ad5c18655365d5f8adad9397d7dc0e52d2522fdd (patch) | |
tree | 71e186526a16c1cf507084c05981b990493c4816 /qt-ui/profilegraphics.h | |
parent | 34c6eec9bac57846da042aac546578bdb5dcb1af (diff) | |
download | subsurface-ad5c18655365d5f8adad9397d7dc0e52d2522fdd.tar.gz |
Implemented the movement of the ToolTip by Hand.
Reimplement the movement of the tooltip by hand,
we were adding / removing childs of the tooltip
quite often, wich broke the movement of the item
using the default behavior, aparently Qt uses
a cache of the transformation of the item, assuming
that the bounding box of it will not get modified
while dragging. wich in our particular case, is
a falacy.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Diffstat (limited to 'qt-ui/profilegraphics.h')
-rw-r--r-- | qt-ui/profilegraphics.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/qt-ui/profilegraphics.h b/qt-ui/profilegraphics.h index 8f83deabb..2e4f0d596 100644 --- a/qt-ui/profilegraphics.h +++ b/qt-ui/profilegraphics.h @@ -34,11 +34,11 @@ public: void removeToolTip(const QString& toolTip); void refresh(struct graphics_context* gc, QPointF pos); bool isExpanded(); - void persistPos(); void readPos(); - - void mouseReleaseEvent(QGraphicsSceneMouseEvent* event); + void mousePressEvent(QGraphicsSceneMouseEvent* event); + void mouseReleaseEvent(QGraphicsSceneMouseEvent* event); + bool eventFilter(QObject* , QEvent* ); public Q_SLOTS: void setRect(const QRectF& rect); @@ -49,8 +49,8 @@ private: QGraphicsLineItem *separator; QGraphicsSimpleTextItem *title; Status status; - QRectF rectangle; + bool dragging; }; class EventItem : public QGraphicsPolygonItem |