summaryrefslogtreecommitdiff
path: root/src/data/graph.h
diff options
context:
space:
mode:
authorAleks Kissinger <aleks0@gmail.com>2018-03-17 19:01:02 -0400
committerAleks Kissinger <aleks0@gmail.com>2018-03-17 19:01:02 -0400
commit3cea1514203a451c0a8806d276807863b463a78f (patch)
treed6850ab0f41a6d85f3504e8c92fcecf79b37689b /src/data/graph.h
parent39c2c74c664a6c770639ead8f45322352cacb997 (diff)
added saving, style application, and copy and paste
Diffstat (limited to 'src/data/graph.h')
-rw-r--r--src/data/graph.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/data/graph.h b/src/data/graph.h
index c25d51b..4d575e4 100644
--- a/src/data/graph.h
+++ b/src/data/graph.h
@@ -27,6 +27,15 @@ public:
void addEdge(Edge *e);
void addEdge(Edge *e, int index);
void removeEdge(Edge *e);
+ int maxIntName();
+ QString freshNodeName();
+
+ /*!
+ * \brief renameApart assigns fresh names to all of the nodes in "this",
+ * with respect to the given graph
+ * \param graph
+ */
+ void renameApart(Graph *graph);
GraphElementData *data() const;
void setData(GraphElementData *data);
@@ -40,6 +49,22 @@ public:
void clearBbox();
QString tikz();
+
+ /*!
+ * \brief copyOfSubgraphWithNodes produces a copy of the full subgraph
+ * with the given nodes. Used for cutting and copying to clipboard.
+ * \param nds
+ * \return
+ */
+ Graph *copyOfSubgraphWithNodes(QSet<Node*> nds);
+
+ /*!
+ * \brief insertGraph inserts a copy of the given graph. Prior to calling this
+ * method, the node names in the given graph should be made fresh via
+ * "renameApart".
+ * \param graph
+ */
+ void insertGraph(Graph *graph);
signals:
public slots: