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;
|
|
|
|
}
|
|
|
|
|
2021-06-21 16:25:21 +08:00
|
|
|
class PCompilerSet;
|
2021-04-17 23:17:22 +08:00
|
|
|
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-06-18 21:48:40 +08:00
|
|
|
class EnvironmentAppearenceWidget;
|
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;
|
|
|
|
|
|
|
|
CompilerSetOptionWidget* pCompilerSetOptionWidget;
|
2021-06-07 11:02:03 +08:00
|
|
|
EditorGeneralWidget* pEditorGeneralWidget;
|
2021-06-08 21:41:42 +08:00
|
|
|
EditorFontWidget* pEditorFontWidget;
|
2021-06-12 22:36:23 +08:00
|
|
|
EditorClipboardWidget *pEditorClipboardWidget;
|
2021-06-17 10:39:46 +08:00
|
|
|
EditorColorSchemeWidget *pEditorColorSchemeWidget;
|
2021-06-18 21:48:40 +08:00
|
|
|
EnvironmentAppearenceWidget* pEnvironmentAppearenceWidget;
|
2021-06-21 16:25:21 +08:00
|
|
|
EditorSymbolCompletionWidget* pEditorSymbolCompletionWidget;
|
2021-06-25 12:40:11 +08:00
|
|
|
EditorSyntaxCheckWidget* pEditorSyntaxCheckWidget;
|
2021-04-17 23:17:22 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // SETTINGSDIALOG_H
|