2021-04-17 23:17:22 +08:00
|
|
|
#ifndef SETTINGSDIALOG_H
|
|
|
|
#define SETTINGSDIALOG_H
|
|
|
|
|
|
|
|
#include <QAbstractItemModel>
|
|
|
|
#include <QDialog>
|
|
|
|
#include <QStandardItemModel>
|
|
|
|
|
|
|
|
class SettingsWidget;
|
|
|
|
namespace Ui {
|
|
|
|
class SettingsDialog;
|
|
|
|
}
|
|
|
|
|
|
|
|
class CompilerSetOptionWidget;
|
2021-06-07 11:02:03 +08:00
|
|
|
class EditorGeneralWidget;
|
2021-06-08 21:41:42 +08:00
|
|
|
class EditorFontWidget;
|
2021-06-12 22:36:23 +08:00
|
|
|
class EditorClipboardWidget;
|
2021-06-21 16:25:21 +08:00
|
|
|
class EditorSymbolCompletionWidget;
|
2021-06-17 10:39:46 +08:00
|
|
|
class EditorColorSchemeWidget;
|
2021-06-25 12:40:11 +08:00
|
|
|
class EditorSyntaxCheckWidget;
|
2021-08-30 16:59:08 +08:00
|
|
|
class EditorCodeCompletionWidget;
|
2021-08-30 22:05:45 +08:00
|
|
|
class EditorAutoSaveWidget;
|
2021-08-30 18:36:44 +08:00
|
|
|
class EditorMiscWidget;
|
2021-06-18 21:48:40 +08:00
|
|
|
class EnvironmentAppearenceWidget;
|
2021-07-01 19:44:38 +08:00
|
|
|
class ExecutorGeneralWidget;
|
2021-08-01 23:24:37 +08:00
|
|
|
class DebugGeneralWidget;
|
2021-04-17 23:17:22 +08:00
|
|
|
class SettingsWidget;
|
|
|
|
class SettingsDialog : public QDialog
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
enum {
|
|
|
|
GetWidgetIndexRole = Qt::UserRole + 1
|
|
|
|
};
|
|
|
|
explicit SettingsDialog(QWidget *parent = nullptr);
|
|
|
|
~SettingsDialog();
|
|
|
|
|
|
|
|
void addWidget(SettingsWidget* pWidget);
|
|
|
|
private slots:
|
|
|
|
void widget_settings_changed(bool value);
|
|
|
|
void on_widgetsView_clicked(const QModelIndex &index);
|
|
|
|
|
2021-04-18 00:08:01 +08:00
|
|
|
void on_btnCancle_pressed();
|
|
|
|
|
|
|
|
void on_btnApply_pressed();
|
|
|
|
|
|
|
|
void on_btnOk_pressed();
|
|
|
|
private:
|
|
|
|
void saveCurrentPageSettings(bool confirm);
|
2021-04-17 23:17:22 +08:00
|
|
|
private:
|
|
|
|
Ui::SettingsDialog *ui;
|
|
|
|
QList<SettingsWidget*> mSettingWidgets;
|
|
|
|
QStandardItemModel model;
|
|
|
|
|
2021-08-01 23:24:37 +08:00
|
|
|
CompilerSetOptionWidget *pCompilerSetOptionWidget;
|
|
|
|
EditorGeneralWidget *pEditorGeneralWidget;
|
|
|
|
EditorFontWidget *pEditorFontWidget;
|
2021-06-12 22:36:23 +08:00
|
|
|
EditorClipboardWidget *pEditorClipboardWidget;
|
2021-06-17 10:39:46 +08:00
|
|
|
EditorColorSchemeWidget *pEditorColorSchemeWidget;
|
2021-08-01 23:24:37 +08:00
|
|
|
EnvironmentAppearenceWidget *pEnvironmentAppearenceWidget;
|
|
|
|
EditorSymbolCompletionWidget *pEditorSymbolCompletionWidget;
|
2021-08-30 16:59:08 +08:00
|
|
|
EditorCodeCompletionWidget *pEditorCodeCompletionWidget;
|
2021-08-01 23:24:37 +08:00
|
|
|
EditorSyntaxCheckWidget *pEditorSyntaxCheckWidget;
|
2021-08-30 22:05:45 +08:00
|
|
|
EditorAutoSaveWidget *pEditorAutoSaveWidget;
|
2021-08-30 18:36:44 +08:00
|
|
|
EditorMiscWidget *pEditorMiscWidget;
|
2021-08-01 23:24:37 +08:00
|
|
|
ExecutorGeneralWidget *pExecutorGeneralWidget;
|
|
|
|
DebugGeneralWidget *pDebugGeneralWidget;
|
2021-04-17 23:17:22 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // SETTINGSDIALOG_H
|