AusweisApp2
 Alle Klassen Namensbereiche Dateien Funktionen Variablen Typdefinitionen Aufzählungen Aufzählungswerte Propertys Freundbeziehungen Makrodefinitionen
HistorySettings.h
gehe zur Dokumentation dieser Datei
1 
7 #pragma once
8 
9 #include "AbstractSettings.h"
10 
11 #include "EnumHelper.h"
12 #include "HistoryInfo.h"
13 
14 #include <QVector>
15 
16 
17 class test_HistorySettings;
18 
19 
20 namespace governikus
21 {
22 
23 defineEnumType(TimePeriod,
24  PAST_HOUR,
25  PAST_DAY,
26  PAST_WEEK,
27  LAST_FOUR_WEEKS,
28  ALL_HISTORY,
29  UNKNOWN
30  )
31 
32 class HistorySettings
33  : public AbstractSettings
34 {
35  Q_OBJECT
36  friend class AppSettings;
37  friend class ::test_HistorySettings;
38 
39  private:
40  QSharedPointer<QSettings> mStore;
41 
42  HistorySettings();
43 
44  public:
45  virtual ~HistorySettings() override;
46  virtual void save() override;
47 
48  bool isEnabled() const;
49  void setEnabled(bool pEnabled);
50 
51  QVector<HistoryInfo> getHistoryInfos() const;
52  void setHistoryInfos(const QVector<HistoryInfo>& pHistoryInfos);
53  void addHistoryInfo(const HistoryInfo& pHistoryInfo);
54  int deleteSettings(const QDateTime& pLatestToKeep = QDateTime());
55  int deleteSettings(const TimePeriod& pPeriodToRemove);
56 
57  Q_SIGNALS:
58  void fireEnabledChanged(bool pValue);
60 };
61 
62 
63 } /* namespace governikus */
void setEnabled(bool pEnabled)
void addHistoryInfo(const HistoryInfo &pHistoryInfo)
Definition: HistorySettings.cpp:110
virtual ~HistorySettings() override
Definition: HistorySettings.cpp:35
bool isEnabled() const
UNKNOWN
Definition: SelfAuthenticationData.h:32
QVector< HistoryInfo > getHistoryInfos() const
Definition: HistorySettings.cpp:62
void fireHistoryInfosChanged()
int deleteSettings(const QDateTime &pLatestToKeep=QDateTime())
Definition: HistorySettings.cpp:124
void fireEnabledChanged(bool pValue)
virtual void save() override
Represents a history entry, i.e.
Definition: HistoryInfo.h:21
void setHistoryInfos(const QVector< HistoryInfo > &pHistoryInfos)
Definition: HistorySettings.cpp:85
defineEnumType(UiModule, CURRENT, DEFAULT, IDENTIFY, SETTINGS, PINMANAGEMENT) defineEnumType(StatusFormat
UI modules that can be requested to show.
QSharedPointer< QSettings > mStore
Definition: HistorySettings.h:40