LayoutController Class Reference

#include <ArmarXGui/gui-plugins/StatechartViewerPlugin/layout/LayoutController.h>

+ Inheritance diagram for LayoutController:

Public Slots

void deleteMediator (size_t mediatorId)
 deleteMediator Call the destructor of mediator and tell LayoutWorkerCreator to delete the corresponding worker.
 
void enableLayouting (bool enable=true)
 
bool layoutNow (size_t mediatorId, bool layoutAll)
 
void potentialStateAdded (statechartmodel::StateInstancePtr substate, statechartmodel::SignalType signalType)
 potentialStateAdded If a substate is added it might mean that there is a new state needing a LayoutWorker.
 
void scheduleMediator (size_t mediatorId, bool layoutAll)
 scheduleMediator Put the mediator in the layoutQueue.
 
void startNextLayouting ()
 startNextLayouting The last worker that layouted is finished and the next should be started.
 

Signals

void createWorker (MediatorPtr mediator, size_t id, QString name)
 createWorker Tells the LayoutWorkerCreator to create a new worker for this mediator.
 
void reset ()
 reset Notifies the LayoutWorkerCreator that the topState has been reset.
 

Public Member Functions

void createAllWorkers ()
 createAllWorkers Creates workers for all mediators
 
size_t getStateId (armarx::statechartmodel::StatePtr state) const
 
 LayoutController (armarx::statechartmodel::StatePtr topState, bool startEnabled=true)
 
void setTopState (statechartmodel::StatePtr topState)
 setTopState Resets all workers i.e.
 

Constructor & Destructor Documentation

◆ LayoutController()

LayoutController ( armarx::statechartmodel::StatePtr topState,
bool startEnabled = true )

Member Function Documentation

◆ createAllWorkers()

void createAllWorkers ( )

createAllWorkers Creates workers for all mediators

◆ createWorker

void createWorker ( MediatorPtr mediator,
size_t id,
QString name )
signal

createWorker Tells the LayoutWorkerCreator to create a new worker for this mediator.

Parameters
mediatorManages the communication between the new worker and the associated state.
idThe mediator's and worker's id.
nameName of mediator's state.

◆ deleteMediator

void deleteMediator ( size_t mediatorId)
slot

deleteMediator Call the destructor of mediator and tell LayoutWorkerCreator to delete the corresponding worker.

Parameters
mediatorIdThe id of the mediator that needs to be deleted.

◆ enableLayouting

void enableLayouting ( bool enable = true)
slot

◆ getStateId()

size_t getStateId ( armarx::statechartmodel::StatePtr state) const

◆ layoutNow

bool layoutNow ( size_t mediatorId,
bool layoutAll )
slot

◆ potentialStateAdded

void potentialStateAdded ( statechartmodel::StateInstancePtr substate,
statechartmodel::SignalType signalType )
slot

potentialStateAdded If a substate is added it might mean that there is a new state needing a LayoutWorker.

Creates a new LayoutWorker if necessary.

Parameters
substateThe substate that was changed.
signalTypeType of change to the substate.

◆ reset

void reset ( )
signal

reset Notifies the LayoutWorkerCreator that the topState has been reset.

◆ scheduleMediator

void scheduleMediator ( size_t mediatorId,
bool layoutAll )
slot

scheduleMediator Put the mediator in the layoutQueue.

Parameters
mediatorIdID of the StateModelLayoutMediator that should be scheduled.
layoutAllIndicates whether nodes and edges (true) or only edges shall be layouted (false).

◆ setTopState()

void setTopState ( statechartmodel::StatePtr topState)

setTopState Resets all workers i.e.

deletes all old workers and sets topState and its worker as only member of workers.

Parameters
topStateThe new top state.

◆ startNextLayouting

void startNextLayouting ( )
slot

startNextLayouting The last worker that layouted is finished and the next should be started.


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