#include #include #include "ui_DeviceTemplete.h" #include "QtLineEditor.h" #include "CameraItemView.h" #include "CameraModifyScene.h" #include "CameraItem.h" const int CAMERA_COL_OFFSET_MAX = 512; const int CAMERA_ROW_OFFSET_MAX = 512; const int CAMERA_ROW_NUM_MAX = 16; const int CAMERA_ROW_NUM_MIN = 1; class DeviceTempleteCreator : public QWidget { //Q_OBJECT; public: //define a constructor DeviceTempleteCreator(QWidget* parent = nullptr); //define a destructor ~DeviceTempleteCreator(); //define a function to init the connect void InitConnect(); //define a function to set the scene void SetScene(CameraModifyScene* pScene); //define a function to Excute the widget void Excute(); //define a function to process the combobox current index changed void OnComboBoxCurrentIndexChanged(int index); //define a function to change the current group void ChangeCurrentGroup(LPTAG_CAM_ROW_GROUP pCurrentGroup); //define a function to process the add row button clicked void OnAddRowButtonClicked(); //define a function to process the delete row button clicked void OnDeleteRowButtonClicked(); //define a function to process the row camera num changed void OnRowCameraNumChanged(const QString& text); //define a function to process the row offset changed void OnRowOffsetChanged(const QString& text); //define a function to process the column offset changed void OnColumnOffsetChanged(const QString& text); //define a function to override the close event void closeEvent(QCloseEvent* event); //define a function to process the camera pos check box state changed void OnHorCameraPosCheckBoxStateChanged(int state); void OnVecCameraPosCheckBoxStateChanged(int state); public: Ui::DeviceTempleteCreator ui; //define a Scene to show the Item CameraModifyScene * m_pCameraModifyScene; //define a int to record the current Row Camera Offset int* m_pCurrentRowCameraOffset; //define a int to record the current Column Camera Offset int* m_pCurrentColumnCameraOffset; //define a unsigned int to record the current Camera Row Index int* m_pCurrentCameraRowIndex; //define a unsigned int to record the current Camera number int* m_pCurrentCameraNumber; //define a Tag_cam_row_group to process when select the row in list TAG_CAM_ROW_GROUP* m_pCurrentRowGroup{nullptr}; //define a List TAG_CAM_ROW_GROUP to record the Camera Row Group std::list m_CameraRowGroupList; int m_nCurrentRowNum{ 0 }; };