RedPanda-CPP/RedPandaIDE/settingsdialog/settingsdialog.h

62 lines
1.5 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 PCompilerSet;
2021-04-17 23:17:22 +08:00
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;
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);
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;
EditorFontWidget* pEditorFontWidget;
EditorClipboardWidget *pEditorClipboardWidget;
2021-06-17 10:39:46 +08:00
EditorColorSchemeWidget *pEditorColorSchemeWidget;
2021-06-18 21:48:40 +08:00
EnvironmentAppearenceWidget* pEnvironmentAppearenceWidget;
EditorSymbolCompletionWidget* pEditorSymbolCompletionWidget;
2021-06-25 12:40:11 +08:00
EditorSyntaxCheckWidget* pEditorSyntaxCheckWidget;
2021-04-17 23:17:22 +08:00
};
#endif // SETTINGSDIALOG_H