Class for graphical representation of connections in the node framework.
More...
#include <ConnectionGraphicsItem.h>
|
void | hoverEnterEvent (QGraphicsSceneHoverEvent *event) |
| Process hover enter events.
|
|
void | hoverLeaveEvent (QGraphicsSceneHoverEvent *event) |
| Process hover leave events.
|
|
Class for graphical representation of connections in the node framework.
Inheritance Diagram
Frapper::ConnectionGraphicsItem::ConnectionGraphicsItem |
( |
const QString & |
name, |
|
|
const QColor & |
color, |
|
|
const QPointF & |
startPoint, |
|
|
const QPointF & |
endPoint |
|
) |
| |
Constructor of the ConnectionGraphicsItem class.
Constructors and Destructors.
- Parameters
-
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. |
Constructor of the ConnectionGraphicsItem class.
- Parameters
-
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. |
Frapper::ConnectionGraphicsItem::~ConnectionGraphicsItem |
( |
| ) |
|
Returns the temporary Connection object that is used when creating a connection between nodes.
Public Static Functions.
- Returns
- The temporary Connection object that is used when creating a connection between nodes.
Returns the temporary Connection object that is used when creating a connection between nodes.
- Returns
- The temporary Connection object that is used when creating a connection between nodes.
Sets the temporary Connection object that is used when creating a connection between nodes to the given object.
- Parameters
-
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 Frapper::ConnectionGraphicsItem::isConnectionCreated |
( |
| ) |
|
|
static |
Returns whether a connection between nodes is currently being created.
- Returns
- True if a connection between nodes is currently being created, otherwise False.
QRectF Frapper::ConnectionGraphicsItem::boundingRect |
( |
| ) |
const |
|
virtual |
Returns the bounding rectangle of the graphics item.
Public Slots.
- Returns
- The bounding rectangle of the graphics item.
Public Functions Returns the bounding rectangle of the graphics item.
- Returns
- The bounding rectangle of the graphics item.
QPainterPath Frapper::ConnectionGraphicsItem::shape |
( |
| ) |
const |
|
virtual |
Returns the shape path of an item.
Returns the shape of the item as QPainterPath.
- Parameters
-
The | shape of the item as QPainterPath. |
void Frapper::ConnectionGraphicsItem::setEnabled |
( |
bool |
enabled | ) |
|
Enables or disables the graphics item.
- Parameters
-
enabled | The new enabled state for the item. |
void Frapper::ConnectionGraphicsItem::paint |
( |
QPainter * |
painter, |
|
|
const QStyleOptionGraphicsItem * |
option, |
|
|
QWidget * |
widget = 0 |
|
) |
| |
|
virtual |
Paints the graphics item into a graphics view.
- Parameters
-
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 Frapper::ConnectionGraphicsItem::updatePath |
( |
| ) |
|
Updates the path end points according to the positions of start and end nodes.
Connection * Frapper::ConnectionGraphicsItem::getConnection |
( |
| ) |
const |
Returns the Connection object that the connection graphics item represents.
- Returns
- The Connection object that the connection graphics item represents.
void Frapper::ConnectionGraphicsItem::setConnection |
( |
Connection * |
connection | ) |
|
Sets the Connection object that the connection graphics item represents.
- Parameters
-
connection | The Connection object that the connection graphics item represents. |
Gets the startnode of the connection.
void Frapper::ConnectionGraphicsItem::setStartNodeItem |
( |
NodeGraphicsItem * |
item | ) |
|
Sets the startnode of the connection.
Gets the endnode of the connection.
Sets the endnode of the connection.
QPointF Frapper::ConnectionGraphicsItem::getStartPoint |
( |
| ) |
const |
Gets the start point of the connection.
Gets the startpoint of the connection.
void Frapper::ConnectionGraphicsItem::setStartPoint |
( |
const QPointF & |
startPos | ) |
|
Sets the start point of the connection.
QPointF Frapper::ConnectionGraphicsItem::getEndPoint |
( |
| ) |
const |
Gets the end point of the connection.
Gets the endpoint of the connection.
void Frapper::ConnectionGraphicsItem::setEndPoint |
( |
const QPointF & |
endPos | ) |
|
Sets the end point of the connection.
void Frapper::ConnectionGraphicsItem::updatePosition |
( |
const QPointF & |
scenePosition | ) |
|
Updates the position of an end point for a connection that is currently being created.
- Parameters
-
scenePosition | The position of the mouse pointer over the graphics view in scene coordinates. |
void Frapper::ConnectionGraphicsItem::nodeGraphicsItemSelected |
( |
const QString & |
name | ) |
|
|
signal |
void Frapper::ConnectionGraphicsItem::destroyed |
( |
Connection * |
connection | ) |
|
|
signal |
Signal that is emitted when the connection item is being destroyed.
Signal that is emitted when the connection item is being destroyed.
void Frapper::ConnectionGraphicsItem::hoverEnterEvent |
( |
QGraphicsSceneHoverEvent * |
event | ) |
|
|
protected |
Process hover enter events.
Protected Functions.
void Frapper::ConnectionGraphicsItem::hoverLeaveEvent |
( |
QGraphicsSceneHoverEvent * |
event | ) |
|
|
protected |
Process hover leave events.
void Frapper::ConnectionGraphicsItem::setTemp |
( |
bool |
temp | ) |
|
|
private |
Sets the temp flag of the connection.
Private Functions Sets the temp flag.
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 Frapper::ConnectionGraphicsItem::m_name |
|
private |
The name of the connection.
QColor Frapper::ConnectionGraphicsItem::m_color |
|
private |
The color to use for painting the item.
QPainterPath Frapper::ConnectionGraphicsItem::m_mainPath |
|
private |
The path to use for painting the curved path.
QPainterPath Frapper::ConnectionGraphicsItem::m_shadowPath |
|
private |
The path to use for painting the shadow of the curved path.
QPolygonF Frapper::ConnectionGraphicsItem::m_arrowHeadPolygon |
|
private |
The arrow head shape to use for painting the item.
QPainterPath Frapper::ConnectionGraphicsItem::m_shapePath |
|
private |
The path to return when the shape of the item is requested.
QPointF Frapper::ConnectionGraphicsItem::m_startPoint |
|
private |
The start point of the path.
QPointF Frapper::ConnectionGraphicsItem::m_endPoint |
|
private |
The end point of the path.
bool Frapper::ConnectionGraphicsItem::m_selfInitiated |
|
private |
Flag that states whether a current update has been initiated by this object itself.
Connection* Frapper::ConnectionGraphicsItem::m_connection |
|
private |
QMap<QString, Connection *> Frapper::ConnectionGraphicsItem::m_connections |
|
private |
bool Frapper::ConnectionGraphicsItem::m_temp |
|
private |
Flag for temporary connection item.
bool Frapper::ConnectionGraphicsItem::m_hovered |
|
private |
Flag for mouse hovers over item.
The documentation for this class was generated from the following files: