forked from blue/squawk
40 lines
660 B
C++
40 lines
660 B
C++
#ifndef SETTINGS_H
|
|
#define SETTINGS_H
|
|
|
|
#include <QWidget>
|
|
#include <QListWidgetItem>
|
|
#include <QScopedPointer>
|
|
#include <QSettings>
|
|
|
|
#include "shared/global.h"
|
|
|
|
namespace Ui
|
|
{
|
|
class Settings;
|
|
}
|
|
|
|
/**
|
|
* @todo write docs
|
|
*/
|
|
class Settings : public QWidget
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
Settings(QWidget* parent = nullptr);
|
|
~Settings();
|
|
|
|
public slots:
|
|
void apply();
|
|
void confirm();
|
|
|
|
protected slots:
|
|
void onCurrentPageChanged(QListWidgetItem* current);
|
|
void onVariableModified(const QString& key, const QVariant& value);
|
|
|
|
private:
|
|
QScopedPointer<Ui::Settings> m_ui;
|
|
std::map<QString, QVariant> modifiedSettings;
|
|
};
|
|
|
|
#endif // SETTINGS_H
|