|
Developer Documentation
|
#include <Plugin-VSI/scene/graphicsScene.hh>
Public Slots | |
| void | contentChange () |
| handle content changes | |
| void | clearScene (bool _start=false) |
| clear the whole scene (_start = keep start element) | |
Signals | |
| void | contentChanged () |
| Informs about content changes. | |
Public Member Functions | |
| GraphicsScene (VSI::Context *_ctx, ElementFunction *_function=NULL) | |
| Constructor. | |
| ~GraphicsScene () | |
| Destructor. | |
| GraphicsView * | graphicsView () |
| Graphics view of the scene. | |
| qreal | getNewZ () |
| Returns a new Z value that is above all elements. | |
| void | moveElements (qreal _dx, qreal _dy, bool _selected=false) |
| Moves all elements. | |
| void | scaleElements (qreal _delta) |
| Scale all elements with scaling center in the center of the scene. | |
| void | scaleElements (qreal _delta, QPointF _center) |
| Scale all elements with scaling center _canter. | |
| void | addElement (SceneElement *_element) |
| Add the element to the scene. | |
| bool | removeElement (SceneElement *_element) |
| Remove the element from the scene. | |
| void | mouseMove (QPointF _pos) |
| Redirect mouse movement to tools area. | |
| void | mouseRelease (QPointF _pos, QGraphicsItem *_item) |
| Redirect mouse release to tools area. | |
| QRectF | elementsBoundingRect () |
| Bounding rectangle of all scene elements. | |
| ElementArea * | elementArea () const |
| Element area. | |
| const QList< SceneElement * > & | elements () const |
| Scene elements. | |
| QString | generateCode (QString &errors, bool _codeOnly=false) |
| Generate textual script code (_codeOnly = only pure code block) | |
| WayFind * | wayFind () |
| WayFind object. | |
| void | saveToXml (QDomDocument &_doc, QDomElement &_root) |
| Save to xml. | |
| void | loadFromXml (QDomElement &_domElement) |
| Load from xml. | |
| ElementFunction * | function () |
| Associated function. | |
| void | setActiveConnection (Connection *_conn) |
| Sets the active connection. | |
Protected Member Functions | |
| virtual void | drawBackground (QPainter *_painter, const QRectF &_rect) |
| void | dragEnterEvent (QGraphicsSceneDragDropEvent *_event) |
| void | dragLeaveEvent (QGraphicsSceneDragDropEvent *_event) |
| void | dragMoveEvent (QGraphicsSceneDragDropEvent *_event) |
| void | dropEvent (QGraphicsSceneDragDropEvent *_event) |
| void | mousePressEvent (QGraphicsSceneMouseEvent *_event) |
| void | mouseMoveEvent (QGraphicsSceneMouseEvent *_event) |
| void | mouseReleaseEvent (QGraphicsSceneMouseEvent *_event) |
Private Slots | |
| void | updateConnections () |
| void | sceneResized (const QRectF &_rect) |
Private Member Functions | |
| QString | updateConnections (SceneElement *_from, bool _isStart) |
| bool | validMimeData (const QMimeData *) |
| QString | mimeDataElementName (const QMimeData *) |
| QPoint | mimeDataPoint (const QMimeData *) |
| void | loadElement (QDomElement &_domElement, std::vector< QString > &_connections) |
| void | loadConnection (QString &_connections) |
| QList< SceneElement * > | getAllElements () |
Private Attributes | |
| Context * | ctx_ |
| ElementFunction * | function_ |
| GraphicsView * | view_ |
| SceneElement * | dndElement_ |
| SceneTools * | tools_ |
| ElementArea * | elementArea_ |
| QGraphicsRectItem * | selection_ |
| QPointF | selectionStart_ |
| bool | selectionActive_ |
| bool | dontMoveStart_ |
| bool | blockChanges_ |
| Connection * | activeConnection_ |
| qreal | currentZ_ |
| WayFind * | wayFind_ |
Implementation of the Qt graphics scene graph and the represatation of the visual script
Definition at line 79 of file graphicsScene.hh.
| VSI::GraphicsScene::GraphicsScene | ( | VSI::Context * | _ctx, |
| ElementFunction * | _function = NULL |
||
| ) |
Constructor.
Definition at line 84 of file graphicsScene.cc.
| VSI::GraphicsScene::~GraphicsScene | ( | ) |
| void VSI::GraphicsScene::addElement | ( | SceneElement * | _element | ) |
Add the element to the scene.
Definition at line 297 of file graphicsScene.cc.
|
slot |
clear the whole scene (_start = keep start element)
Definition at line 1025 of file graphicsScene.cc.
|
slot |
handle content changes
Definition at line 1098 of file graphicsScene.cc.
|
protected |
Definition at line 173 of file graphicsScene.cc.
|
protected |
Definition at line 197 of file graphicsScene.cc.
|
protected |
Definition at line 214 of file graphicsScene.cc.
|
protectedvirtual |
Definition at line 165 of file graphicsScene.cc.
|
protected |
Definition at line 233 of file graphicsScene.cc.
|
inline |
Element area.
Definition at line 122 of file graphicsScene.hh.
| const QList< SceneElement * > & VSI::GraphicsScene::elements | ( | ) | const |
Scene elements.
Bounding rectangle of all scene elements.
Definition at line 346 of file graphicsScene.cc.
| QRectF VSI::GraphicsScene::elementsBoundingRect | ( | ) |
Bounding rectangle of all scene elements.
Definition at line 335 of file graphicsScene.cc.
|
inline |
Associated function.
Definition at line 140 of file graphicsScene.hh.
| QString VSI::GraphicsScene::generateCode | ( | QString & | errors, |
| bool | _codeOnly = false |
||
| ) |
Generate textual script code (_codeOnly = only pure code block)
Definition at line 456 of file graphicsScene.cc.
|
private |
Definition at line 437 of file graphicsScene.cc.
| qreal VSI::GraphicsScene::getNewZ | ( | ) |
Returns a new Z value that is above all elements.
Definition at line 250 of file graphicsScene.cc.
|
inline |
Graphics view of the scene.
Definition at line 92 of file graphicsScene.hh.
|
private |
Definition at line 953 of file graphicsScene.cc.
|
private |
Definition at line 937 of file graphicsScene.cc.
| void VSI::GraphicsScene::loadFromXml | ( | QDomElement & | _domElement | ) |
Load from xml.
Definition at line 872 of file graphicsScene.cc.
|
private |
Definition at line 802 of file graphicsScene.cc.
|
private |
Definition at line 817 of file graphicsScene.cc.
| void VSI::GraphicsScene::mouseMove | ( | QPointF | _pos | ) |
Redirect mouse movement to tools area.
Definition at line 320 of file graphicsScene.cc.
|
protected |
Definition at line 381 of file graphicsScene.cc.
|
protected |
Definition at line 354 of file graphicsScene.cc.
| void VSI::GraphicsScene::mouseRelease | ( | QPointF | _pos, |
| QGraphicsItem * | _item | ||
| ) |
Redirect mouse release to tools area.
Definition at line 328 of file graphicsScene.cc.
|
protected |
Definition at line 399 of file graphicsScene.cc.
| void VSI::GraphicsScene::moveElements | ( | qreal | _dx, |
| qreal | _dy, | ||
| bool | _selected = false |
||
| ) |
Moves all elements.
Definition at line 259 of file graphicsScene.cc.
| bool VSI::GraphicsScene::removeElement | ( | SceneElement * | _element | ) |
Remove the element from the scene.
Definition at line 307 of file graphicsScene.cc.
| void VSI::GraphicsScene::saveToXml | ( | QDomDocument & | _doc, |
| QDomElement & | _root | ||
| ) |
Save to xml.
Definition at line 840 of file graphicsScene.cc.
| void VSI::GraphicsScene::scaleElements | ( | qreal | _delta | ) |
Scale all elements with scaling center in the center of the scene.
Definition at line 278 of file graphicsScene.cc.
| void VSI::GraphicsScene::scaleElements | ( | qreal | _delta, |
| QPointF | _center | ||
| ) |
Scale all elements with scaling center _canter.
Definition at line 288 of file graphicsScene.cc.
|
privateslot |
Definition at line 1109 of file graphicsScene.cc.
|
inline |
Sets the active connection.
Definition at line 143 of file graphicsScene.hh.
|
privateslot |
Definition at line 1071 of file graphicsScene.cc.
|
private |
Definition at line 750 of file graphicsScene.cc.
|
private |
Definition at line 794 of file graphicsScene.cc.
|
inline |
WayFind object.
Definition at line 131 of file graphicsScene.hh.
|
private |
Definition at line 220 of file graphicsScene.hh.
|
private |
Definition at line 218 of file graphicsScene.hh.
|
private |
Definition at line 204 of file graphicsScene.hh.
|
private |
Definition at line 222 of file graphicsScene.hh.
|
private |
Definition at line 208 of file graphicsScene.hh.
|
private |
Definition at line 217 of file graphicsScene.hh.
|
private |
Definition at line 211 of file graphicsScene.hh.
|
private |
Definition at line 205 of file graphicsScene.hh.
|
private |
Definition at line 213 of file graphicsScene.hh.
|
private |
Definition at line 215 of file graphicsScene.hh.
|
private |
Definition at line 214 of file graphicsScene.hh.
|
private |
Definition at line 209 of file graphicsScene.hh.
|
private |
Definition at line 206 of file graphicsScene.hh.
|
private |
Definition at line 224 of file graphicsScene.hh.