AusweisApp2
Lade ...
Suche ...
Keine Treffer
WorkflowModel.h
gehe zur Dokumentation dieser Datei
7#pragma once
8
11
12#include <QObject>
13#include <QSharedPointer>
14#include <QString>
15
16class test_WorkflowModel;
17
18namespace 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)
30 Q_PROPERTY(bool isBasicReader READ isBasicReader NOTIFY fireIsBasicReaderChanged)
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 explicit WorkflowModel(QObject* pParent = nullptr);
42 ~WorkflowModel() override;
43
44 void resetWorkflowContext(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() const;
55
56 bool getNextWorkflowPending() const;
57
58 QString getReaderImage() const;
59
60 Q_INVOKABLE void cancelWorkflow();
61 Q_INVOKABLE void startScanIfNecessary();
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 QString getEmailHeader() const;
69 Q_INVOKABLE QString getEmailBody(bool pPercentEncoding = false, bool pAddLogNotice = false) const;
70 Q_INVOKABLE void sendResultMail() const;
71
72 public Q_SLOTS:
74
75 Q_SIGNALS:
76 void fireCurrentStateChanged(const QString& pState);
82};
83
84
85} // namespace governikus
Definition: WorkflowModel.h:23
void resetWorkflowContext(const QSharedPointer< WorkflowContext > &pContext=QSharedPointer< WorkflowContext >())
Definition: WorkflowModel.cpp:39
Q_INVOKABLE void cancelWorkflowToChangePin()
Definition: WorkflowModel.cpp:135
~WorkflowModel() override
Definition: WorkflowModel.cpp:34
bool isError() const
Definition: WorkflowModel.cpp:71
bool error
Definition: WorkflowModel.h:27
QString resultString
Definition: WorkflowModel.h:26
bool errorIsMasked
Definition: WorkflowModel.h:28
ReaderManagerPlugInType readerPlugInType
Definition: WorkflowModel.h:29
QString getCurrentState() const
Definition: WorkflowModel.cpp:59
Q_INVOKABLE QString getEmailBody(bool pPercentEncoding=false, bool pAddLogNotice=false) const
Definition: WorkflowModel.cpp:235
Q_INVOKABLE bool shouldSkipResultView() const
Definition: WorkflowModel.cpp:202
Q_INVOKABLE void setInitialPluginType()
Definition: WorkflowModel.cpp:168
void setReaderPlugInType(ReaderManagerPlugInType pReaderPlugInType)
Definition: WorkflowModel.cpp:94
void fireCurrentStateChanged(const QString &pState)
QString currentState
Definition: WorkflowModel.h:25
Q_INVOKABLE void continueWorkflow()
Definition: WorkflowModel.cpp:108
Q_INVOKABLE bool selectedReaderHasCard() const
Definition: WorkflowModel.cpp:192
Q_INVOKABLE void sendResultMail() const
Definition: WorkflowModel.cpp:247
Q_INVOKABLE QString getEmailHeader() const
Definition: WorkflowModel.cpp:224
QString readerImage
Definition: WorkflowModel.h:31
Q_INVOKABLE bool isCancellationByUser() const
Definition: WorkflowModel.cpp:214
bool hasNextWorkflowPending
Definition: WorkflowModel.h:32
QString getReaderImage() const
Definition: WorkflowModel.cpp:162
bool isBasicReader
Definition: WorkflowModel.h:30
bool isMaskedError() const
Definition: WorkflowModel.cpp:77
virtual QString getResultString() const
Definition: WorkflowModel.cpp:65
ReaderManagerPlugInType getReaderPlugInType() const
Definition: WorkflowModel.cpp:83
void onReaderManagerSignal()
Definition: WorkflowModel.cpp:258
Q_INVOKABLE void startScanIfNecessary()
Definition: WorkflowModel.cpp:126
Q_INVOKABLE void cancelWorkflow()
Definition: WorkflowModel.cpp:117
bool getNextWorkflowPending() const
Definition: WorkflowModel.cpp:156
Implementation of ActivationContext for Intent based activation on Android systems.
Definition: ActivationContext.h:15