#include <ArmarXGui/gui-plugins/StatechartViewerPlugin/layout/StateModelLayoutMediator.h>
Definition at line 50 of file StateModelLayoutMediator.h.
◆ StateModelLayoutMediator()
◆ boundingRectForAgraph()
QRectF boundingRectForAgraph |
( |
Agraph_t * |
graph | ) |
const |
◆ buildUpGraph
buildUpGraph To be called when the corresponding worker initialized the graph.
Traverses the state and adds all transitions and states to the graph as well as to EdgeList and NodeMap.
- Parameters
-
graph | The graphviz graph that shall represent the state. |
Definition at line 75 of file StateModelLayoutMediator.cpp.
◆ deleteMe
void deleteMe |
( |
size_t |
id | ) |
|
|
signal |
deleteMe To be emitted when this mediator and its worker ought to be deleted because their corresponding state was deleted.
- Parameters
-
◆ getGraphAttribute()
std::string getGraphAttribute |
( |
ElementType * |
element, |
|
|
const std::string & |
attributeName |
|
) |
| const |
|
inline |
◆ getID()
◆ getState()
getState Returns the state associated with this mediator.
- Returns
- The state that is layouted by the mediator's worker.
Definition at line 63 of file StateModelLayoutMediator.cpp.
◆ hasGraphAttribute()
bool hasGraphAttribute |
( |
ElementType * |
element, |
|
|
const std::string & |
attributeName |
|
) |
| const |
|
inline |
◆ isConnected()
isConnected Indicates whether this mediator is connected to a worker.
- Returns
- True if it is connected to a worker.
◆ layout
void layout |
( |
bool |
layoutAll | ) |
|
|
signal |
layout Tells worker to layout the graph.
- Parameters
-
layoutAll | True: layout nodes and edgese. False: layout only edges. |
◆ layoutingFinished
void layoutingFinished |
( |
| ) |
|
|
signal |
layoutingFinished Notifies that the latest layout task was finished.
◆ mediatorDeleted
mediatorDeleted Tells worker that is has to be deleted.
◆ scheduleMe
void scheduleMe |
( |
size_t |
id, |
|
|
bool |
layoutAll |
|
) |
| |
|
signal |
scheduleMe To be called when its graph should be layouted.
Is meant for the Controller to schedule this mediator in its layout queue.
- Parameters
-
id | This mediator's id. |
layoutAll | Indicates whether the whole graph (including nodes) should be layouted or only the edges. |
◆ setGraphAttribute()
int setGraphAttribute |
( |
ElementType * |
element, |
|
|
const std::string & |
attributeName, |
|
|
const ValueType & |
value |
|
) |
| const |
|
inline |
◆ startLayouting
void startLayouting |
( |
bool |
layoutAll, |
|
|
int |
counter |
|
) |
| |
|
slot |
layout Tells the worker to layout edges and, if layoutAlgo is true, nodes of the graph.
Signals changes of positions to the state.
- Parameters
-
layoutAll | If true, nodes and edges are layouted, if false, node positions are assumed to be fixed and only edges are routed. |
Definition at line 257 of file StateModelLayoutMediator.cpp.
◆ stateChanged
comment to prevent warnings if (!isConnectedToWorker) { return; }
switch (signalType)
{
case (statechartmodel::eUnchanged):
case (statechartmodel::eActivated):
nothing to do return; case (statechartmodel::eAdded): case (statechartmodel::eRemoved): case (statechartmodel::eChanged): auto sizeString = GraphvizConverter::convertFromPoint(QPointF(m_state->getSize().width() / dpi.width(), m_state->getSize().height() / dpi.height())); ARMARX_INFO_S << "state changed for" << m_state->getStateName(); ARMARX_INFO_S << "Graphviz graph size: " << sizeString; setGraphAttribute(m_graph->graph, "size", sizeString); setGraphAttribute(m_graph->graph, "ratio", m_state->getSize().height() / m_state->getSize().width()); default: ARMARX_WARNING << "CASE NOT HANDLED " << signalType; }
emit scheduleMe(id, true);
Definition at line 118 of file StateModelLayoutMediator.cpp.
◆ stateDeleted
◆ substateChanged
substateAdded To be called when a substate of state has changed.
- Parameters
-
substate | The changed substate. |
signalType | The type of signal (added, removed, moved etc.). |
Definition at line 150 of file StateModelLayoutMediator.cpp.
◆ substateFound
substateFound To be emitted when a substate is found when building up the graph for the first time.
- Parameters
-
substate | The substate that was discovered. |
signalType | Type of change to the substate. Should be eAdded. |
◆ supportPointsChanged
supportPointsChanged Notifies of changed support points of the given transition.
- Parameters
-
transition | Transition whose support points have changed. |
suppPoints | New support points. |
◆ transitionChanged
transitionAdded To be called when a transition of state has changed.
- Parameters
-
transition | The changed transition. |
signalType | The type of signal (added, removed, moved etc.). |
Definition at line 205 of file StateModelLayoutMediator.cpp.
◆ workerFinishedLayouting
void workerFinishedLayouting |
( |
| ) |
|
|
slot |
workerFinishedLayouting To be called when the worker is finished layouting.
Notifies the controller.
Definition at line 275 of file StateModelLayoutMediator.cpp.
The documentation for this class was generated from the following files: