#ifndef MACROSSETTING_H #define MACROSSETTING_H #include #include "unioncom.h" #include "QLineEdit" #include "QCheckBox" #include "QSpinBox" #include "QComboBox" namespace Ui { class MacrosSetting; } class MacrosSetting : public QDialog { Q_OBJECT public: // struct mcrs_stgs_kit{ // Qt::CheckState IsHEX; // QString Name; // QString Mcrs; // } MacrosWindow[15]; struct MacrosSrting{ QCheckBox *EID; QLineEdit *ID; QCheckBox *RTR; QCheckBox *IsHEX; QComboBox *DLC; QLineEdit *Name; QLineEdit *Mcrs; QSpinBox *Count; QCheckBox *IsPeriod; QSpinBox *Period; } MacrosSettingKit[15]; struct mcrs_return{ Qt::CheckState *EID; DWORD *ID; Qt::CheckState *RTR; Qt::CheckState *IsHEX; int *DLC; QString *Name; QString *Mcrs; int *Count; Qt::CheckState *IsPeriod; int *Period; } McrsReturn; struct error_enter{ bool ID[15]; bool Mcrs[15]; }EnterErrors; explicit MacrosSetting(QWidget *parent = nullptr); ~MacrosSetting(); bool IsOK = false; void SetStart(Qt::CheckState *ptrEID, DWORD *ptrID, Qt::CheckState *ptrRTR, Qt::CheckState *ptrHEX, int *ptrDLC, QString *ptrName, QString *ptrMcrs, int *ptrCount, Qt::CheckState *ptrIsPeriod, int *ptrPeriod); private slots: void on_buttonBox_accepted(); void on_buttonBox_rejected(); void on_checkPeriod_01_stateChanged(int arg1) {checkPeriod_stateChanged(1, arg1);}; void on_checkPeriod_02_stateChanged(int arg1) {checkPeriod_stateChanged(2, arg1);}; void on_checkPeriod_03_stateChanged(int arg1) {checkPeriod_stateChanged(3, arg1);}; void on_checkPeriod_04_stateChanged(int arg1) {checkPeriod_stateChanged(4, arg1);}; void on_checkPeriod_05_stateChanged(int arg1) {checkPeriod_stateChanged(5, arg1);}; void on_checkPeriod_06_stateChanged(int arg1) {checkPeriod_stateChanged(6, arg1);}; void on_checkPeriod_07_stateChanged(int arg1) {checkPeriod_stateChanged(7, arg1);}; void on_checkPeriod_08_stateChanged(int arg1) {checkPeriod_stateChanged(8, arg1);}; void on_checkPeriod_09_stateChanged(int arg1) {checkPeriod_stateChanged(9, arg1);}; void on_checkPeriod_10_stateChanged(int arg1) {checkPeriod_stateChanged(10, arg1);}; void on_checkPeriod_11_stateChanged(int arg1) {checkPeriod_stateChanged(11, arg1);}; void on_checkPeriod_12_stateChanged(int arg1) {checkPeriod_stateChanged(12, arg1);}; void on_checkPeriod_13_stateChanged(int arg1) {checkPeriod_stateChanged(13, arg1);}; void on_checkPeriod_14_stateChanged(int arg1) {checkPeriod_stateChanged(14, arg1);}; void on_checkPeriod_15_stateChanged(int arg1) {checkPeriod_stateChanged(15, arg1);}; void on_checkEID_01_stateChanged(int arg1) {checkEID_stateChanged(1);}; void on_checkEID_02_stateChanged(int arg1) {checkEID_stateChanged(2);}; void on_checkEID_03_stateChanged(int arg1) {checkEID_stateChanged(3);}; void on_checkEID_04_stateChanged(int arg1) {checkEID_stateChanged(4);}; void on_checkEID_05_stateChanged(int arg1) {checkEID_stateChanged(5);}; void on_checkEID_06_stateChanged(int arg1) {checkEID_stateChanged(6);}; void on_checkEID_07_stateChanged(int arg1) {checkEID_stateChanged(7);}; void on_checkEID_08_stateChanged(int arg1) {checkEID_stateChanged(8);}; void on_checkEID_09_stateChanged(int arg1) {checkEID_stateChanged(9);}; void on_checkEID_10_stateChanged(int arg1) {checkEID_stateChanged(10);}; void on_checkEID_11_stateChanged(int arg1) {checkEID_stateChanged(11);}; void on_checkEID_12_stateChanged(int arg1) {checkEID_stateChanged(12);}; void on_checkEID_13_stateChanged(int arg1) {checkEID_stateChanged(13);}; void on_checkEID_14_stateChanged(int arg1) {checkEID_stateChanged(14);}; void on_checkEID_15_stateChanged(int arg1) {checkEID_stateChanged(15);}; void on_checkRTR_01_stateChanged(int arg1) {checkRTR_stateChanged(1);}; void on_checkRTR_02_stateChanged(int arg1) {checkRTR_stateChanged(2);}; void on_checkRTR_03_stateChanged(int arg1) {checkRTR_stateChanged(3);}; void on_checkRTR_04_stateChanged(int arg1) {checkRTR_stateChanged(4);}; void on_checkRTR_05_stateChanged(int arg1) {checkRTR_stateChanged(5);}; void on_checkRTR_06_stateChanged(int arg1) {checkRTR_stateChanged(6);}; void on_checkRTR_07_stateChanged(int arg1) {checkRTR_stateChanged(7);}; void on_checkRTR_08_stateChanged(int arg1) {checkRTR_stateChanged(8);}; void on_checkRTR_09_stateChanged(int arg1) {checkRTR_stateChanged(9);}; void on_checkRTR_10_stateChanged(int arg1) {checkRTR_stateChanged(10);}; void on_checkRTR_11_stateChanged(int arg1) {checkRTR_stateChanged(11);}; void on_checkRTR_12_stateChanged(int arg1) {checkRTR_stateChanged(12);}; void on_checkRTR_13_stateChanged(int arg1) {checkRTR_stateChanged(13);}; void on_checkRTR_14_stateChanged(int arg1) {checkRTR_stateChanged(14);}; void on_checkRTR_15_stateChanged(int arg1) {checkRTR_stateChanged(15);}; void ValidationID(unsigned int numID); void on_lineID_01_textChanged(const QString &arg1) {ValidationID(1);} void on_lineID_02_textChanged(const QString &arg1) {ValidationID(2);} void on_lineID_03_textChanged(const QString &arg1) {ValidationID(3);} void on_lineID_04_textChanged(const QString &arg1) {ValidationID(4);} void on_lineID_05_textChanged(const QString &arg1) {ValidationID(5);} void on_lineID_06_textChanged(const QString &arg1) {ValidationID(6);} void on_lineID_07_textChanged(const QString &arg1) {ValidationID(7);} void on_lineID_08_textChanged(const QString &arg1) {ValidationID(8);} void on_lineID_09_textChanged(const QString &arg1) {ValidationID(9);} void on_lineID_10_textChanged(const QString &arg1) {ValidationID(10);} void on_lineID_11_textChanged(const QString &arg1) {ValidationID(11);} void on_lineID_12_textChanged(const QString &arg1) {ValidationID(12);} void on_lineID_13_textChanged(const QString &arg1) {ValidationID(13);} void on_lineID_14_textChanged(const QString &arg1) {ValidationID(14);} void on_lineID_15_textChanged(const QString &arg1) {ValidationID(15);} void on_checkHEX_01_stateChanged(int arg1) {checkHEX_stateChanged(1);}; void on_checkHEX_02_stateChanged(int arg1) {checkHEX_stateChanged(2);}; void on_checkHEX_03_stateChanged(int arg1) {checkHEX_stateChanged(3);}; void on_checkHEX_04_stateChanged(int arg1) {checkHEX_stateChanged(4);}; void on_checkHEX_05_stateChanged(int arg1) {checkHEX_stateChanged(5);}; void on_checkHEX_06_stateChanged(int arg1) {checkHEX_stateChanged(6);}; void on_checkHEX_07_stateChanged(int arg1) {checkHEX_stateChanged(7);}; void on_checkHEX_08_stateChanged(int arg1) {checkHEX_stateChanged(8);}; void on_checkHEX_09_stateChanged(int arg1) {checkHEX_stateChanged(9);}; void on_checkHEX_10_stateChanged(int arg1) {checkHEX_stateChanged(10);}; void on_checkHEX_11_stateChanged(int arg1) {checkHEX_stateChanged(11);}; void on_checkHEX_12_stateChanged(int arg1) {checkHEX_stateChanged(12);}; void on_checkHEX_13_stateChanged(int arg1) {checkHEX_stateChanged(13);}; void on_checkHEX_14_stateChanged(int arg1) {checkHEX_stateChanged(14);}; void on_checkHEX_15_stateChanged(int arg1) {checkHEX_stateChanged(15);}; // void on_comboDLC_01_stateChanged(int arg1) {comboDLC_stateChanged(1);}; // void on_comboDLC_02_stateChanged(int arg1) {comboDLC_stateChanged(2);}; // void on_comboDLC_03_stateChanged(int arg1) {comboDLC_stateChanged(3);}; // void on_comboDLC_04_stateChanged(int arg1) {comboDLC_stateChanged(4);}; // void on_comboDLC_05_stateChanged(int arg1) {comboDLC_stateChanged(5);}; // void on_comboDLC_06_stateChanged(int arg1) {comboDLC_stateChanged(6);}; // void on_comboDLC_07_stateChanged(int arg1) {comboDLC_stateChanged(7);}; // void on_comboDLC_08_stateChanged(int arg1) {comboDLC_stateChanged(8);}; // void on_comboDLC_09_stateChanged(int arg1) {comboDLC_stateChanged(9);}; // void on_comboDLC_10_stateChanged(int arg1) {comboDLC_stateChanged(10);}; // void on_comboDLC_11_stateChanged(int arg1) {comboDLC_stateChanged(11);}; // void on_comboDLC_12_stateChanged(int arg1) {comboDLC_stateChanged(12);}; // void on_comboDLC_13_stateChanged(int arg1) {comboDLC_stateChanged(13);}; // void on_comboDLC_14_stateChanged(int arg1) {comboDLC_stateChanged(14);}; // void on_comboDLC_15_stateChanged(int arg1) {comboDLC_stateChanged(15);}; bool ValidationMcrs(unsigned int numID); void on_lineMcrs_01_textChanged(const QString &arg1) {ValidationMcrs(1);} void on_lineMcrs_02_textChanged(const QString &arg1) {ValidationMcrs(2);} void on_lineMcrs_03_textChanged(const QString &arg1) {ValidationMcrs(3);} void on_lineMcrs_04_textChanged(const QString &arg1) {ValidationMcrs(4);} void on_lineMcrs_05_textChanged(const QString &arg1) {ValidationMcrs(5);} void on_lineMcrs_06_textChanged(const QString &arg1) {ValidationMcrs(6);} void on_lineMcrs_07_textChanged(const QString &arg1) {ValidationMcrs(7);} void on_lineMcrs_08_textChanged(const QString &arg1) {ValidationMcrs(8);} void on_lineMcrs_09_textChanged(const QString &arg1) {ValidationMcrs(9);} void on_lineMcrs_10_textChanged(const QString &arg1) {ValidationMcrs(10);} void on_lineMcrs_11_textChanged(const QString &arg1) {ValidationMcrs(11);} void on_lineMcrs_12_textChanged(const QString &arg1) {ValidationMcrs(12);} void on_lineMcrs_13_textChanged(const QString &arg1) {ValidationMcrs(13);} void on_lineMcrs_14_textChanged(const QString &arg1) {ValidationMcrs(14);} void on_lineMcrs_15_textChanged(const QString &arg1) {ValidationMcrs(15);} void on_comboDLC_01_currentIndexChanged(int arg1) {comboDLC_stateChanged(1);}; void on_comboDLC_02_currentIndexChanged(int arg1) {comboDLC_stateChanged(2);}; void on_comboDLC_03_currentIndexChanged(int arg1) {comboDLC_stateChanged(3);}; void on_comboDLC_04_currentIndexChanged(int arg1) {comboDLC_stateChanged(4);}; void on_comboDLC_05_currentIndexChanged(int arg1) {comboDLC_stateChanged(5);}; void on_comboDLC_06_currentIndexChanged(int arg1) {comboDLC_stateChanged(6);}; void on_comboDLC_07_currentIndexChanged(int arg1) {comboDLC_stateChanged(7);}; void on_comboDLC_08_currentIndexChanged(int arg1) {comboDLC_stateChanged(8);}; void on_comboDLC_09_currentIndexChanged(int arg1) {comboDLC_stateChanged(9);}; void on_comboDLC_10_currentIndexChanged(int arg1) {comboDLC_stateChanged(10);}; void on_comboDLC_11_currentIndexChanged(int arg1) {comboDLC_stateChanged(11);}; void on_comboDLC_12_currentIndexChanged(int arg1) {comboDLC_stateChanged(12);}; void on_comboDLC_13_currentIndexChanged(int arg1) {comboDLC_stateChanged(13);}; void on_comboDLC_14_currentIndexChanged(int arg1) {comboDLC_stateChanged(14);}; void on_comboDLC_15_currentIndexChanged(int arg1) {comboDLC_stateChanged(15);}; private: Ui::MacrosSetting *ui; void checkPeriod_stateChanged(int index, int arg1); void checkEID_stateChanged(int index); void checkRTR_stateChanged(int index); void checkHEX_stateChanged(int index); void comboDLC_stateChanged(int index); bool checkErrors(); void GetMcrs(); void Init(); }; #endif // MACROSSETTING_H