summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview/qgraph_p.h
diff options
context:
space:
mode:
authorCaio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>2009-10-27 19:04:10 (GMT)
committerEduardo M. Fleury <eduardo.fleury@openbossa.org>2009-11-04 23:26:41 (GMT)
commitff5becbd4dafbabb79c086dc0cc18111d9e82a15 (patch)
treed67a34c525d861a71579d5a752b5745f15c9f0fa /src/gui/graphicsview/qgraph_p.h
parent8caacf51667d4cf770b18a8b59e46f842861210e (diff)
downloadQt-ff5becbd4dafbabb79c086dc0cc18111d9e82a15.zip
Qt-ff5becbd4dafbabb79c086dc0cc18111d9e82a15.tar.gz
Qt-ff5becbd4dafbabb79c086dc0cc18111d9e82a15.tar.bz2
QGAL: keep references to layout vertices
We used to keep a reference just to the first vertex of the layout (corresponding to the left/top anchor point) inside the Graph class, as "root vertex". Since the notion of rootVertex isn't used by the Graph itself, now this is stored outside the graph, and we also store the central and last vertices. This avoids using internalVertex() function to find out the vertices based on the item (in the case, the 'q'). This will be useful when we do simplify vertices, since the original layout vertice might not be the "layout vertice" in the graph. Signed-off-by: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> Reviewed-by: Eduardo M. Fleury <eduardo.fleury@openbossa.org>
Diffstat (limited to 'src/gui/graphicsview/qgraph_p.h')
-rw-r--r--src/gui/graphicsview/qgraph_p.h12
1 files changed, 0 insertions, 12 deletions
diff --git a/src/gui/graphicsview/qgraph_p.h b/src/gui/graphicsview/qgraph_p.h
index f1fa185..b5b3c88 100644
--- a/src/gui/graphicsview/qgraph_p.h
+++ b/src/gui/graphicsview/qgraph_p.h
@@ -201,11 +201,6 @@ public:
return l;
}
- void setRootVertex(Vertex *vertex)
- {
- userVertex = vertex;
- }
-
QSet<Vertex*> vertices() const {
QSet<Vertex *> setOfVertices;
for (const_iterator it = constBegin(); it != constEnd(); ++it) {
@@ -256,11 +251,6 @@ public:
}
#endif
- Vertex *rootVertex() const
- {
- return userVertex;
- }
-
protected:
void createDirectedEdge(Vertex *from, Vertex *to, EdgeData *data)
{
@@ -286,8 +276,6 @@ protected:
}
private:
- Vertex *userVertex;
-
QHash<Vertex *, QHash<Vertex *, EdgeData *> *> m_graph;
};