Developer Documentation
VSI::ZoomButton Class Reference

Scene zoom in/out widget. More...

#include <Plugin-VSI/scene/zoomButton.hh>

Inheritance diagram for VSI::ZoomButton:

Public Types

enum  Type { In , Out }
 Zoom type. More...
 

Public Member Functions

 ZoomButton (GraphicsScene *_scene, QGraphicsItem *_parent, Type _type)
 Constructor. More...
 
 ~ZoomButton ()
 Destructor. More...
 
void activate (QPointF _pos)
 Activates the timer for zoom with center at _pos (will be called if an element is moved above) More...
 
void deactivate ()
 Stop the timer. More...
 
virtual void setGeometry (const QRectF &_rect)
 Sets the geometry. More...
 

Protected Member Functions

virtual void hoverEnterEvent (QGraphicsSceneHoverEvent *_event)
 
virtual void hoverLeaveEvent (QGraphicsSceneHoverEvent *_event)
 
virtual void mousePressEvent (QGraphicsSceneMouseEvent *_event)
 
virtual void mouseReleaseEvent (QGraphicsSceneMouseEvent *_event)
 
virtual void wheelEvent (QGraphicsSceneWheelEvent *_event)
 
virtual QSizeF sizeHint (Qt::SizeHint _which, const QSizeF &_constraint=QSizeF()) const
 

Private Slots

void timeout ()
 

Private Attributes

GraphicsScenescene_
 
Type type_
 
QTimer timer_
 
QPointF pos_
 

Detailed Description

Scene zoom in/out widget.

Definition at line 60 of file zoomButton.hh.

Member Enumeration Documentation

◆ Type

Zoom type.

Definition at line 68 of file zoomButton.hh.

Constructor & Destructor Documentation

◆ ZoomButton()

VSI::ZoomButton::ZoomButton ( GraphicsScene _scene,
QGraphicsItem *  _parent,
Type  _type 
)

Constructor.

Definition at line 64 of file zoomButton.cc.

◆ ~ZoomButton()

VSI::ZoomButton::~ZoomButton ( )

Destructor.

Definition at line 91 of file zoomButton.cc.

Member Function Documentation

◆ activate()

void VSI::ZoomButton::activate ( QPointF  _pos)

Activates the timer for zoom with center at _pos (will be called if an element is moved above)

Definition at line 180 of file zoomButton.cc.

◆ deactivate()

void VSI::ZoomButton::deactivate ( )

Stop the timer.

Definition at line 191 of file zoomButton.cc.

◆ hoverEnterEvent()

void VSI::ZoomButton::hoverEnterEvent ( QGraphicsSceneHoverEvent *  _event)
protectedvirtual

Definition at line 98 of file zoomButton.cc.

◆ hoverLeaveEvent()

void VSI::ZoomButton::hoverLeaveEvent ( QGraphicsSceneHoverEvent *  _event)
protectedvirtual

Definition at line 106 of file zoomButton.cc.

◆ mousePressEvent()

void VSI::ZoomButton::mousePressEvent ( QGraphicsSceneMouseEvent *  _event)
protectedvirtual

Definition at line 114 of file zoomButton.cc.

◆ mouseReleaseEvent()

void VSI::ZoomButton::mouseReleaseEvent ( QGraphicsSceneMouseEvent *  _event)
protectedvirtual

Definition at line 138 of file zoomButton.cc.

◆ setGeometry()

void VSI::ZoomButton::setGeometry ( const QRectF &  _rect)
virtual

Sets the geometry.

Definition at line 200 of file zoomButton.cc.

◆ sizeHint()

QSizeF VSI::ZoomButton::sizeHint ( Qt::SizeHint  _which,
const QSizeF &  _constraint = QSizeF() 
) const
protectedvirtual

Definition at line 209 of file zoomButton.cc.

◆ timeout

void VSI::ZoomButton::timeout ( )
privateslot

Definition at line 164 of file zoomButton.cc.

◆ wheelEvent()

void VSI::ZoomButton::wheelEvent ( QGraphicsSceneWheelEvent *  _event)
protectedvirtual

Definition at line 147 of file zoomButton.cc.

Member Data Documentation

◆ pos_

QPointF VSI::ZoomButton::pos_
private

Definition at line 116 of file zoomButton.hh.

◆ scene_

GraphicsScene* VSI::ZoomButton::scene_
private

Definition at line 110 of file zoomButton.hh.

◆ timer_

QTimer VSI::ZoomButton::timer_
private

Definition at line 114 of file zoomButton.hh.

◆ type_

Type VSI::ZoomButton::type_
private

Definition at line 112 of file zoomButton.hh.


The documentation for this class was generated from the following files: