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,
41  VALUE
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:
59 };
60 
61 
62 } // namespace governikus
governikus::PdfExporter::exportSelfInfo
bool exportSelfInfo(const QDateTime &pDate, const QVector< QPair< QString, QString >> &pInfoData)
Definition: PdfExporter.cpp:160
SelfAuthModel.h
governikus::SelfAuthModel::VALUE
@ VALUE
Definition: SelfAuthModel.h:41
governikus::SelfAuthModel::DataRoles
DataRoles
Definition: SelfAuthModel.h:39
governikus::SelfAuthModel::exportData
Q_INVOKABLE void exportData(const QUrl &pFilename) const
Definition: SelfAuthModel.cpp:86
governikus::SelfAuthModel::NAME
@ NAME
Definition: SelfAuthModel.h:40
governikus::SelfAuthModel::rowCount
int rowCount(const QModelIndex &=QModelIndex()) const override
Definition: SelfAuthModel.cpp:100
governikus::PdfExporter
Definition: PdfExporter.h:19
governikus::SelfAuthModel::isBasicReader
Q_INVOKABLE bool isBasicReader() const
Definition: SelfAuthModel.cpp:75
governikus::SelfAuthModel::data
QVariant data(const QModelIndex &pIndex, int pRole=Qt::DisplayRole) const override
Definition: SelfAuthModel.cpp:106
governikus::SelfAuthModel::resetContext
void resetContext(const QSharedPointer< SelfAuthContext > &pContext=QSharedPointer< SelfAuthContext >())
Definition: SelfAuthModel.cpp:49
governikus::SelfAuthModel::startWorkflow
Q_INVOKABLE void startWorkflow()
Definition: SelfAuthModel.cpp:60
governikus::Env
Definition: Env.h:44
governikus::SelfAuthContext::fireSelfAuthenticationDataChanged
void fireSelfAuthenticationDataChanged()
PdfExporter.h
governikus::SelfAuthModel::event
bool event(QEvent *pEvent) override
Definition: SelfAuthModel.cpp:133
governikus::SelfAuthModel::cancelWorkflow
Q_INVOKABLE void cancelWorkflow()
Definition: SelfAuthModel.cpp:66
governikus
Implementation of ActivationContext for Intent based activation on Android systems.
Definition: ActivationContext.h:15
SelfAuthContext.h
governikus::SelfAuthenticationData::OrderedSelfData
QVector< QPair< QString, QString > > OrderedSelfData
Definition: SelfAuthenticationData.h:61
Env.h
governikus::SelfAuthModel::roleNames
QHash< int, QByteArray > roleNames() const override
Definition: SelfAuthModel.cpp:124
governikus::SelfAuthModel
Definition: SelfAuthModel.h:24
governikus::SelfAuthModel::fireStartWorkflow
void fireStartWorkflow()
SelfAuthenticationData.h