forked from blue/squawk
45 lines
767 B
C++
45 lines
767 B
C++
#ifndef SETTINGS_H
|
|
#define SETTINGS_H
|
|
|
|
#include <QWidget>
|
|
#include <QListWidgetItem>
|
|
#include <QScopedPointer>
|
|
#include <QSettings>
|
|
#include <QDir>
|
|
|
|
#include "shared/global.h"
|
|
#include "shared/pathcheck.h"
|
|
|
|
namespace Ui
|
|
{
|
|
class Settings;
|
|
}
|
|
|
|
/**
|
|
* @todo write docs
|
|
*/
|
|
class Settings : public QWidget
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
Settings(QWidget* parent = nullptr);
|
|
~Settings();
|
|
|
|
signals:
|
|
void changeDownloadsPath(const QString& path);
|
|
|
|
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
|