Developer Documentation
|
#include <Plugin-VSI/scene/sceneElement.hh>
Public Member Functions | |
SceneElement (GraphicsScene *_scene, Element *_element) | |
Constructor. More... | |
~SceneElement () | |
Destructor. More... | |
void | paint (QPainter *_painter, const QStyleOptionGraphicsItem *_option, QWidget *_widget=0) |
Background painting. More... | |
Element * | element () const |
Context VSI::Element. More... | |
QVector< ElementInput * > | inputs () |
Inputs. More... | |
QVector< ElementOutput * > | outputs () |
Outputs. More... | |
QVector< ElementFunction * > | functions () |
Functions. More... | |
ElementInput * | dataIn () |
Scene input. More... | |
ElementOutput * | dataOut () |
Scene output. More... | |
void | resetCodeGeneration () |
Reset code block for code generation. More... | |
void | replaceCodeBlock (const QString &_name, const QString &_id, const QString &_value) |
Replace block with name _name and id _id with _value. More... | |
QString | variableId () |
Unique variable name for code generation. More... | |
int | id () |
Unique id for identification. More... | |
QString | code () |
Code block. More... | |
bool | isBefore (SceneElement *_e) |
Will this element be executed before _e bacause of its connections? More... | |
bool | isAfter (SceneElement *_e) |
Will this element be executed after _e bacause of its connections? More... | |
void | saveToXml (QDomDocument &_doc, QDomElement &_root) |
Save to xml. More... | |
void | loadFromXml (QDomElement &_domElement, std::vector< QString > &_connections) |
Load one scene Element from xml. More... | |
GraphicsScene * | graphicsScene () |
Scene. More... | |
Protected Member Functions | |
void | mousePressEvent (QGraphicsSceneMouseEvent *_event) |
void | mouseMoveEvent (QGraphicsSceneMouseEvent *_event) |
void | mouseReleaseEvent (QGraphicsSceneMouseEvent *_event) |
void | mouseDoubleClickEvent (QGraphicsSceneMouseEvent *_event) |
Double click occured. We can't use mouseDoubleClickEvent because we won't get one for the ConecctionPoints. More... | |
void | moveEvent (QGraphicsSceneMoveEvent *_event) |
Private Slots | |
void | showInputConfig () |
Private Member Functions | |
void | invalidateConnections () |
Private Attributes | |
GraphicsScene * | scene_ |
Element * | element_ |
QVector< ElementInput * > | inputs_ |
QVector< ElementOutput * > | outputs_ |
ElementInput * | dataIn_ |
ElementOutput * | dataOut_ |
QVector< ElementFunction * > | functions_ |
QVector< ElementInput * > | configInputs_ |
QString | code_ |
int | id_ |
Text * | name_ |
Text * | elementName_ |
QGraphicsLinearLayout * | nameLayout_ |
Widget that represents an context element in the scene
Definition at line 72 of file sceneElement.hh.
VSI::SceneElement::SceneElement | ( | GraphicsScene * | _scene, |
Element * | _element | ||
) |
Constructor.
Definition at line 97 of file sceneElement.cc.
VSI::SceneElement::~SceneElement | ( | ) |
Destructor.
Definition at line 339 of file sceneElement.cc.
|
inline |
Code block.
Definition at line 117 of file sceneElement.hh.
|
inline |
Scene input.
Definition at line 99 of file sceneElement.hh.
|
inline |
Scene output.
Definition at line 102 of file sceneElement.hh.
|
inline |
Definition at line 87 of file sceneElement.hh.
|
inline |
Functions.
Definition at line 96 of file sceneElement.hh.
|
inline |
Scene.
Definition at line 138 of file sceneElement.hh.
|
inline |
Unique id for identification.
Definition at line 114 of file sceneElement.hh.
|
inline |
Inputs.
Definition at line 90 of file sceneElement.hh.
|
private |
Definition at line 673 of file sceneElement.cc.
bool VSI::SceneElement::isAfter | ( | SceneElement * | _e | ) |
Will this element be executed after _e bacause of its connections?
Definition at line 643 of file sceneElement.cc.
bool VSI::SceneElement::isBefore | ( | SceneElement * | _e | ) |
Will this element be executed before _e bacause of its connections?
Definition at line 613 of file sceneElement.cc.
void VSI::SceneElement::loadFromXml | ( | QDomElement & | _domElement, |
std::vector< QString > & | _connections | ||
) |
Load one scene Element from xml.
Load from xml.
Load one scene element from an xml dom.
_domElement | The element that should be loaded |
_connections | Info about the connections returned for this element. The function appends the information to the vector |
Definition at line 750 of file sceneElement.cc.
|
protected |
Double click occured. We can't use mouseDoubleClickEvent because we won't get one for the ConecctionPoints.
Definition at line 470 of file sceneElement.cc.
|
protected |
Definition at line 453 of file sceneElement.cc.
|
protected |
Definition at line 444 of file sceneElement.cc.
|
protected |
Definition at line 461 of file sceneElement.cc.
|
protected |
Definition at line 532 of file sceneElement.cc.
|
inline |
Outputs.
Definition at line 93 of file sceneElement.hh.
void VSI::SceneElement::paint | ( | QPainter * | _painter, |
const QStyleOptionGraphicsItem * | _option, | ||
QWidget * | _widget = 0 |
||
) |
Background painting.
Definition at line 355 of file sceneElement.cc.
void VSI::SceneElement::replaceCodeBlock | ( | const QString & | _name, |
const QString & | _id, | ||
const QString & | _value | ||
) |
Replace block with name _name and id _id with _value.
Definition at line 573 of file sceneElement.cc.
void VSI::SceneElement::resetCodeGeneration | ( | ) |
Reset code block for code generation.
Definition at line 560 of file sceneElement.cc.
void VSI::SceneElement::saveToXml | ( | QDomDocument & | _doc, |
QDomElement & | _root | ||
) |
Save to xml.
Definition at line 698 of file sceneElement.cc.
|
privateslot |
Definition at line 590 of file sceneElement.cc.
QString VSI::SceneElement::variableId | ( | ) |
Unique variable name for code generation.
Definition at line 582 of file sceneElement.cc.
|
private |
Definition at line 176 of file sceneElement.hh.
|
private |
Definition at line 174 of file sceneElement.hh.
|
private |
Definition at line 169 of file sceneElement.hh.
|
private |
Definition at line 170 of file sceneElement.hh.
|
private |
Definition at line 164 of file sceneElement.hh.
|
private |
Definition at line 181 of file sceneElement.hh.
|
private |
Definition at line 172 of file sceneElement.hh.
|
private |
Definition at line 178 of file sceneElement.hh.
|
private |
Definition at line 166 of file sceneElement.hh.
|
private |
Definition at line 180 of file sceneElement.hh.
|
private |
Definition at line 182 of file sceneElement.hh.
|
private |
Definition at line 167 of file sceneElement.hh.
|
private |
Definition at line 163 of file sceneElement.hh.