62 lines
1.6 KiB
C++
62 lines
1.6 KiB
C++
#ifndef PROJECTSETTINGSDIALOG_H
|
|
#define PROJECTSETTINGSDIALOG_H
|
|
|
|
#include <QDialog>
|
|
#include <QComboBox>
|
|
#include <QPushButton>
|
|
#include <QVBoxLayout>
|
|
#include <QHBoxLayout>
|
|
#include <QGridLayout>
|
|
#include <QLabel>
|
|
#include <QStringList>
|
|
#include <QGroupBox>
|
|
#include <QTabWidget>
|
|
#include "../model/projectsettingsmodel.h"
|
|
#include "../model/designatormappingmodel.h"
|
|
|
|
class ProjectSettingsDialog : public QDialog
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit ProjectSettingsDialog(ProjectSettingsModel *settingsModel,
|
|
DesignatorMappingModel *mappingModel = nullptr,
|
|
QWidget *parent = nullptr);
|
|
|
|
// Методы для получения настроек
|
|
QString getCurrentVariant() const;
|
|
|
|
private slots:
|
|
void onVariantChanged(const QString &variant);
|
|
void onAvailableVariantsChanged();
|
|
void onResetToDefaults();
|
|
void onSaveSettings();
|
|
|
|
private:
|
|
void setUp();
|
|
void setWidgets();
|
|
void setUpLayout();
|
|
void setUpConnections();
|
|
void createDesignatorMappingTab();
|
|
|
|
ProjectSettingsModel *m_settingsModel;
|
|
DesignatorMappingModel *m_mappingModel;
|
|
|
|
// Виджеты для варианта
|
|
QComboBox *m_variantComboBox;
|
|
|
|
// Виджеты для настроек столбцов (убрано)
|
|
|
|
// Кнопки
|
|
QPushButton *m_okButton;
|
|
QPushButton *m_cancelButton;
|
|
QPushButton *m_resetButton;
|
|
QPushButton *m_saveButton;
|
|
|
|
// Вкладки
|
|
QTabWidget *m_tabWidget;
|
|
|
|
// Статические константы
|
|
static const QString DEFAULT_VARIANT;
|
|
};
|
|
|
|
#endif // PROJECTSETTINGSDIALOG_H
|