60 lines
1.7 KiB
C++
60 lines
1.7 KiB
C++
// settingsdialog.h — Settings dialog with category list
|
|
#pragma once
|
|
|
|
#include <QDialog>
|
|
#include <QListWidget>
|
|
#include <QStackedWidget>
|
|
#include <QPushButton>
|
|
#include <QLineEdit>
|
|
#include <QComboBox>
|
|
#include <QCheckBox>
|
|
#include <QString>
|
|
|
|
class NetworkSettingsPage;
|
|
class DatabaseSettingsPage;
|
|
class StatusPage;
|
|
class NodesPage;
|
|
class ConnMonitorWindow;
|
|
class SoundSettingsPage;
|
|
class AudioDeviceSettingsPage;
|
|
class StorageSettingsPage;
|
|
class RadioSettingsPage;
|
|
class DbManager;
|
|
class UtunNode;
|
|
class AudioRecorder;
|
|
|
|
class SettingsDialog : public QDialog {
|
|
Q_OBJECT
|
|
public:
|
|
explicit SettingsDialog(const QString& configPath, DbManager* db, UtunNode* node,
|
|
AudioRecorder* recorder, QWidget* parent = nullptr);
|
|
|
|
private slots:
|
|
void onCategoryChanged(int row);
|
|
void onSave();
|
|
void onOpenConnMonitor();
|
|
|
|
private:
|
|
void loadProfileFromConfig(const QString& path);
|
|
|
|
QString m_configPath;
|
|
QListWidget* m_categoryList;
|
|
QStackedWidget* m_pages;
|
|
QPushButton* m_saveBtn;
|
|
QLineEdit* m_nicknameEdit;
|
|
QComboBox* m_sortCombo;
|
|
QComboBox* m_languageCombo;
|
|
QComboBox* m_joinPolicyCombo;
|
|
QCheckBox* m_autoConnectCheck;
|
|
QString m_oldNickname;
|
|
NetworkSettingsPage* m_networkPage;
|
|
DatabaseSettingsPage* m_databasePage;
|
|
StatusPage* m_statusPage;
|
|
NodesPage* m_nodesPage;
|
|
ConnMonitorWindow* m_connMonitorWindow = nullptr;
|
|
SoundSettingsPage* m_soundPage;
|
|
AudioDeviceSettingsPage* m_audioDevicePage;
|
|
StorageSettingsPage* m_storagePage;
|
|
RadioSettingsPage* m_radioPage;
|
|
};
|