DeviceTempleteCreator.h 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. #include <qwidget.h>
  2. #include <list>
  3. #include "ui_DeviceTemplete.h"
  4. #include "QtLineEditor.h"
  5. #include "CameraItemView.h"
  6. #include "CameraModifyScene.h"
  7. #include "CameraItem.h"
  8. const int CAMERA_COL_OFFSET_MAX = 512;
  9. const int CAMERA_ROW_OFFSET_MAX = 512;
  10. const int CAMERA_ROW_NUM_MAX = 16;
  11. const int CAMERA_ROW_NUM_MIN = 1;
  12. class DeviceTempleteCreator :
  13. public QWidget
  14. {
  15. //Q_OBJECT;
  16. public:
  17. //define a constructor
  18. DeviceTempleteCreator(QWidget* parent = nullptr);
  19. //define a destructor
  20. ~DeviceTempleteCreator();
  21. //define a function to init the connect
  22. void InitConnect();
  23. //define a function to set the scene
  24. void SetScene(CameraModifyScene* pScene);
  25. //define a function to Excute the widget
  26. void Excute();
  27. //define a function to process the combobox current index changed
  28. void OnComboBoxCurrentIndexChanged(int index);
  29. //define a function to change the current group
  30. void ChangeCurrentGroup(LPTAG_CAM_ROW_GROUP pCurrentGroup);
  31. //define a function to process the add row button clicked
  32. void OnAddRowButtonClicked();
  33. //define a function to process the delete row button clicked
  34. void OnDeleteRowButtonClicked();
  35. //define a function to process the row camera num changed
  36. void OnRowCameraNumChanged(const QString& text);
  37. //define a function to process the row offset changed
  38. void OnRowOffsetChanged(const QString& text);
  39. //define a function to process the column offset changed
  40. void OnColumnOffsetChanged(const QString& text);
  41. //define a function to override the close event
  42. void closeEvent(QCloseEvent* event);
  43. //define a function to process the camera pos check box state changed
  44. void OnHorCameraPosCheckBoxStateChanged(int state);
  45. void OnVecCameraPosCheckBoxStateChanged(int state);
  46. public:
  47. Ui::DeviceTempleteCreator ui;
  48. //define a Scene to show the Item
  49. CameraModifyScene * m_pCameraModifyScene;
  50. //define a int to record the current Row Camera Offset
  51. int* m_pCurrentRowCameraOffset;
  52. //define a int to record the current Column Camera Offset
  53. int* m_pCurrentColumnCameraOffset;
  54. //define a unsigned int to record the current Camera Row Index
  55. int* m_pCurrentCameraRowIndex;
  56. //define a unsigned int to record the current Camera number
  57. int* m_pCurrentCameraNumber;
  58. //define a Tag_cam_row_group to process when select the row in list
  59. TAG_CAM_ROW_GROUP* m_pCurrentRowGroup{nullptr};
  60. //define a List TAG_CAM_ROW_GROUP to record the Camera Row Group
  61. std::list<TAG_CAM_ROW_GROUP> m_CameraRowGroupList;
  62. int m_nCurrentRowNum{ 0 };
  63. };