33 lines
1.0 KiB
C++
Executable File
33 lines
1.0 KiB
C++
Executable File
#ifndef CONFIGSETTINGS_H
|
|
#define CONFIGSETTINGS_H
|
|
|
|
#include <QString>
|
|
#include <QSettings>
|
|
#include <QVector>
|
|
#include <QStringList>
|
|
|
|
class ConfigSettings
|
|
{
|
|
protected:
|
|
ConfigSettings() = default;
|
|
virtual ~ConfigSettings();
|
|
|
|
public:
|
|
void initFilename(const QString &fileName);
|
|
int getInteger(const QString &a_group, const QString &a_key, const int &defaultValue);
|
|
QVector<int> getIntegerVector(const QString &a_group, const QString &a_key);
|
|
QMap<int, bool> getBoolMap(const QString &a_group, const QString &a_key);
|
|
QString getString(const QString &a_group, const QString &a_key, const QString &defaultValue);
|
|
double getFloat(const QString &a_group, const QString &a_key, const double &defaultValue);
|
|
QVector<double> getFloatVector(const QString &a_group, const QString &a_key);
|
|
bool existsGroup(const QString &a_group);
|
|
QStringList getKeys(const QString &a_group);
|
|
bool existsKey(const QString &a_group, const QString &a_key);
|
|
|
|
private:
|
|
QSettings *m_settings = nullptr;
|
|
|
|
};
|
|
|
|
#endif // CONFIGSETTINGS_H
|