AusweisApp2
WorkflowModel.h
gehe zur Dokumentation dieser Datei
1 
7 #pragma once
8 
11 
12 #include <QObject>
13 #include <QSharedPointer>
14 #include <QString>
15 
16 class test_WorkflowModel;
17 
18 namespace governikus
19 {
20 
22  : public QObject
23 {
24  Q_OBJECT
25  Q_PROPERTY(QString currentState READ getCurrentState NOTIFY fireCurrentStateChanged)
26  Q_PROPERTY(QString resultString READ getResultString NOTIFY fireResultChanged)
27  Q_PROPERTY(bool error READ isError NOTIFY fireResultChanged)
28  Q_PROPERTY(bool errorIsMasked READ isMaskedError NOTIFY fireResultChanged)
29  Q_PROPERTY(ReaderManagerPlugInType readerPlugInType READ getReaderPlugInType WRITE setReaderPlugInType NOTIFY fireReaderPlugInTypeChanged)
31  Q_PROPERTY(QString readerImage READ getReaderImage NOTIFY fireReaderImageChanged)
33 
34  private:
35  friend class ::test_WorkflowModel;
36 
37  QSharedPointer<WorkflowContext> mContext;
38  QString mReaderImage;
39 
40  public:
41  WorkflowModel(QObject* pParent = nullptr);
42  virtual ~WorkflowModel();
43 
44  void resetContext(const QSharedPointer<WorkflowContext>& pContext = QSharedPointer<WorkflowContext>());
45 
46  QString getCurrentState() const;
47  virtual QString getResultString() const;
48  bool isError() const;
49  bool isMaskedError() const;
50 
51  ReaderManagerPlugInType getReaderPlugInType() const;
52  void setReaderPlugInType(ReaderManagerPlugInType pReaderPlugInType);
53 
54  bool isBasicReader();
55 
56  bool getNextWorkflowPending() const;
57 
58  QString getReaderImage() const;
59 
60  Q_INVOKABLE void startWorkflow();
61  Q_INVOKABLE void cancelWorkflow();
62  Q_INVOKABLE void cancelWorkflowToChangePin();
63  Q_INVOKABLE void continueWorkflow();
64  Q_INVOKABLE void setInitialPluginType();
65  Q_INVOKABLE bool selectedReaderHasCard() const;
66  Q_INVOKABLE bool shouldSkipResultView() const;
67  Q_INVOKABLE bool isCancellationByUser() const;
68  Q_INVOKABLE void sendResultMail() const;
69 
70  public Q_SLOTS:
71  void onReaderManagerSignal();
72 
73  Q_SIGNALS:
74  void fireStartWorkflow();
75  void fireCurrentStateChanged(const QString& pState);
76  void fireResultChanged();
81 };
82 
83 
84 } // namespace governikus
Q_INVOKABLE void continueWorkflow()
Definition: WorkflowModel.cpp:107
QString getCurrentState() const
Definition: WorkflowModel.cpp:58
Q_INVOKABLE bool isCancellationByUser() const
Definition: WorkflowModel.cpp:210
Q_INVOKABLE void cancelWorkflow()
Definition: WorkflowModel.cpp:122
void fireCurrentStateChanged(const QString &pState)
bool getNextWorkflowPending() const
Definition: WorkflowModel.cpp:152
bool error
Definition: WorkflowModel.h:27
Q_INVOKABLE void startWorkflow()
Definition: WorkflowModel.cpp:116
Q_INVOKABLE void cancelWorkflowToChangePin()
Definition: WorkflowModel.cpp:131
Q_INVOKABLE void sendResultMail() const
Definition: WorkflowModel.cpp:220
Q_INVOKABLE bool shouldSkipResultView() const
Definition: WorkflowModel.cpp:198
bool errorIsMasked
Definition: WorkflowModel.h:28
void resetContext(const QSharedPointer< WorkflowContext > &pContext=QSharedPointer< WorkflowContext >())
Definition: WorkflowModel.cpp:38
Implementation of ActivationContext for Intent based activation on Android systems.
Definition: ActivationContext.h:14
ReaderManagerPlugInType getReaderPlugInType() const
Definition: WorkflowModel.cpp:82
bool hasNextWorkflowPending
Definition: WorkflowModel.h:32
bool isError() const
Definition: WorkflowModel.cpp:70
Definition: WorkflowContext.h:21
QString currentState
Definition: WorkflowModel.h:25
QString resultString
Definition: WorkflowModel.h:26
ReaderManagerPlugInType readerPlugInType
Definition: WorkflowModel.h:29
QString getReaderImage() const
Definition: WorkflowModel.cpp:158
Q_INVOKABLE bool selectedReaderHasCard() const
Definition: WorkflowModel.cpp:188
bool isMaskedError() const
Definition: WorkflowModel.cpp:76
void onReaderManagerSignal()
Definition: WorkflowModel.cpp:234
virtual QString getResultString() const
Definition: WorkflowModel.cpp:64
QString readerImage
Definition: WorkflowModel.h:31
Q_INVOKABLE void setInitialPluginType()
Definition: WorkflowModel.cpp:164
void setReaderPlugInType(ReaderManagerPlugInType pReaderPlugInType)
Definition: WorkflowModel.cpp:93
Definition: WorkflowModel.h:21