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  QSharedPointer<SelfAuthContext> mContext;
30 
31  private Q_SLOTS:
32  void onSelfAuthenticationDataChanged();
33 
34  protected:
35  SelfAuthModel(QObject* pParent = nullptr);
36  static SelfAuthModel& getInstance();
37 
38  public:
39  enum DataRoles
40  {
41  NAME = Qt::UserRole + 1,
42  VALUE
43  };
44 
45  void resetContext(const QSharedPointer<SelfAuthContext>& pContext = QSharedPointer<SelfAuthContext>());
46 
47  Q_INVOKABLE void startWorkflow();
48  Q_INVOKABLE void cancelWorkflow();
49  Q_INVOKABLE bool isBasicReader();
50  Q_INVOKABLE void exportData(const QUrl& pFilename) const;
51 
52  int rowCount(const QModelIndex& = QModelIndex()) const override;
53  QVariant data(const QModelIndex& pIndex, int pRole = Qt::DisplayRole) const override;
54  QHash<int, QByteArray> roleNames() const override;
55 
56  virtual bool event(QEvent* pEvent) override;
57 
58  Q_SIGNALS:
59  void fireStartWorkflow();
60 
61 };
62 
63 
64 } // namespace governikus
governikus::PdfExporter::exportSelfInfo
bool exportSelfInfo(const QDateTime &pDate, const QVector< QPair< QString, QString >> &pInfoData)
Definition: PdfExporter.cpp:149
SelfAuthModel.h
governikus::SelfAuthModel::VALUE
@ VALUE
Definition: SelfAuthModel.h:42
governikus::SelfAuthModel::DataRoles
DataRoles
Definition: SelfAuthModel.h:40
governikus::SelfAuthModel::exportData
Q_INVOKABLE void exportData(const QUrl &pFilename) const
Definition: SelfAuthModel.cpp:96
governikus::SelfAuthModel::NAME
@ NAME
Definition: SelfAuthModel.h:41
defineSingleton
defineSingleton(SelfAuthModel) void SelfAuthModel
Definition: SelfAuthModel.cpp:14
governikus::SelfAuthModel::rowCount
int rowCount(const QModelIndex &=QModelIndex()) const override
Definition: SelfAuthModel.cpp:110
governikus::PdfExporter
Definition: PdfExporter.h:19
governikus::SelfAuthModel::SelfAuthModel
SelfAuthModel(QObject *pParent=nullptr)
Definition: SelfAuthModel.cpp:44
governikus::SelfAuthModel::data
QVariant data(const QModelIndex &pIndex, int pRole=Qt::DisplayRole) const override
Definition: SelfAuthModel.cpp:116
governikus::SelfAuthModel::resetContext
void resetContext(const QSharedPointer< SelfAuthContext > &pContext=QSharedPointer< SelfAuthContext >())
Definition: SelfAuthModel.cpp:59
governikus::SelfAuthModel::startWorkflow
Q_INVOKABLE void startWorkflow()
Definition: SelfAuthModel.cpp:70
governikus::Env
Definition: Env.h:39
governikus::SelfAuthContext::fireSelfAuthenticationDataChanged
void fireSelfAuthenticationDataChanged()
Definition: moc_SelfAuthContext.cpp:130
PdfExporter.h
governikus::SelfAuthModel::event
virtual bool event(QEvent *pEvent) override
Definition: SelfAuthModel.cpp:143
governikus::SelfAuthModel::cancelWorkflow
Q_INVOKABLE void cancelWorkflow()
Definition: SelfAuthModel.cpp:76
governikus
Implementation of ActivationContext for Intent based activation on Android systems.
Definition: ActivationContext.h:15
governikus::SelfAuthModel::isBasicReader
Q_INVOKABLE bool isBasicReader()
Definition: SelfAuthModel.cpp:85
SelfAuthContext.h
governikus::SelfAuthenticationData::OrderedSelfData
QVector< QPair< QString, QString > > OrderedSelfData
Definition: SelfAuthenticationData.h:61
Env.h
governikus::SelfAuthModel::getInstance
static SelfAuthModel & getInstance()
Definition: SelfAuthModel.cpp:53
governikus::SelfAuthModel::roleNames
QHash< int, QByteArray > roleNames() const override
Definition: SelfAuthModel.cpp:134
governikus::SelfAuthModel
Definition: SelfAuthModel.h:24
governikus::SelfAuthModel::fireStartWorkflow
void fireStartWorkflow()
Definition: moc_SelfAuthModel.cpp:161
SelfAuthenticationData.h
SingletonHelper.h