13 #include <QAbstractTransition>
27 connect(
this, SIGNAL(started()),
this, SLOT(startedSlot()));
28 mActionGroup =
new QActionGroup(
this);
32 connect(
mServices->patient().get(), SIGNAL(clinicalApplicationChanged()),
this, SLOT(clinicalApplicationChangedSlot()));
39 void WorkflowStateMachine::clinicalApplicationChangedSlot()
44 void WorkflowStateMachine::startedSlot()
52 transToState->setTargetState(state);
57 mStates[state->
getUid()] = state;
69 QList<QAction *> actions = mActionGroup->actions();
70 for (
int i = 1; i <= actions.size(); ++i)
72 QString shortcut =
"Ctrl+" + QString::number(i);
73 actions[i - 1]->setShortcut(shortcut);
79 void WorkflowStateMachine::fillActionGroup(
WorkflowState* current, QActionGroup* group)
81 std::vector<WorkflowState*> childStates = current->
getChildStates();
83 if (childStates.empty())
89 for (
unsigned i = 0; i < childStates.size(); ++i)
90 this->fillActionGroup(childStates[i], group);
103 QSet<QAbstractState *> states = this->configuration();
104 for (QSet<QAbstractState *>::iterator iter = states.begin(); iter != states.end(); ++iter)