Extended graph representation with layout,look,selection.... More...
#include <ExtendedGraph.h>
Public Member Functions | |
| ExtendedGraph (const SharedGraph &g, const NodePositions &positions=NodePositions()) | |
| ExtendedGraph from graph and initial nodes positions. | |
| void | toFile (const QString &filename) |
| write extended Graph to file | |
| SharedEGraph | group (const NodeIDSet &names, const NodeName &groupName) |
| similar to Graph::group but taking care of nodes positions | |
| SharedEGraph | ungroup (const NodeIDSet &names) const |
| similar to Graph::ungroup but taking care of nodes positions | |
| SelectionMasks & | selections () |
| access selection masks | |
| Selection & | selection (size_t i) |
| access ith selection mask | |
| Selection | invertedSelection (size_t i) const |
| get the inverted ith selection mask | |
| Selection & | currentSelection () |
| get current selection mask | |
| QJsonObject | json () const |
| construct json representation of the ExtendedGraph | |
| const NodePositions & | positions () const |
| all the positions of the nodes | |
| const SharedGraph & | graph () const |
| the underlying abstract Graph | |
| void | setLayout (const SharedLayout &l) |
| set the layout for this graph | |
| void | setLook (const SharedLook &l) |
| set the look for this graph | |
| void | setMask (int id) |
| set id of current selection mask | |
| int | mask () const |
| get id of current selection mask | |
| const SharedLayout & | layout () |
| get shared layout | |
| const SharedLook & | look () |
| look | |
| CommandHistory & | history () |
| access command history of this graph | |
| void | setView (GraphWidget *view) |
| used internally to acknoledge graph that it's being shown | |
| GraphWidget * | view () |
| get the graph viewport | |
| SharedEGraph | clone (const SharedGraph &graph, const NodePositions &positions={}) const |
Static Public Member Functions | |
| static SharedEGraph | fromJSON (const QJsonObject &obj) |
| construct an ExtendedGraph from a json field | |
| static SharedEGraph | fromGraph (const SharedGraph &g) |
| create extended graph from a abstract Graph | |
| static SharedEGraph | fromFile (const QString &filename) |
| create and ExtendedGraph from a file | |
Extended graph representation with layout,look,selection....
The extended graph embbeds the Graph to add Visualisation specific properties to it.
Definition at line 27 of file ExtendedGraph.h.
| Elve::ExtendedGraph::ExtendedGraph | ( | const SharedGraph & | g, |
| const NodePositions & | positions = NodePositions() |
||
| ) |
ExtendedGraph from graph and initial nodes positions.
| g | underlying Graph |
| positions | initial node positions |
Definition at line 14 of file ExtendedGraph.cpp.
| SharedEGraph Elve::ExtendedGraph::fromFile | ( | const QString & | filename | ) | [static] |
create and ExtendedGraph from a file
| filename | filepath |
Definition at line 92 of file ExtendedGraph.cpp.
| SharedEGraph Elve::ExtendedGraph::fromGraph | ( | const SharedGraph & | g | ) | [static] |
create extended graph from a abstract Graph
| g | the Graph |
Definition at line 60 of file ExtendedGraph.cpp.
| SharedEGraph Elve::ExtendedGraph::fromJSON | ( | const QJsonObject & | obj | ) | [static] |
construct an ExtendedGraph from a json field
| obj | the json object |
Definition at line 24 of file ExtendedGraph.cpp.
| const SharedGraph & Elve::ExtendedGraph::graph | ( | ) | const |
| SharedEGraph Elve::ExtendedGraph::group | ( | const NodeIDSet & | names, |
| const NodeName & | groupName | ||
| ) |
similar to Graph::group but taking care of nodes positions
| names | Node ids |
| groupName | name of the group |
Definition at line 132 of file ExtendedGraph.cpp.
| Selection Elve::ExtendedGraph::invertedSelection | ( | size_t | i | ) | const |
get the inverted ith selection mask
| i | index between 0 and 9 |
Definition at line 232 of file ExtendedGraph.cpp.
| QJsonObject Elve::ExtendedGraph::json | ( | ) | const |
construct json representation of the ExtendedGraph
Definition at line 67 of file ExtendedGraph.cpp.
| const SharedLayout & Elve::ExtendedGraph::layout | ( | ) |
| const SharedLook & Elve::ExtendedGraph::look | ( | ) |
| int Elve::ExtendedGraph::mask | ( | ) | const |
get id of current selection mask
Definition at line 224 of file ExtendedGraph.cpp.
| const NodePositions & Elve::ExtendedGraph::positions | ( | ) | const |
| Selection & Elve::ExtendedGraph::selection | ( | size_t | i | ) |
access ith selection mask
| i | index between 0 and 9 |
Definition at line 188 of file ExtendedGraph.cpp.
| SelectionMasks & Elve::ExtendedGraph::selections | ( | ) |
| void Elve::ExtendedGraph::setLayout | ( | const SharedLayout & | l | ) |
set the layout for this graph
| l | a Valid shared Layout |
Definition at line 243 of file ExtendedGraph.cpp.
| void Elve::ExtendedGraph::setLook | ( | const SharedLook & | l | ) |
set the look for this graph
| l | a valid shared Look |
Definition at line 259 of file ExtendedGraph.cpp.
| void Elve::ExtendedGraph::setMask | ( | int | id | ) |
set id of current selection mask
| id | index between 0 and 9 |
Definition at line 220 of file ExtendedGraph.cpp.
| void Elve::ExtendedGraph::setView | ( | GraphWidget * | view | ) |
used internally to acknoledge graph that it's being shown
| view |
Definition at line 207 of file ExtendedGraph.cpp.
| void Elve::ExtendedGraph::toFile | ( | const QString & | filename | ) |
| SharedEGraph Elve::ExtendedGraph::ungroup | ( | const NodeIDSet & | names | ) | const |
similar to Graph::ungroup but taking care of nodes positions
| names | Node ids set |
Definition at line 155 of file ExtendedGraph.cpp.