RedPanda-CPP/RedPandaIDE/settingsdialog/settingsdialog.h

71 lines
1.9 KiB
C
Raw Normal View History

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;
class EditorFontWidget;
class EditorClipboardWidget;
class EditorSymbolCompletionWidget;
2021-06-17 10:39:46 +08:00
class EditorColorSchemeWidget;
2021-06-25 12:40:11 +08:00
class EditorSyntaxCheckWidget;
class EditorCodeCompletionWidget;
2021-08-30 22:05:45 +08:00
class EditorAutoSaveWidget;
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);
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;
EditorClipboardWidget *pEditorClipboardWidget;
2021-06-17 10:39:46 +08:00
EditorColorSchemeWidget *pEditorColorSchemeWidget;
2021-08-01 23:24:37 +08:00
EnvironmentAppearenceWidget *pEnvironmentAppearenceWidget;
EditorSymbolCompletionWidget *pEditorSymbolCompletionWidget;
EditorCodeCompletionWidget *pEditorCodeCompletionWidget;
2021-08-01 23:24:37 +08:00
EditorSyntaxCheckWidget *pEditorSyntaxCheckWidget;
2021-08-30 22:05:45 +08:00
EditorAutoSaveWidget *pEditorAutoSaveWidget;
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