#include <ConnectionGraphicsItem.h>

Signals | |
| void | nodeGraphicsItemSelected (const QString &name) |
| void | destroyed (Connection *connection) |
| Signal that is emitted when the connection item is being destroyed. | |
| void | destroyed (ConnectionGraphicsItem *connectionItem) |
| Signal that is emitted when the connection item is being destroyed. | |
Public Member Functions | |
| ConnectionGraphicsItem (const QString &name, const QColor &color, const QPointF &startPoint, const QPointF &endPoint) | |
| Constructor of the ConnectionGraphicsItem class. | |
| ~ConnectionGraphicsItem () | |
| Destructor of the ConnectionGraphicsItem class. | |
| virtual QRectF | boundingRect () const |
| Returns the bounding rectangle of the graphics item. | |
| virtual QPainterPath | shape () const |
| Returns the shape path of an item. | |
| void | setEnabled (bool enabled) |
| Enables or disables the graphics item. | |
| virtual void | paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0) |
| Paints the graphics item into a graphics view. | |
| void | updatePath () |
| Updates the path end points according to the positions of start and end nodes. | |
| Connection * | getConnection () const |
| Returns the Connection object that the connection graphics item represents. | |
| void | setConnection (Connection *connection) |
| Sets the Connection object that the connection graphics item represents. | |
| NodeGraphicsItem * | getStartNodeItem () |
| Gets the startnode of the connection. | |
| void | setStartNodeItem (NodeGraphicsItem *item) |
| Sets the startnode of the connection. | |
| NodeGraphicsItem * | getEndNodeItem () const |
| Gets the endnode of the connection. | |
| void | setEndNodeItem (NodeGraphicsItem *item) |
| Sets the endnode of the connection. | |
| QPointF | getStartPoint () const |
| Gets the start point of the connection. | |
| void | setStartPoint (const QPointF &startPos) |
| Sets the start point of the connection. | |
| QPointF | getEndPoint () const |
| Gets the end point of the connection. | |
| void | setEndPoint (const QPointF &endPos) |
| Sets the end point of the connection. | |
| void | updatePosition (const QPointF &scenePosition) |
| Updates the position of an end point for a connection that is currently being created. | |
Static Public Member Functions | |
| static ConnectionGraphicsItem * | getTempItem () |
| Returns the temporary Connection object that is used when creating a connection between nodes. | |
| static void | setTempItem (ConnectionGraphicsItem *connection) |
| Sets the temporary Connection object that is used when creating a connection between nodes to the given object. | |
| static bool | isConnectionCreated () |
| Returns whether a connection between nodes is currently being created. | |
Protected Member Functions | |
| void | hoverEnterEvent (QGraphicsSceneHoverEvent *event) |
| Process hover enter events. | |
| void | hoverLeaveEvent (QGraphicsSceneHoverEvent *event) |
| Process hover leave events. | |
Private Member Functions | |
| void | setTemp (bool temp) |
Private Attributes | |
| QString | m_name |
| The name of the connection. | |
| QColor | m_color |
| The color to use for painting the item. | |
| QPainterPath | m_mainPath |
| The path to use for painting the curved path. | |
| QPainterPath | m_shadowPath |
| The path to use for painting the shadow of the curved path. | |
| QPolygonF | m_arrowHeadPolygon |
| The arrow head shape to use for painting the item. | |
| QPainterPath | m_shapePath |
| The path to return when the shape of the item is requested. | |
| QPointF | m_startPoint |
| The start point of the path. | |
| QPointF | m_endPoint |
| The end point of the path. | |
| bool | m_selfInitiated |
| Flag that states whether a current update has been initiated by this object itself. | |
| Connection * | m_connection |
| Pointer to Connection. (Deprecated.). | |
| QMap< QString, Connection * > | m_connections |
| List of Connections. | |
| NodeGraphicsItem * | m_startNodeItem |
| Pointer to NodeGraphicsItem. | |
| NodeGraphicsItem * | m_endNodeItem |
| Pointer to NodeGraphicsItem. | |
| bool | m_temp |
| Flag for temporary connection item. | |
| bool | m_hovered |
| Flag for mouse hovers over item. | |
Static Private Attributes | |
| static ConnectionGraphicsItem * | s_tempItem = 0 |
| Temporary Connection object that is used when creating a connection between nodes. | |
| ConnectionGraphicsItem::ConnectionGraphicsItem | ( | const QString & | name, | |
| const QColor & | color, | |||
| const QPointF & | startPoint, | |||
| const QPointF & | endPoint | |||
| ) |
Constructor of the ConnectionGraphicsItem class.
Constructors and Destructors.
| name | The name of the item. | |
| color | The color to use for painting the item. | |
| startPoint | The point where the connection line begins. | |
| endPoint | The point where the connection line ends. |
| name | The name of the item. | |
| color | The color to use for painting the item. | |
| startPoint | The point where the connection line begins. | |
| endPoint | The point where the connection line ends. |
| ConnectionGraphicsItem::~ConnectionGraphicsItem | ( | ) |
Destructor of the ConnectionGraphicsItem class.
| ConnectionGraphicsItem * ConnectionGraphicsItem::getTempItem | ( | ) | [static] |
Returns the temporary Connection object that is used when creating a connection between nodes.
Public Static Functions.
| void ConnectionGraphicsItem::setTempItem | ( | ConnectionGraphicsItem * | item | ) | [static] |
Sets the temporary Connection object that is used when creating a connection between nodes to the given object.
| connection | The temporary Connection object that is used when creating a connection between nodes. | |
| item | The temporary Connection object that is used when creating a connection between nodes. |
| bool ConnectionGraphicsItem::isConnectionCreated | ( | ) | [static] |
Returns whether a connection between nodes is currently being created.
| QRectF ConnectionGraphicsItem::boundingRect | ( | ) | const [virtual] |
Returns the bounding rectangle of the graphics item.
Public Slots.
| QPainterPath ConnectionGraphicsItem::shape | ( | ) | const [virtual] |
Returns the shape path of an item.
Returns the shape of the item as QPainterPath.
| The | shape of the item as QPainterPath. |
| void ConnectionGraphicsItem::setEnabled | ( | bool | enabled | ) |
Enables or disables the graphics item.
| enabled | The new enabled state for the item. |
| void ConnectionGraphicsItem::paint | ( | QPainter * | painter, | |
| const QStyleOptionGraphicsItem * | option, | |||
| QWidget * | widget = 0 | |||
| ) | [virtual] |
Paints the graphics item into a graphics view.
| painter | The object to use for painting. | |
| option | Style options for painting the graphics item. | |
| widget | The widget into which to paint the graphics item. |
| void ConnectionGraphicsItem::updatePath | ( | ) |
Updates the path end points according to the positions of start and end nodes.
| Connection * ConnectionGraphicsItem::getConnection | ( | ) | const |
Returns the Connection object that the connection graphics item represents.
| void ConnectionGraphicsItem::setConnection | ( | Connection * | connection | ) |
Sets the Connection object that the connection graphics item represents.
| connection | The Connection object that the connection graphics item represents. |
| NodeGraphicsItem * ConnectionGraphicsItem::getStartNodeItem | ( | ) |
Gets the startnode of the connection.
| void ConnectionGraphicsItem::setStartNodeItem | ( | NodeGraphicsItem * | item | ) |
Sets the startnode of the connection.
| NodeGraphicsItem * ConnectionGraphicsItem::getEndNodeItem | ( | ) | const |
Gets the endnode of the connection.
| void ConnectionGraphicsItem::setEndNodeItem | ( | NodeGraphicsItem * | item | ) |
Sets the endnode of the connection.
| QPointF ConnectionGraphicsItem::getStartPoint | ( | ) | const |
Gets the start point of the connection.
Gets the startpoint of the connection.
| void ConnectionGraphicsItem::setStartPoint | ( | const QPointF & | startPos | ) |
Sets the start point of the connection.
| QPointF ConnectionGraphicsItem::getEndPoint | ( | ) | const |
Gets the end point of the connection.
Gets the endpoint of the connection.
| void ConnectionGraphicsItem::setEndPoint | ( | const QPointF & | endPos | ) |
Sets the end point of the connection.
| void ConnectionGraphicsItem::updatePosition | ( | const QPointF & | scenePosition | ) |
Updates the position of an end point for a connection that is currently being created.
| scenePosition | The position of the mouse pointer over the graphics view in scene coordinates. |
| void ConnectionGraphicsItem::nodeGraphicsItemSelected | ( | const QString & | name | ) | [signal] |
| void ConnectionGraphicsItem::destroyed | ( | Connection * | connection | ) | [signal] |
Signal that is emitted when the connection item is being destroyed.
| void ConnectionGraphicsItem::destroyed | ( | ConnectionGraphicsItem * | connectionItem | ) | [signal] |
Signal that is emitted when the connection item is being destroyed.
| void ConnectionGraphicsItem::hoverEnterEvent | ( | QGraphicsSceneHoverEvent * | event | ) | [protected] |
Process hover enter events.
Protected Functions.
| void ConnectionGraphicsItem::hoverLeaveEvent | ( | QGraphicsSceneHoverEvent * | event | ) | [protected] |
Process hover leave events.
| void ConnectionGraphicsItem::setTemp | ( | bool | temp | ) | [private] |
Sets the temp flag of the connection.
Private Functions Sets the temp flag.
ConnectionGraphicsItem * ConnectionGraphicsItem::s_tempItem = 0 [static, private] |
Temporary Connection object that is used when creating a connection between nodes.
Private Static Data.
Temporary Connection object that is created when a connection is set up.
QString ConnectionGraphicsItem::m_name [private] |
The name of the connection.
QColor ConnectionGraphicsItem::m_color [private] |
The color to use for painting the item.
QPainterPath ConnectionGraphicsItem::m_mainPath [private] |
The path to use for painting the curved path.
QPainterPath ConnectionGraphicsItem::m_shadowPath [private] |
The path to use for painting the shadow of the curved path.
QPolygonF ConnectionGraphicsItem::m_arrowHeadPolygon [private] |
The arrow head shape to use for painting the item.
QPainterPath ConnectionGraphicsItem::m_shapePath [private] |
The path to return when the shape of the item is requested.
QPointF ConnectionGraphicsItem::m_startPoint [private] |
The start point of the path.
QPointF ConnectionGraphicsItem::m_endPoint [private] |
The end point of the path.
bool ConnectionGraphicsItem::m_selfInitiated [private] |
Flag that states whether a current update has been initiated by this object itself.
Connection* ConnectionGraphicsItem::m_connection [private] |
Pointer to Connection. (Deprecated.).
QMap<QString, Connection *> ConnectionGraphicsItem::m_connections [private] |
List of Connections.
Pointer to NodeGraphicsItem.
Pointer to NodeGraphicsItem.
bool ConnectionGraphicsItem::m_temp [private] |
Flag for temporary connection item.
bool ConnectionGraphicsItem::m_hovered [private] |
Flag for mouse hovers over item.
1.5.9