AusweisApp
Lade ...
Suche ...
Keine Treffer
SelfAuthModel.h
gehe zur Dokumentation dieser Datei
1
5#pragma once
6
7#include "Env.h"
9#include "SingletonCreator.h"
10#include "WorkflowRequest.h"
11
12#include <QAbstractListModel>
13#include <QEvent>
14#include <QSharedPointer>
15#include <QString>
16#include <QtQml/qqmlregistration.h>
17
18
19class test_UiPluginQml;
20
21
22namespace governikus
23{
24
25class SelfAuthContext;
26
28 : public QAbstractListModel
29 , public SingletonCreator<SelfAuthModel>
30{
31 Q_OBJECT
32 QML_ELEMENT
33 QML_SINGLETON
34
35 friend class Env;
36 friend class ::test_UiPluginQml;
37
38 Q_PROPERTY(bool workflowCancelled READ isWorkflowCancelled NOTIFY fireCancelWorkflow FINAL)
39
40 private:
42
43 QSharedPointer<SelfAuthContext> mContext;
45
46 private Q_SLOTS:
47 void onSelfAuthenticationDataChanged();
48
49 public:
51 {
52 NAME = Qt::UserRole + 1,
53 VALUE
54 };
55
56 void resetContext(const QSharedPointer<SelfAuthContext>& pContext = QSharedPointer<SelfAuthContext>());
57
58 Q_INVOKABLE void startWorkflow(bool pActivateUi = true);
59 Q_INVOKABLE void cancelWorkflow();
60 [[nodiscard]] bool isWorkflowCancelled() const;
61 [[nodiscard]] Q_INVOKABLE bool isBasicReader() const;
62
63 [[nodiscard]] int rowCount(const QModelIndex& = QModelIndex()) const override;
64 [[nodiscard]] QVariant data(const QModelIndex& pIndex, int pRole = Qt::DisplayRole) const override;
65 [[nodiscard]] QHash<int, QByteArray> roleNames() const override;
66
67 [[nodiscard]] bool event(QEvent* pEvent) override;
68
69 Q_SIGNALS:
70 void fireStartWorkflow(const QSharedPointer<WorkflowRequest>& pRequest);
72};
73
74
75} // namespace governikus
Definition Env.h:40
Definition SelfAuthModel.h:30
int rowCount(const QModelIndex &=QModelIndex()) const override
Definition SelfAuthModel.cpp:97
void resetContext(const QSharedPointer< SelfAuthContext > &pContext=QSharedPointer< SelfAuthContext >())
Definition SelfAuthModel.cpp:49
Q_INVOKABLE bool isBasicReader() const
Definition SelfAuthModel.cpp:86
DataRoles
Definition SelfAuthModel.h:51
@ VALUE
Definition SelfAuthModel.h:53
@ NAME
Definition SelfAuthModel.h:52
bool isWorkflowCancelled() const
Definition SelfAuthModel.cpp:76
Q_INVOKABLE void startWorkflow(bool pActivateUi=true)
Definition SelfAuthModel.cpp:61
QHash< int, QByteArray > roleNames() const override
Definition SelfAuthModel.cpp:121
QVariant data(const QModelIndex &pIndex, int pRole=Qt::DisplayRole) const override
Definition SelfAuthModel.cpp:103
bool event(QEvent *pEvent) override
Definition SelfAuthModel.cpp:130
Q_INVOKABLE void cancelWorkflow()
Definition SelfAuthModel.cpp:67
bool workflowCancelled
Definition SelfAuthModel.h:38
void fireStartWorkflow(const QSharedPointer< WorkflowRequest > &pRequest)
QList< QPair< QString, QString > > OrderedSelfData
Definition SelfAuthenticationData.h:59
Definition SingletonCreator.h:22
Defines the AccessRight and AccessRole enum.
Definition CommandApdu.h:17