squawk/ui/widgets/settings/settings.h

45 lines
767 B
C
Raw Normal View History

2022-01-16 19:54:57 +00:00
#ifndef SETTINGS_H
#define SETTINGS_H
#include <QWidget>
#include <QListWidgetItem>
2022-01-16 19:54:57 +00:00
#include <QScopedPointer>
2022-01-21 19:02:50 +00:00
#include <QSettings>
2022-02-19 18:31:49 +00:00
#include <QDir>
2022-01-21 19:02:50 +00:00
#include "shared/global.h"
2022-02-19 18:31:49 +00:00
#include "shared/pathcheck.h"
2022-01-16 19:54:57 +00:00
namespace Ui
{
class Settings;
}
/**
* @todo write docs
*/
class Settings : public QWidget
{
Q_OBJECT
public:
Settings(QWidget* parent = nullptr);
~Settings();
2022-02-19 18:31:49 +00:00
signals:
void changeDownloadsPath(const QString& path);
2022-01-21 19:02:50 +00:00
public slots:
void apply();
void confirm();
protected slots:
void onCurrentPageChanged(QListWidgetItem* current);
2022-01-21 19:02:50 +00:00
void onVariableModified(const QString& key, const QVariant& value);
2022-01-16 19:54:57 +00:00
private:
QScopedPointer<Ui::Settings> m_ui;
2022-01-21 19:02:50 +00:00
std::map<QString, QVariant> modifiedSettings;
2022-01-16 19:54:57 +00:00
};
#endif // SETTINGS_H