44 #ifndef VSI_ZOOMBUTTON_HH 45 #define VSI_ZOOMBUTTON_HH 48 #include <QGraphicsPixmapItem> 49 #include <QGraphicsLayoutItem> 60 class ZoomButton :
public QObject,
public QGraphicsPixmapItem,
public QGraphicsLayoutItem
63 Q_INTERFACES(QGraphicsLayoutItem)
93 virtual void hoverEnterEvent (QGraphicsSceneHoverEvent *_event);
94 virtual void hoverLeaveEvent (QGraphicsSceneHoverEvent *_event);
97 virtual void mousePressEvent (QGraphicsSceneMouseEvent *_event);
98 virtual void mouseReleaseEvent (QGraphicsSceneMouseEvent *_event);
101 virtual void wheelEvent (QGraphicsSceneWheelEvent *_event);
104 virtual QSizeF sizeHint ( Qt::SizeHint _which,
const QSizeF & _constraint = QSizeF())
const;
void activate(QPointF _pos)
Activates the timer for zoom with center at _pos (will be called if an element is moved above) ...
virtual void setGeometry(const QRectF &_rect)
Sets the geometry.
Scene zoom in/out widget.
ZoomButton(GraphicsScene *_scene, QGraphicsItem *_parent, Type _type)
Constructor.
void deactivate()
Stop the timer.