AusweisApp2/src/settings/HistorySettings.h

53 lines
968 B
C
Raw Normal View History

2017-07-03 09:30:10 +02:00
/*!
* \brief Represents history settings.
*
2017-12-20 14:54:05 +01:00
* \copyright Copyright (c) 2015-2017 Governikus GmbH & Co. KG, Germany
2017-07-03 09:30:10 +02:00
*/
#pragma once
#include "AbstractSettings.h"
2017-12-20 14:54:05 +01:00
#include "HistoryInfo.h"
2017-07-03 09:30:10 +02:00
#include <QVector>
2017-12-20 14:54:05 +01:00
2017-07-03 09:30:10 +02:00
class test_HistorySettings;
2017-12-20 14:54:05 +01:00
namespace governikus
2017-07-03 09:30:10 +02:00
{
class HistorySettings
: public AbstractSettings
{
Q_OBJECT
friend class AppSettings;
2017-09-15 10:23:30 +02:00
friend class ::test_HistorySettings;
2017-07-03 09:30:10 +02:00
private:
2017-12-20 14:54:05 +01:00
QSharedPointer<QSettings> mStore;
2017-07-03 09:30:10 +02:00
HistorySettings();
public:
2017-12-20 14:54:05 +01:00
virtual ~HistorySettings() override;
2017-07-03 09:30:10 +02:00
virtual void save() override;
bool isEnabled() const;
void setEnabled(bool pEnabled);
2017-12-20 14:54:05 +01:00
QVector<HistoryInfo> getHistoryInfos() const;
void setHistoryInfos(const QVector<HistoryInfo>& pHistoryInfos);
void addHistoryInfo(const HistoryInfo& pHistoryInfo);
void deleteSettings(const QDateTime& pLatestToKeep = QDateTime());
2017-07-03 09:30:10 +02:00
Q_SIGNALS:
2017-12-20 14:54:05 +01:00
void fireEnabledChanged(bool pValue);
void fireHistoryInfosChanged();
2017-07-03 09:30:10 +02:00
};
} /* namespace governikus */