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. More... | |
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. More... | |
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 (QXmlQuery &_xml) |
Load from xml. | |
ElementFunction * | function () |
Associated function. | |
void | setActiveConnection (Connection *_conn) |
Sets the active connection. | |
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 (QXmlQuery &_xml) |
void | loadConnection (QXmlQuery &_xml) |
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 80 of file graphicsScene.hh.
VSI::GraphicsScene::~GraphicsScene | ( | ) |
const QList< SceneElement * > & VSI::GraphicsScene::elements | ( | ) | const |
Scene elements.
Bounding rectangle of all scene elements.
Definition at line 348 of file graphicsScene.cc.