22 #include <QGraphicsScene>
40 explicit QGVScene(
const QString &name, QObject *parent = 0);
43 void setGraphAttribute(
const QString &name,
const QString &value);
44 void setNodeAttribute(
const QString &name,
const QString &value);
45 void setEdgeAttribute(
const QString &name,
const QString &value);
47 QGVNode* addNode(
const QString& label);
49 QGVSubGraph* addSubGraph(
const QString& name,
bool cluster=
true);
51 void setRootNode(
QGVNode *node);
53 void setNodePositionAttribute();
55 void loadLayout(
const QString &text);
56 void applyLayout(
const QString &algorithm =
"dot");
57 void render (
const QString &algorithm);
58 void render (
const QString algorithm,
const QString file);
62 bool writeGraph (
const QString filename);
65 void nodeContextMenu(
QGVNode* node);
66 void nodeDoubleClick(
QGVNode* node);
67 void nodeChanged (
QGVNode* node);
68 void nodeMouseRelease (
QGVNode* node);
70 void edgeContextMenu(
QGVEdge* edge);
71 void edgeDoubleClick(
QGVEdge* edge);
76 void graphContextMenuEvent();
81 virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent * contextMenuEvent);
82 virtual void mouseDoubleClickEvent(QGraphicsSceneMouseEvent * mouseEvent);
83 virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent * mouseEvent);
84 virtual void drawBackground(QPainter * painter,
const QRectF & rect);
95 QList<QGVNode*> _nodes;
96 QList<QGVEdge*> _edges;
97 QList<QGVSubGraph*> _subGraphs;
98 QGraphicsTextItem* _label;