123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- #ifndef PROJECTDIALOG_H
- #define PROJECTDIALOG_H
- #include <QDialog>
- #include <QHash>
- #include <QJsonArray>
- #include <QJsonObject>
- #include <QStandardItem>
- #include "../components/MultiSelectComboBox.h"
- #include "../regex.h"
- #include "hproject.h"
- namespace Ui {
- class ProjectDialog;
- }
- class ProjectDialog : public QDialog {
- Q_OBJECT
- public:
- explicit ProjectDialog(QWidget *parent = nullptr);
- ~ProjectDialog();
- void initComboBoxBlaster(const QJsonArray &bapoYuan);
- void initComboBoxOperator(const QJsonArray &anQuanYuanArray);
- void initComboBoxSafetyInspectors(const QJsonArray &safeGuardsArray);
- void SetL1AddressOptions(const QJsonArray &parentOptions);
- void setChildOptions(const QJsonArray &newChildOptions);
- void clearFormData();
- void setFormData(const HProject &Project);
- int getOperationType() const;
- void setOperationType(int newOperationType);
- private slots:
- void on_comboBoxAddr_currentIndexChanged(int index);
- void on_comboBoxAddr_2_currentIndexChanged(int index);
- signals:
- void createProject(const QMap<QString, QString> &data);
- void saveProject(const QMap<QString, QString> &data);
- private:
- void updateL2AddressOptions();
- void updateL3AddressOptions();
- void validateAndSaveProject();
- private:
- Ui::ProjectDialog *ui;
- QStringList selectedBlasters;
- QStringList selectedOperators;
- QStringList selectedSafetyInspectors;
- QJsonArray blasterArray;
- QJsonArray operatorArray;
- QJsonArray safeGuardsArray;
- QJsonArray dataOptions;
- QJsonArray parentOptions;
- QJsonArray childOptions;
- QJsonArray grandChildOptions;
- QJsonArray L1AddressOptions;
- QJsonArray L2AddressOptions;
- QJsonArray L3AddressOptions;
- int operationType;
- };
- #endif // PROJECTDIALOG_H
|