You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
#ifndef SETTINGDLG_H
|
|
|
|
|
#define SETTINGDLG_H
|
|
|
|
|
|
|
|
|
|
#include <QWidget>
|
|
|
|
|
#include <QLabel>
|
|
|
|
|
#include <QCheckBox>
|
|
|
|
|
#include <QLineEdit>
|
|
|
|
|
#include <QComboBox>
|
|
|
|
|
#include <QGroupBox>
|
|
|
|
|
#include <QPushButton>
|
|
|
|
|
|
|
|
|
|
#include "common.h"
|
|
|
|
|
#include "nlohmann/json.hpp"
|
|
|
|
|
using namespace nlohmann;
|
|
|
|
|
namespace Ui {
|
|
|
|
|
class SettingDlg;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class SettingWgt : public QWidget
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
explicit SettingWgt(QWidget *parent = nullptr);
|
|
|
|
|
~SettingWgt();
|
|
|
|
|
void loadConfig();
|
|
|
|
|
|
|
|
|
|
signals:
|
|
|
|
|
void SettingFinishSig();
|
|
|
|
|
|
|
|
|
|
private slots:
|
|
|
|
|
void onCheckBoxStateChanged(int index);
|
|
|
|
|
void SelectPathButton_clicked(int index, bool isRework);
|
|
|
|
|
void on_pushButton_ok_clicked();
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
void initUI();
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
Ui::SettingDlg *ui;
|
|
|
|
|
QVector<QCheckBox*> m_selectCheckBoxes;
|
|
|
|
|
QVector<QLineEdit*> m_snFormatLineEdits;
|
|
|
|
|
QVector<QComboBox*> m_modeComboBoxes;
|
|
|
|
|
QMap<int, QPair<QLineEdit*, QLineEdit*>> m_workPathLineEdits;
|
|
|
|
|
QMap<int, ProductConfig> m_productsCfg;
|
|
|
|
|
QMap<int, ModeConfig> m_workmodesCfg;
|
|
|
|
|
uint m_productNums;
|
|
|
|
|
uint m_workModeNums;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif // SETTINGDLG_H
|