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>
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 |
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.
MoveNodeAction::MoveNodeAction | ( | GraphScene * | scene, | |
QObject * | parent = 0 | |||
) | [explicit] |
Default constructor
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.
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.
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.
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
pos | the position of the cursor. |
Reimplemented from AbstractAction.
Definition at line 135 of file MoveNode.cpp.
Graph* MoveNodeAction::_g [protected] |
the parent graph of the node.
Definition at line 85 of file MoveNode.h.
GraphScene* MoveNodeAction::_graphScene [protected] |
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.
NodeItem* MoveNodeAction::_movableNode [protected] |
the node that will be moved on screen
Definition at line 78 of file MoveNode.h.
Node* MoveNodeAction::_node [protected] |
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.
NodeItem* MoveNodeAction::_nodeTo [protected] |
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.