23 #ifndef NODEHANDLER_H_
24 #define NODEHANDLER_H_
26 #include <QGraphicsScene>
55 void connectNodes(QString node0,QString prop0,QString node1,QString prop1);
65 bool load(QString fname);
90 virtual void dragEnterEvent(QGraphicsSceneDragDropEvent* event);
91 virtual void dragMoveEvent(QGraphicsSceneDragDropEvent * event);
92 virtual void dropEvent(QGraphicsSceneDragDropEvent* event);
This model wraps a ParameterFile instance and provides access to the data interpreted as a (directed)...
void setNodeActive()
sets the nodes active or inactive
void _deselectAllNodes()
deselects all nodes
QGraphicsItem that contains nodeproperties and draws the node.
void selectNode(QString name)
select some node
Node * _selectedNode
pointer to currently selected node (zero if none selected)
void loadFromModel()
loads the scene from the set GraphModel
virtual void keyPressEvent(QKeyEvent *keyEvent)
handles key press events
void updateTooltip(QString comment)
update tooltip of selected node
ConnectionLine * _cline
buffered connection line for slot connection drawing
virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *event)
handles mouse movement
NodeHandler(GraphModel *model, QObject *parent=0)
default constructor
GraphModel * _model
current set GraphModel
GraphModel * model()
get the current GraphModel
Line that connects two slots of two different nodes.
virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
handles all mousebutton release events
virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent *event)
context menu
QMap< QString, Node * > _nodeMap
map for node lookup
void nodeTypeSelected(QString type) const
Send type of currently selected node.
bool _addLine
state of slot connection mode
Property(/Parameter) of a node.
virtual void mousePressEvent(QGraphicsSceneMouseEvent *event)
handles mouse press events
void saveFlowchart()
save flowchart to file
bool load(QString fname)
load the GraphModel from the given filename and calls loadFromModel to fill the scene ...
NodeProperty * _startProp
buffer that stores the slot connection start property
QGraphicsScene that handles all drag&drop, node move and connect events.
void statusMessage(QString msg) const
message to display on status bar
virtual ~NodeHandler()
default destructor
void connectNodes(QString node0, QString prop0, QString node1, QString prop1)
connects two node with its slots: node0.prop0 to node1.prop1