Developer Documentation
VSI::GraphicsScene Class Reference

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

Inheritance diagram for VSI::GraphicsScene:

Public Slots

void contentChange ()
 handle content changes
void clearScene (bool _start=false)
 clear the whole scene (_start = keep start element)


void contentChanged ()
 Informs about content changes.

Public Member Functions

 GraphicsScene (VSI::Context *_ctx, ElementFunction *_function=NULL)
 ~GraphicsScene ()
 Destructor. More...
GraphicsViewgraphicsView ()
 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.
ElementAreaelementArea () 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)
WayFindwayFind ()
 WayFind object.
void saveToXml (QDomDocument &_doc, QDomElement &_root)
 Save to xml.
void loadFromXml (QXmlQuery &_xml)
 Load from xml.
ElementFunctionfunction ()
 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 (QXmlQuery &_xml)
void loadConnection (QXmlQuery &_xml)
QList< SceneElement * > getAllElements ()

Private Attributes

QGraphicsRectItem * selection_
QPointF selectionStart_
bool selectionActive_
bool dontMoveStart_
bool blockChanges_
qreal currentZ_

Detailed Description

Implementation of the Qt graphics scene graph and the represatation of the visual script

Definition at line 86 of file graphicsScene.hh.

Constructor & Destructor Documentation

VSI::GraphicsScene::~GraphicsScene ( )



Definition at line 161 of file

Member Function Documentation

const QList< SceneElement * > & VSI::GraphicsScene::elements ( ) const

Scene elements.

Bounding rectangle of all scene elements.

Definition at line 354 of file

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