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-04-17 23:17:22 +08:00
|
|
|
class PCompilerSet;
|
|
|
|
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-04-17 23:17:22 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // SETTINGSDIALOG_H
|