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. More...
 
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. More...
 
void scheduleMediator (size_t mediatorId, bool layoutAll)
 scheduleMediator Put the mediator in the layoutQueue. More...
 
void startNextLayouting ()
 startNextLayouting The last worker that layouted is finished and the next should be started. More...
 

Signals

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

Public Member Functions

void createAllWorkers ()
 createAllWorkers Creates workers for all mediators More...
 
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. More...
 

Detailed Description

Definition at line 45 of file LayoutController.h.

Constructor & Destructor Documentation

◆ LayoutController()

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

Definition at line 34 of file LayoutController.cpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ createAllWorkers()

void createAllWorkers ( )

createAllWorkers Creates workers for all mediators

Definition at line 68 of file LayoutController.cpp.

◆ 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.

Definition at line 164 of file LayoutController.cpp.

◆ enableLayouting

void enableLayouting ( bool  enable = true)
slot

Definition at line 89 of file LayoutController.cpp.

◆ getStateId()

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

Definition at line 76 of file LayoutController.cpp.

+ Here is the caller graph for this function:

◆ layoutNow

bool layoutNow ( size_t  mediatorId,
bool  layoutAll 
)
slot

Definition at line 116 of file LayoutController.cpp.

+ Here is the caller graph for this function:

◆ 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.

Definition at line 202 of file LayoutController.cpp.

◆ 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).

Definition at line 94 of file LayoutController.cpp.

◆ 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.

Definition at line 53 of file LayoutController.cpp.

◆ startNextLayouting

void startNextLayouting ( )
slot

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

Definition at line 137 of file LayoutController.cpp.

+ Here is the caller graph for this function:

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