AusweisApp2/src/settings/GeneralSettings.h

88 lines
2.0 KiB
C
Raw Normal View History

2017-07-03 09:30:10 +02:00
/*!
* \brief Contains the definition of the GeneralSettings class.
*
2018-03-28 15:10:51 +02:00
* \copyright Copyright (c) 2014-2018 Governikus GmbH & Co. KG, Germany
2017-07-03 09:30:10 +02:00
*/
#pragma once
#include "AbstractSettings.h"
#include <QFuture>
2017-12-20 14:54:05 +01:00
#include <QUuid>
2017-07-03 09:30:10 +02:00
class test_GeneralSettings;
namespace governikus
{
2017-12-20 14:54:05 +01:00
#if defined(Q_OS_WIN) || defined(Q_OS_MACOS)
#define GENERAL_SETTINGS_DEFAULT_AUTOSTART true
2017-07-03 09:30:10 +02:00
#else
2017-12-20 14:54:05 +01:00
#define GENERAL_SETTINGS_DEFAULT_AUTOSTART false
2017-07-03 09:30:10 +02:00
#endif
2017-12-20 14:54:05 +01:00
2017-07-03 09:30:10 +02:00
class GeneralSettings
: public AbstractSettings
{
Q_OBJECT
friend class AppSettings;
2017-09-15 10:23:30 +02:00
friend class ::test_GeneralSettings;
2017-07-03 09:30:10 +02:00
friend bool operator==(const GeneralSettings& pLeft, const GeneralSettings& pRight);
private:
QFuture<bool> mAutoStart;
2017-12-20 14:54:05 +01:00
QSharedPointer<QSettings> mStoreGeneral;
QSharedPointer<QSettings> mStoreCommon;
2017-07-03 09:30:10 +02:00
GeneralSettings();
public:
2017-12-20 14:54:05 +01:00
virtual ~GeneralSettings() override;
2017-07-03 09:30:10 +02:00
virtual void save() override;
bool isAutoStart() const;
void setAutoStart(bool pAutoStart);
2017-12-20 14:54:05 +01:00
const QString getPersistentSettingsVersion() const;
QString getSkipVersion();
void skipVersion(const QString& pVersion);
bool isAutoCloseWindowAfterAuthentication() const;
void setAutoCloseWindowAfterAuthentication(bool pAutoClose);
2017-07-03 09:30:10 +02:00
bool isShowSetupAssistant() const;
void setShowSetupAssistant(bool pShowSetupAssistant);
bool isRemindUserToClose() const;
void setRemindUserToClose(bool pRemindUser);
bool isTransportPinReminder() const;
void setTransportPinReminder(bool pTransportPinReminder);
bool isDeveloperMode() const;
void setDeveloperMode(bool pEnabled);
2017-12-20 14:54:05 +01:00
bool useSelfAuthTestUri() const;
2017-07-03 09:30:10 +02:00
void setUseSelfauthenticationTestUri(bool pUse);
2017-12-20 14:54:05 +01:00
QLocale::Language getLanguage() const;
void setLanguage(const QLocale::Language pLanguage);
2017-07-03 09:30:10 +02:00
2017-12-20 14:54:05 +01:00
bool isAutoUpdateCheck() const;
void setAutoUpdateCheck(bool pAutoUpdateCheck);
bool isUseScreenKeyboard() const;
void setUseScreenKeyboard(bool pUseScreenKeyboard);
2018-03-28 15:10:51 +02:00
QString getLastReaderPluginType() const;
void setLastReaderPluginType(const QString& pLastReaderPluginType);
2017-12-20 14:54:05 +01:00
};
2017-07-03 09:30:10 +02:00
} /* namespace governikus */