AusweisApp2
Lade ...
Suche ...
Keine Treffer
HistorySettings.h
gehe zur Dokumentation dieser Datei
1
9#pragma once
10
11#include "AbstractSettings.h"
12
13#include "EnumHelper.h"
14#include "HistoryInfo.h"
15
16#include <QVector>
17
18
19class test_HistorySettings;
20
21
22namespace governikus
23{
24
25defineEnumType(TimePeriod,
26 PAST_HOUR,
27 PAST_DAY,
28 PAST_WEEK,
29 LAST_FOUR_WEEKS,
30 ALL_HISTORY,
32 )
33
34class HistorySettings
35 : public AbstractSettings
36{
37 Q_OBJECT
38 friend class AppSettings;
39
40 private:
41 QSharedPointer<QSettings> mStore;
42 QVector<HistoryInfo> mHistoryInfos;
43
44 HistorySettings();
45 [[nodiscard]] QVector<HistoryInfo> getHistoryInfosFromStore() const;
46
47 public:
48 ~HistorySettings() override = default;
49
50 [[nodiscard]] bool isEnabled() const;
51 void setEnabled(bool pEnabled);
52
53 [[nodiscard]] const QVector<HistoryInfo>& getHistoryInfos() const;
54 void setHistoryInfos(const QVector<HistoryInfo>& pHistoryInfos);
55 void addHistoryInfo(const HistoryInfo& pHistoryInfo);
56 int deleteSettings(const QDateTime& pLatestToKeep = QDateTime());
57 int deleteSettings(const TimePeriod& pPeriodToRemove);
58
59 Q_SIGNALS:
60 void fireEnabledChanged(bool pValue);
61 void fireHistoryInfosChanged();
62};
63
64
65} // namespace governikus
#define defineEnumType(enumName,...)
Definition EnumHelper.h:98
Implementation of GeneralAuthenticate response APDUs.
Definition CommandApdu.h:16
UNKNOWN
Definition ResponseApdu.h:63