Developer Documentation
VSI::Arrow Class Reference

Scene movement widget. More...

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

Inheritance diagram for VSI::Arrow:

Public Types

enum  Direction {
  North , South , East , West ,
  Center
}
 Movement direction. More...
 

Public Member Functions

 Arrow (GraphicsScene *_scene, QGraphicsItem *_parent, Direction _dir)
 Constructor. More...
 
 ~Arrow ()
 Destructor. More...
 
void activate ()
 Activates the timer for movement (will be called if an element is moved above) More...
 
void reset ()
 Stop the timer. More...
 
void setHighlight (bool _highlight)
 Highlights the widget if the scene can be moved in this direction. 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_
 
Direction dir_
 
QTimer timer_
 
int interval_
 
bool moveSelected_
 
bool highlight_
 

Detailed Description

Scene movement widget.

Definition at line 62 of file arrow.hh.

Member Enumeration Documentation

◆ Direction

Movement direction.

Definition at line 70 of file arrow.hh.

Constructor & Destructor Documentation

◆ Arrow()

VSI::Arrow::Arrow ( GraphicsScene _scene,
QGraphicsItem *  _parent,
Direction  _dir 
)

Constructor.

Definition at line 66 of file arrow.cc.

◆ ~Arrow()

VSI::Arrow::~Arrow ( )

Destructor.

Definition at line 102 of file arrow.cc.

Member Function Documentation

◆ activate()

void VSI::Arrow::activate ( )

Activates the timer for movement (will be called if an element is moved above)

Definition at line 239 of file arrow.cc.

◆ hoverEnterEvent()

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

Definition at line 109 of file arrow.cc.

◆ hoverLeaveEvent()

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

Definition at line 117 of file arrow.cc.

◆ mousePressEvent()

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

Definition at line 125 of file arrow.cc.

◆ mouseReleaseEvent()

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

Definition at line 164 of file arrow.cc.

◆ reset()

void VSI::Arrow::reset ( void  )

Stop the timer.

Definition at line 250 of file arrow.cc.

◆ setGeometry()

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

Sets the geometry.

Definition at line 259 of file arrow.cc.

◆ setHighlight()

void VSI::Arrow::setHighlight ( bool  _highlight)

Highlights the widget if the scene can be moved in this direction.

Definition at line 287 of file arrow.cc.

◆ sizeHint()

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

Definition at line 268 of file arrow.cc.

◆ timeout

void VSI::Arrow::timeout ( )
privateslot

Definition at line 200 of file arrow.cc.

◆ wheelEvent()

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

Definition at line 173 of file arrow.cc.

Member Data Documentation

◆ dir_

Direction VSI::Arrow::dir_
private

Definition at line 121 of file arrow.hh.

◆ highlight_

bool VSI::Arrow::highlight_
private

Definition at line 129 of file arrow.hh.

◆ interval_

int VSI::Arrow::interval_
private

Definition at line 125 of file arrow.hh.

◆ moveSelected_

bool VSI::Arrow::moveSelected_
private

Definition at line 127 of file arrow.hh.

◆ scene_

GraphicsScene* VSI::Arrow::scene_
private

Definition at line 119 of file arrow.hh.

◆ timer_

QTimer VSI::Arrow::timer_
private

Definition at line 123 of file arrow.hh.


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