diff options
author | Aleks Kissinger <aleks0@gmail.com> | 2018-03-17 19:01:02 -0400 |
---|---|---|
committer | Aleks Kissinger <aleks0@gmail.com> | 2018-03-17 19:01:02 -0400 |
commit | 3cea1514203a451c0a8806d276807863b463a78f (patch) | |
tree | d6850ab0f41a6d85f3504e8c92fcecf79b37689b /src/data/graph.h | |
parent | 39c2c74c664a6c770639ead8f45322352cacb997 (diff) |
added saving, style application, and copy and paste
Diffstat (limited to 'src/data/graph.h')
-rw-r--r-- | src/data/graph.h | 25 |
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: |