MoveNodeAction Class Reference

The 'Move Node' Action This action holds the 'Move Node' icon and tooltips, and when it's executed, it will move the selected node around the screen. More...

#include <MoveNode.h>

Inheritance diagram for MoveNodeAction:
AbstractAction

List of all members.

Public Slots

void executePress (QPointF pos)
void executeMove (QPointF pos)
void executeRelease (QPointF pos)

Signals

void addEdge (Node *from, Node *to, QGraphicsSvgItem *cFrom, QGraphicsSvgItem *cTo)

Public Member Functions

 MoveNodeAction (GraphScene *scene, QObject *parent=0)
 ~MoveNodeAction ()

Protected Attributes

NodeItem_movableNode
Node_node
Graph_g
GraphScene_graphScene
QGraphicsView * _view
QPointF _startPos
QGraphicsLineItem * _tmpLine
NodeItem_nodeTo
QGraphicsSvgItem * _svgAt
QGraphicsSvgItem * _svgFrom
QList< QGraphicsItem * > _itemsUnderCursor

Detailed Description

The 'Move Node' Action This action holds the 'Move Node' icon and tooltips, and when it's executed, it will move the selected node around the screen.

Definition at line 42 of file MoveNode.h.


Constructor & Destructor Documentation

MoveNodeAction::MoveNodeAction ( GraphScene scene,
QObject parent = 0 
) [explicit]

Default constructor

Parameters:
parent the Parent QOBject that will hold this action. ( remove it in the future, maybe? )

Definition at line 38 of file MoveNode.cpp.

MoveNodeAction::~MoveNodeAction (  ) 

Default Destructor

Definition at line 52 of file MoveNode.cpp.


Member Function Documentation

void MoveNodeAction::addEdge ( Node from,
Node to,
QGraphicsSvgItem *  cFrom,
QGraphicsSvgItem *  cTo 
) [signal]
void MoveNodeAction::executeMove ( QPointF  pos  )  [virtual, slot]

will be executed when the mouse moves.

Parameters:
pos the current position of the cursor.

Reimplemented from AbstractAction.

Definition at line 92 of file MoveNode.cpp.

void MoveNodeAction::executePress ( QPointF  pos  )  [virtual, slot]

will be executed when the mouse press a button.

Parameters:
pos the position onscreen of the click.

Reimplemented from AbstractAction.

Definition at line 57 of file MoveNode.cpp.

void MoveNodeAction::executeRelease ( QPointF  pos  )  [virtual, slot]

will be executed when the mouse releases a click

Parameters:
pos the position of the cursor.

Reimplemented from AbstractAction.

Definition at line 135 of file MoveNode.cpp.


Member Data Documentation

Graph* MoveNodeAction::_g [protected]

the parent graph of the node.

Definition at line 85 of file MoveNode.h.

pointer to the GraphicsScene with the drawing

Reimplemented from AbstractAction.

Definition at line 87 of file MoveNode.h.

QList<QGraphicsItem*> MoveNodeAction::_itemsUnderCursor [protected]

List of Graphics items at mouse position

Definition at line 108 of file MoveNode.h.

the node that will be moved on screen

Definition at line 78 of file MoveNode.h.

the model of the NodeItem, needs it to modify it's internal value when the move is finished

Definition at line 82 of file MoveNode.h.

pointer to the node that suffered the mouse-release-click

Definition at line 99 of file MoveNode.h.

QPointF MoveNodeAction::_startPos [protected]

the point of the first click while adding a new edge

Definition at line 93 of file MoveNode.h.

QGraphicsSvgItem* MoveNodeAction::_svgAt [protected]

pointer to the SVG Item that suffered the mouse-release-click

Definition at line 102 of file MoveNode.h.

QGraphicsSvgItem* MoveNodeAction::_svgFrom [protected]

pointer to the SVG Item that suffered the mouse-pressed-click

Definition at line 105 of file MoveNode.h.

QGraphicsLineItem* MoveNodeAction::_tmpLine [protected]

a temporary line that will connect the two Nodes.

Definition at line 96 of file MoveNode.h.

QGraphicsView* MoveNodeAction::_view [protected]

the QGraphicsView.

Definition at line 90 of file MoveNode.h.


The documentation for this class was generated from the following files:
Generated on Mon Dec 27 13:13:41 2010 for Gluon by  doxygen 1.6.3