aboutsummaryrefslogtreecommitdiff
path: root/launcher/settings/Setting.h
diff options
context:
space:
mode:
authorSefa Eyeoglu <contact@scrumplex.net>2023-08-02 18:35:35 +0200
committerSefa Eyeoglu <contact@scrumplex.net>2023-08-02 18:35:35 +0200
commit1d468ac35ad88d8c77cc83f25e3704d9bd7df01b (patch)
tree8644b1574c947a1a87c5c7b2567f746cfe17882f /launcher/settings/Setting.h
parentce2ca1381519a2e261d7f76dffa874d559d979c2 (diff)
downloadPrismLauncher-1d468ac35ad88d8c77cc83f25e3704d9bd7df01b.tar.gz
PrismLauncher-1d468ac35ad88d8c77cc83f25e3704d9bd7df01b.tar.bz2
PrismLauncher-1d468ac35ad88d8c77cc83f25e3704d9bd7df01b.zip
chore: reformat
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
Diffstat (limited to 'launcher/settings/Setting.h')
-rw-r--r--launcher/settings/Setting.h31
1 files changed, 11 insertions, 20 deletions
diff --git a/launcher/settings/Setting.h b/launcher/settings/Setting.h
index 86007c13..44b35037 100644
--- a/launcher/settings/Setting.h
+++ b/launcher/settings/Setting.h
@@ -16,8 +16,8 @@
#pragma once
#include <QObject>
-#include <QVariant>
#include <QStringList>
+#include <QVariant>
#include <memory>
class SettingsObject;
@@ -25,10 +25,9 @@ class SettingsObject;
/*!
*
*/
-class Setting : public QObject
-{
+class Setting : public QObject {
Q_OBJECT
-public:
+ public:
/**
* Construct a Setting
*
@@ -47,10 +46,7 @@ public:
* undefined behavior.
* \return The ID of the setting.
*/
- virtual QString id() const
- {
- return m_synonyms.first();
- }
+ virtual QString id() const { return m_synonyms.first(); }
/*!
* \brief Gets this setting's config file key.
@@ -58,10 +54,7 @@ public:
* the same as the setting's ID, but it can be different.
* \return The setting's config file key.
*/
- virtual QStringList configKeys() const
- {
- return m_synonyms;
- }
+ virtual QStringList configKeys() const { return m_synonyms; }
/*!
* \brief Gets this setting's value as a QVariant.
@@ -78,22 +71,21 @@ public:
*/
virtual QVariant defValue() const;
-signals:
+ signals:
/*!
* \brief Signal emitted when this Setting object's value changes.
* \param setting A reference to the Setting that changed.
* \param value This Setting object's new value.
*/
- void SettingChanged(const Setting &setting, QVariant value);
+ void SettingChanged(const Setting& setting, QVariant value);
/*!
* \brief Signal emitted when this Setting object's value resets to default.
* \param setting A reference to the Setting that changed.
*/
- void settingReset(const Setting &setting);
+ void settingReset(const Setting& setting);
-public
-slots:
+ public slots:
/*!
* \brief Changes the setting's value.
* This is done by emitting the SettingChanged() signal which will then be
@@ -109,10 +101,9 @@ slots:
*/
virtual void reset();
-protected:
+ protected:
friend class SettingsObject;
- SettingsObject * m_storage;
+ SettingsObject* m_storage;
QStringList m_synonyms;
QVariant m_defVal;
};
-