ELVE  1
ELVE Logic Visualization Explorer
Elve::ExtendedGraph Class Reference

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
Selectionselection (size_t i)
 access ith selection mask
Selection invertedSelection (size_t i) const
 get the inverted ith selection mask
SelectioncurrentSelection ()
 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
CommandHistoryhistory ()
 access command history of this graph
void setView (GraphWidget *view)
 used internally to acknoledge graph that it's being shown
GraphWidgetview ()
 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

Detailed Description

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.


Constructor & Destructor Documentation

Elve::ExtendedGraph::ExtendedGraph ( const SharedGraph &  g,
const NodePositions &  positions = NodePositions() 
)

ExtendedGraph from graph and initial nodes positions.

Parameters:
gunderlying Graph
positionsinitial node positions

Definition at line 14 of file ExtendedGraph.cpp.


Member Function Documentation

get current selection mask

Returns:

Definition at line 228 of file ExtendedGraph.cpp.

SharedEGraph Elve::ExtendedGraph::fromFile ( const QString &  filename) [static]

create and ExtendedGraph from a file

Parameters:
filenamefilepath
Returns:
new shared ExtendedGraph

Definition at line 92 of file ExtendedGraph.cpp.

SharedEGraph Elve::ExtendedGraph::fromGraph ( const SharedGraph &  g) [static]

create extended graph from a abstract Graph

Parameters:
gthe Graph
Returns:

Definition at line 60 of file ExtendedGraph.cpp.

SharedEGraph Elve::ExtendedGraph::fromJSON ( const QJsonObject &  obj) [static]

construct an ExtendedGraph from a json field

Parameters:
objthe json object
Returns:
a new shared Extended graph

Definition at line 24 of file ExtendedGraph.cpp.

const SharedGraph & Elve::ExtendedGraph::graph ( ) const

the underlying abstract Graph

Returns:

Definition at line 215 of file ExtendedGraph.cpp.

SharedEGraph Elve::ExtendedGraph::group ( const NodeIDSet &  names,
const NodeName &  groupName 
)

similar to Graph::group but taking care of nodes positions

Parameters:
namesNode ids
groupNamename of the group
Returns:
new shared ExtendedGraph

Definition at line 132 of file ExtendedGraph.cpp.

access command history of this graph

Returns:

Definition at line 128 of file ExtendedGraph.cpp.

get the inverted ith selection mask

Parameters:
iindex between 0 and 9
Returns:

Definition at line 232 of file ExtendedGraph.cpp.

QJsonObject Elve::ExtendedGraph::json ( ) const

construct json representation of the ExtendedGraph

Returns:
a json containing all the graph

Definition at line 67 of file ExtendedGraph.cpp.

const SharedLayout & Elve::ExtendedGraph::layout ( )

get shared layout

Returns:

Definition at line 268 of file ExtendedGraph.cpp.

const SharedLook & Elve::ExtendedGraph::look ( )

look

Returns:

Definition at line 273 of file ExtendedGraph.cpp.

get id of current selection mask

Returns:
current selection id

Definition at line 224 of file ExtendedGraph.cpp.

const NodePositions & Elve::ExtendedGraph::positions ( ) const

all the positions of the nodes

Returns:

Definition at line 197 of file ExtendedGraph.cpp.

access ith selection mask

Parameters:
iindex between 0 and 9
Returns:
selection

Definition at line 188 of file ExtendedGraph.cpp.

SelectionMasks & Elve::ExtendedGraph::selections ( )

access selection masks

Returns:

Definition at line 184 of file ExtendedGraph.cpp.

void Elve::ExtendedGraph::setLayout ( const SharedLayout &  l)

set the layout for this graph

Parameters:
la Valid shared Layout

Definition at line 243 of file ExtendedGraph.cpp.

void Elve::ExtendedGraph::setLook ( const SharedLook &  l)

set the look for this graph

Parameters:
la valid shared Look

Definition at line 259 of file ExtendedGraph.cpp.

void Elve::ExtendedGraph::setMask ( int  id)

set id of current selection mask

Parameters:
idindex between 0 and 9

Definition at line 220 of file ExtendedGraph.cpp.

used internally to acknoledge graph that it's being shown

Parameters:
view

Definition at line 207 of file ExtendedGraph.cpp.

void Elve::ExtendedGraph::toFile ( const QString &  filename)

write extended Graph to file

Parameters:
filename

Definition at line 111 of file ExtendedGraph.cpp.

SharedEGraph Elve::ExtendedGraph::ungroup ( const NodeIDSet &  names) const

similar to Graph::ungroup but taking care of nodes positions

Parameters:
namesNode ids set
Returns:
new shared ExtendedGraph

Definition at line 155 of file ExtendedGraph.cpp.

get the graph viewport

Returns:

Definition at line 211 of file ExtendedGraph.cpp.

List of all members.


The documentation for this class was generated from the following files:
 All Classes Functions