Files
sqlitebrowser/src/Settings.h
Martin Kleusberg f1194d845e Rename all the settings accessor functions
Rename the settings accessor functions from Settings::getSettingsValue()
(and similar) to Settings::getValue() (and similar). The 'Settings' bit
seems a bit redundant and costs a lot of screen space.
2017-03-20 23:16:52 +01:00

27 lines
763 B
C++

#ifndef SETTINGS_H
#define SETTINGS_H
#include <QApplication>
#include <QVariant>
#include <QHash>
class Settings
{
friend class PreferencesDialog;
public:
static QVariant getValue(const QString& group, const QString& name);
static void setValue(const QString& group, const QString& name, const QVariant& value, bool dont_save_to_disk = false);
private:
Settings() { } // class is fully static
// This works similar to getSettingsValue but returns the default value instead of the value set by the user
static QVariant getDefaultValue(const QString& group, const QString& name);
// Cache for storing the settings to avoid repeatedly reading the settings file all the time
static QHash<QString, QVariant> m_hCache;
};
#endif