21#include <QGraphicsItem>
26class QGraphicsSceneMouseEvent;
33static const int TypeNode = QGraphicsItem::UserType+1;
49 Q_INTERFACES (QGraphicsItem)
58 const QString &iconPath,
59 const bool &showNumbers,
60 const bool &numbersInside,
61 const QString &numberColor,
62 const int &numberSize,
63 const int &numDistance,
64 const bool &showLabels,
66 const QString &labelColor,
68 const int &labelDistance,
69 const bool &edgeHighlighting,
75 enum {
Type = UserType + 1 };
79 QPainterPath
shape()
const;
80 void paint(QPainter *painter,
const QStyleOptionGraphicsItem *option, QWidget *widget);
92 void setShape (
const QString,
const QString &iconPath=QString());
95 void setColor(
const QString &colorName);
123 QVariant
itemChange(GraphicsItemChange change,
const QVariant &value);
Definition graphicsedge.h:49
Definition graphicsnodelabel.h:26
Definition graphicsnodenumber.h:27
Definition graphicsnode.h:47
void nodeClicked(GraphicsNode *)
@ Type
Definition graphicsnode.h:75
void addInEdge(GraphicsEdge *edge)
Adds an inbound edge to this node.
Definition graphicsnode.cpp:557
QColor m_col_orig
Definition graphicsnode.h:149
void setLabelText(const QString &label)
Sets the label of this node.
Definition graphicsnode.cpp:645
QPainterPath shape() const
Returns the shape of the node as a path in local coordinates.
Definition graphicsnode.cpp:340
void addNumber()
Adds a graphics number to the node.
Definition graphicsnode.cpp:740
QString labelText()
Returns the label of the node.
Definition graphicsnode.cpp:662
GraphicsWidget * graphicsWidget
Definition graphicsnode.h:136
QString nodeShape()
Definition graphicsnode.h:93
void setEdgeHighLighting(const bool &toggle)
**
Definition graphicsnode.cpp:546
~GraphicsNode()
Definition graphicsnode.cpp:872
void setNumberColor(const QString &color)
GraphicsNode::setNumberColor.
Definition graphicsnode.cpp:837
void removeInEdge(GraphicsEdge *)
Removes the inbound edge from this node.
Definition graphicsnode.cpp:567
void setLabelDistance(const int &distance)
Sets the distance of the label from the node.
Definition graphicsnode.cpp:725
int size() const
Returns the esoteric size of the node.
Definition graphicsnode.cpp:210
int m_labelSize
Definition graphicsnode.h:144
QVariant itemChange(GraphicsItemChange change, const QVariant &value)
Called when the node changes, i.e. moves, becomes disabled or changes its visibility Propagates the c...
Definition graphicsnode.cpp:441
QString m_iconPath
Definition graphicsnode.h:147
int m_labelDistance
Definition graphicsnode.h:146
int m_size_orig
Definition graphicsnode.h:141
GraphicsNodeLabel * label()
Returns the graphics label of the node.
Definition graphicsnode.cpp:618
bool m_edgeHighLighting
Definition graphicsnode.h:152
void removeOutEdge(GraphicsEdge *)
Removes an outbound edge from this node.
Definition graphicsnode.cpp:593
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
Does the actual painting using the QPainterPath created by the setShape()
Definition graphicsnode.cpp:368
void setLabelColor(const QString &color)
Sets the color of the node label.
Definition graphicsnode.cpp:671
void addLabel()
Creates a graphics label to this node.
Definition graphicsnode.cpp:605
int m_state
Definition graphicsnode.h:142
QString m_labelText
Definition graphicsnode.h:151
void setNumberVisibility(const bool &toggle)
Toggles the visibility of graphics node number.
Definition graphicsnode.cpp:776
QRectF boundingRect() const
Returns the bounding rectangle of the node.
Definition graphicsnode.cpp:352
QPolygonF * m_poly_t
Definition graphicsnode.h:139
QString m_shape
Definition graphicsnode.h:147
void deleteNumber()
Deletes the graphics node number.
Definition graphicsnode.cpp:763
void setNumberDistance(const int &distance)
GraphicsNode::setNumberDistance.
Definition graphicsnode.cpp:854
GraphicsNodeNumber * number()
Returns the graphics node number.
Definition graphicsnode.cpp:755
int m_num
Definition graphicsnode.h:140
void setLabelSize(const int &size)
Sets the size of the node label.
Definition graphicsnode.cpp:710
void setNumberSize(const int &size)
GraphicsNode::setNumberSize.
Definition graphicsnode.cpp:818
bool m_hasNumber
Definition graphicsnode.h:152
int m_numSize
Definition graphicsnode.h:143
QColor m_col_outline
Definition graphicsnode.h:150
void setNumberInside(const bool &toggle)
Toggles displaying node number inside the node.
Definition graphicsnode.cpp:800
QString color()
Returns the node color in the format "#RRGGBB".
Definition graphicsnode.cpp:175
void setSize(const int &)
Changes the size of the node.
Definition graphicsnode.cpp:186
QString m_labelColor
Definition graphicsnode.h:151
void setShape(const QString, const QString &iconPath=QString())
Sets the shape of the node and prepares the corresponding QPainterPath m_path which will be drawn by ...
Definition graphicsnode.cpp:231
list< GraphicsEdge * > outEdgeList
Definition graphicsnode.h:154
GraphicsNodeNumber * m_number
Definition graphicsnode.h:156
QPointF newPos
Definition graphicsnode.h:138
int type() const
Definition graphicsnode.h:76
void setLabelVisibility(const bool &toggle)
Toggles the visibiity of the node label.
Definition graphicsnode.cpp:687
QPainterPath m_path
Definition graphicsnode.h:137
bool m_hasLabel
Definition graphicsnode.h:152
void setColor(const QString &colorName)
Changes the color of the node. The new color name can be in one of these formats:
Definition graphicsnode.cpp:145
QColor m_col
Definition graphicsnode.h:149
list< GraphicsEdge * > inEdgeList
Definition graphicsnode.h:154
GraphicsNodeLabel * m_label
Definition graphicsnode.h:155
void addOutEdge(GraphicsEdge *edge)
Adds a outbound edge to this node.
Definition graphicsnode.cpp:582
QString m_numColor
Definition graphicsnode.h:148
bool m_hasNumberInside
Definition graphicsnode.h:152
int nodeNumber()
Definition graphicsnode.h:82
void deleteLabel()
Deletes the graphics label of this node.
Definition graphicsnode.cpp:629
int m_numberDistance
Definition graphicsnode.h:145
int m_size
Definition graphicsnode.h:141
static const int TypeNode
Definition graphicsnode.h:33
static const int ZValueNodeHighlighted
Definition graphicsnode.h:35
static const int ZValueNode
Definition graphicsnode.h:34