AusweisApp2
SelfAuthModel.h
gehe zur Dokumentation dieser Datei
1 
7 #pragma once
8 
9 #include "Env.h"
10 #include "SelfAuthenticationData.h"
11 
12 #include <QAbstractListModel>
13 #include <QEvent>
14 #include <QSharedPointer>
15 #include <QString>
16 
17 namespace governikus
18 {
19 
20 class SelfAuthContext;
21 
23  : public QAbstractListModel
24 {
25  Q_OBJECT
26  friend class Env;
27 
28  private:
29  SelfAuthModel();
30 
31  QSharedPointer<SelfAuthContext> mContext;
33 
34  private Q_SLOTS:
35  void onSelfAuthenticationDataChanged();
36 
37  public:
38  enum DataRoles
39  {
40  NAME = Qt::UserRole + 1,
42  };
43 
44  void resetContext(const QSharedPointer<SelfAuthContext>& pContext = QSharedPointer<SelfAuthContext>());
45 
46  Q_INVOKABLE void startWorkflow();
47  Q_INVOKABLE void cancelWorkflow();
48  Q_INVOKABLE bool isBasicReader() const;
49  Q_INVOKABLE void exportData(const QUrl& pFilename) const;
50 
51  int rowCount(const QModelIndex& = QModelIndex()) const override;
52  QVariant data(const QModelIndex& pIndex, int pRole = Qt::DisplayRole) const override;
53  QHash<int, QByteArray> roleNames() const override;
54 
55  bool event(QEvent* pEvent) override;
56 
57  Q_SIGNALS:
58  void fireStartWorkflow();
59 };
60 
61 
62 } // namespace governikus
DataRoles
Definition: SelfAuthModel.h:38
Q_INVOKABLE void cancelWorkflow()
Definition: SelfAuthModel.cpp:66
Q_INVOKABLE bool isBasicReader() const
Definition: SelfAuthModel.cpp:75
Definition: SelfAuthModel.h:40
void resetContext(const QSharedPointer< SelfAuthContext > &pContext=QSharedPointer< SelfAuthContext >())
Definition: SelfAuthModel.cpp:49
QVector< QPair< QString, QString > > OrderedSelfData
Definition: SelfAuthenticationData.h:61
Implementation of ActivationContext for Intent based activation on Android systems.
Definition: ActivationContext.h:14
Definition: SelfAuthModel.h:41
bool event(QEvent *pEvent) override
Definition: SelfAuthModel.cpp:133
QHash< int, QByteArray > roleNames() const override
Definition: SelfAuthModel.cpp:124
Q_INVOKABLE void exportData(const QUrl &pFilename) const
Definition: SelfAuthModel.cpp:86
Definition: Env.h:43
Definition: SelfAuthModel.h:22
QVariant data(const QModelIndex &pIndex, int pRole=Qt::DisplayRole) const override
Definition: SelfAuthModel.cpp:106
Q_INVOKABLE void startWorkflow()
Definition: SelfAuthModel.cpp:60
int rowCount(const QModelIndex &=QModelIndex()) const override
Definition: SelfAuthModel.cpp:100