43 lines
1.1 KiB
C++
43 lines
1.1 KiB
C++
// settingsdialog.h — Settings dialog with category list
|
|
#pragma once
|
|
|
|
#include <QDialog>
|
|
#include <QListWidget>
|
|
#include <QStackedWidget>
|
|
#include <QPushButton>
|
|
#include <QLineEdit>
|
|
#include <QString>
|
|
|
|
class NetworkSettingsPage;
|
|
class DatabaseSettingsPage;
|
|
class StatusPage;
|
|
class NodesPage;
|
|
class SoundSettingsPage;
|
|
class DbManager;
|
|
class UtunNode;
|
|
|
|
class SettingsDialog : public QDialog {
|
|
Q_OBJECT
|
|
public:
|
|
explicit SettingsDialog(const QString& configPath, DbManager* db, UtunNode* node, QWidget* parent = nullptr);
|
|
|
|
private slots:
|
|
void onCategoryChanged(int row);
|
|
void onSave();
|
|
|
|
private:
|
|
void loadProfileFromConfig(const QString& path);
|
|
|
|
QString m_configPath;
|
|
QListWidget* m_categoryList;
|
|
QStackedWidget* m_pages;
|
|
QPushButton* m_saveBtn;
|
|
QLineEdit* m_nicknameEdit;
|
|
QString m_oldNickname;
|
|
NetworkSettingsPage* m_networkPage;
|
|
DatabaseSettingsPage* m_databasePage;
|
|
StatusPage* m_statusPage;
|
|
NodesPage* m_nodesPage;
|
|
SoundSettingsPage* m_soundPage;
|
|
};
|