21 #ifndef GRAPHNODEITEM_H 22 #define GRAPHNODEITEM_H 24 #include <QGraphicsItemGroup> 26 #include <boost/weak_ptr.hpp> 42 std::shared_ptr<dtree::Node>
getNode()
const {
return mNode.lock(); }
76 QVector<GraphNodeItem *> mChildrenItems;
78 std::weak_ptr<dtree::Node> mNode;
80 QGraphicsRectItem *mRect;
81 QGraphicsTextItem *mText;
83 QVector<GraphNodeChildBoxItem *> mChildrenBoxes;
84 QVector<QGraphicsTextItem *> mChildrenBoxText;
85 QGraphicsLineItem *mArrow;
89 static double sDefWidth, sDefHeight;
107 #endif // GRAPHNODEITEM_H void unlinkChild(int idx)
Definition: graphnodeitem.cpp:185
QVariant itemChange(GraphicsItemChange change, const QVariant &value)
Definition: graphnodeitem.cpp:265
int getChildrenCount() const
Definition: graphnodeitem.cpp:76
GraphNodeItem * getParent() const
Definition: graphnodeitem.h:48
GraphNodeItem * mParent
Definition: graphnodeitem.h:101
Definition: dtgraphicsscene.h:37
void connectAsChild(GraphNodeItem *item, int idx)
Definition: graphnodeitem.cpp:173
void connectAsParent(GraphNodeItem *item, int idx)
Definition: graphnodeitem.cpp:166
void setVariable(dtree::Variable var)
Definition: graphnodeitem.cpp:86
virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
Definition: graphnodeitem.cpp:302
virtual ~GraphNodeItem()
Definition: graphnodeitem.cpp:54
Variable
Definition: variables.h:10
void setChild(int idx, GraphNodeItem *child)
Definition: graphnodeitem.cpp:156
void childHoverExited()
Definition: graphnodeitem.cpp:213
void moveArrow(QPointF pt)
Definition: graphnodeitem.cpp:190
static QBrush mNormalBrush
Definition: graphnodeitem.h:104
std::shared_ptr< dtree::Node > getNode() const
Definition: graphnodeitem.h:42
void childHoverEntered(int id)
Definition: graphnodeitem.cpp:208
Definition: graphnodeitem.h:92
Definition: commonstateevaluators.h:8
int mId
Definition: graphnodeitem.h:102
GraphNodeItem * getChild(int idx)
Definition: graphnodeitem.cpp:81
std::pair< box, unsigned > value
Definition: diffusion.cpp:30
GraphNodeItem(std::shared_ptr< dtree::Node > node, DtGraphicsScene *scene, QGraphicsItem *parent=0)
Definition: graphnodeitem.cpp:31
virtual void hoverEnterEvent(QGraphicsSceneHoverEvent *event)
Definition: graphnodeitem.cpp:293
void setParent(GraphNodeItem *child)
Definition: graphnodeitem.cpp:161
bool requiresChildrenHighlight(int childid) const
Definition: graphnodeitem.cpp:203
void createArrow()
Definition: graphnodeitem.cpp:253
void update()
Definition: graphnodeitem.cpp:218
void unlinkParent()
Definition: graphnodeitem.cpp:180
int getChildrenId() const
Definition: graphnodeitem.h:47
GraphNodeChildBoxItem(QRectF r, GraphNodeItem *parent, int id)
Definition: graphnodeitem.cpp:285
QPointF getChildrenArrowLocation(int idx) const
Definition: graphnodeitem.cpp:260
static QBrush mHighlightBrush
Definition: graphnodeitem.h:104
Definition: graphnodeitem.h:36