34 #include "boost/bind.hpp"
46 mPluginContext(pluginContext),
49 this->initServiceListener();
52 void StateServiceProxy::initServiceListener()
56 boost::bind(&StateServiceProxy::onServiceAdded,
this, _1),
58 boost::bind(&StateServiceProxy::onServiceRemoved,
this, _1)
60 mServiceListener->open();
62 void StateServiceProxy::onServiceAdded(StateService* service)
64 mService.reset(service, null_deleter());
75 void StateServiceProxy::onServiceRemoved(StateService *service)
92 return mService->getVersionName();
102 return mService->getApplicationStateName();
107 return mService->getAllApplicationStateNames();
112 return mService->getWorkflowActions();
117 mService->setWorkFlowState(uid);
122 return mService->getActiveDesktop();
127 mService->saveDesktop(desktop);
132 mService->resetDesktop();
virtual QStringList getAllApplicationStateNames() const
void applicationStateChanged()
boost::shared_ptr< class StateService > StateServicePtr
virtual QString getVersionName()
virtual void setWorkFlowState(QString uid)
virtual QActionGroup * getWorkflowActions()
virtual QString getApplicationStateName() const
virtual void resetDesktop()
void workflowStateAboutToChange()
Workflow states for CustusX.
static StateServicePtr create(ctkPluginContext *pluginContext)
StateServiceProxy(ctkPluginContext *pluginContext)
static StateServicePtr getNullObject()
Helper class for listening to services being added, modified and removed.
void workflowStateChanged()
Data class for CustusX desktop.
virtual Desktop getActiveDesktop()
virtual void saveDesktop(Desktop desktop)