AusweisApp2
 Alle Klassen Namensbereiche Dateien Funktionen Variablen Typdefinitionen Aufzählungen Aufzählungswerte Propertys Freundbeziehungen Makrodefinitionen
WorkflowController.h
gehe zur Dokumentation dieser Datei
1 
7 #pragma once
8 
9 #include "states/StateBuilder.h"
10 
11 #include <QScopedPointer>
12 #include <QSharedPointer>
13 #include <QStateMachine>
14 
15 class test_ChangePinController;
16 
17 namespace governikus
18 {
19 
21  : public QObject
22 {
23  Q_OBJECT
24  friend class ::test_ChangePinController;
25 
26  protected:
27  QStateMachine mStateMachine;
28  const QSharedPointer<WorkflowContext> mContext;
29 
30  public:
31  WorkflowController(const QSharedPointer<WorkflowContext>& pContext);
32  virtual ~WorkflowController();
33 
34  void run();
35 
36  QSharedPointer<WorkflowContext> getContext() const
37  {
38  return mContext;
39  }
40 
41 
42  template<typename T>
44  {
45  auto state = StateBuilder::createState<T>(mContext);
46  mStateMachine.addState(state);
47  return state;
48  }
49 
50 
51  Q_SIGNALS:
52  void fireComplete();
53 
54 };
55 
56 } /* namespace governikus */
T * addState()
Definition: WorkflowController.h:43
WorkflowController(const QSharedPointer< WorkflowContext > &pContext)
Definition: WorkflowController.cpp:11
QSharedPointer< WorkflowContext > getContext() const
Definition: WorkflowController.h:36
Definition: WorkflowController.h:20
#define T(v)
Definition: http_parser.cpp:234
virtual ~WorkflowController()
Definition: WorkflowController.cpp:19
void run()
Definition: WorkflowController.cpp:24
state
Definition: http_parser.cpp:276
const QSharedPointer< WorkflowContext > mContext
Definition: WorkflowController.h:28
QStateMachine mStateMachine
Definition: WorkflowController.h:27