You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

170 lines
4.8 KiB

7 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. #ifndef __QT5_MAIN_WINDOW_HEADER__
  2. #define __QT5_MAIN_WINDOW_HEADER__
  3. #include <WinSock2.h>
  4. #include <stdint.h>
  5. #include "../../../lib/components/base/basicSettingsProvider.h"
  6. #include "../../../lib/gui/guiClass.h"
  7. #include "../../../lib/data/media/video/videoAVLIBSource.h"
  8. #include "../../../lib/gui/controls/VideoWidget.h"
  9. #include "../../../lib/gui/controls/TimeShowWidget.h"
  10. #include "../../../lib/hardware/stick/joystick.h"
  11. #include "../../../lib/components/object/objectCameraPTZ.h"
  12. #include "../../../lib/gui/controls/editCameraDialog.h"
  13. class mainWinow : public QMainWindow{
  14. private:
  15. config_setting_t *m_pSettings;
  16. /* Main Widget */
  17. QWidget *m_pMainWidget;
  18. /* Layouts */
  19. QMainWindowLayout *m_pMainLayout;
  20. QVBoxLayout *m_pVerticalLayout;
  21. QVBoxLayout *m_pVerticalSideLayout;
  22. QHBoxLayout *m_pHorizontalLayout;
  23. QHBoxLayout *m_pScrolbarLayout;
  24. QVBoxLayout *m_pVVVLayout;
  25. QVBoxLayout *m_pVCVLayout;
  26. QPushButton *m_pButtonCmdVideoRecord;
  27. QSpacerItem *m_pVSpacer1;
  28. QSpacerItem *m_pVSpacer2;
  29. QSpacerItem *m_pVSpacer3;
  30. joysticObject *m_pJoyStick;
  31. /* Widgets */
  32. QFrame *m_pTitleFrame;
  33. TimeShowWidget *m_pTitleWidget;
  34. QStatusBar *m_pStatusBar;
  35. QSpacerItem *verticalSpacer;
  36. QSpacerItem *verticalSideSpacer;
  37. QSpacerItem *horisontalSpacer;
  38. QSpacerItem *scrolbarSpacer;
  39. QPushButton *m_pButtonCmdSourceSettings;
  40. QPushButton *m_pButtonCmdVideoAnaliticsSettings;
  41. QPushButton *m_pButtonCmdAppSettings;
  42. QPushButton *m_pButtonCmdExit;
  43. VideoWidget *m_pMainVideoWidget;
  44. objectCameraPTZ *m_pVideoSource;
  45. guiEditCameraDialog *m_pVideoSettings;
  46. //clientPort *m_pMasterSocket;
  47. //clientPort *m_pSlaveSocket;
  48. //objectLGS *m_pMasterDevice;
  49. //objectLGS *m_pSlaveDevice;
  50. //Control Panels
  51. QTabWidget *m_pTabWidget;
  52. QWidget *m_pPage1;
  53. QWidget *m_pPage2;
  54. QWidget *m_pPage3;
  55. QWidget *m_pPage4;
  56. QWidget *m_pPage5;
  57. QHBoxLayout *m_pPage1Layout;
  58. QHBoxLayout *m_pPage2Layout;
  59. QVBoxLayout *m_pPage3Layout;
  60. QVBoxLayout *m_pPage4Layout;
  61. QVBoxLayout *m_pPage5Layout;
  62. QPushButton *m_pButton1;
  63. QPushButton *m_pButton2;
  64. QPushButton *m_pButton3;
  65. QPushButton *m_pButton4;
  66. QPushButton *m_pButton5;//Add Mask
  67. QPushButton *m_pButton6;//Delete Mask
  68. QPushButton *m_pButton7;//Activate Masks
  69. QPushButton *m_pButton8;//Deactivate Masks
  70. QHBoxLayout *mpLayout;
  71. QSpacerItem *mpSpacer;
  72. QProgressBar *m_pProgressBar;
  73. QHBoxLayout *m_pHorizontalLayout1;
  74. QHBoxLayout *m_pHorizontalLayout2;
  75. QHBoxLayout *m_pHorizontalLayout3;
  76. QRadioButton *m_pRadioButton1;
  77. QRadioButton *m_pRadioButton2;
  78. QGroupBox *m_pRadioGroup;
  79. QGroupBox *m_pSampleGroup;
  80. QComboBox *m_pLRFCombo;
  81. QLabel *m_pStMiRalabel;
  82. QLabel *m_pStMaRalabel;
  83. QLabel *m_pStMiSalabel;
  84. QLabel *m_pStMaSalabel;
  85. QLabel *m_pStMiRaVal;
  86. QLabel *m_pStMaRaVal;
  87. QLabel *m_pStMiSaVal;
  88. QLabel *m_pStMaSaVal;
  89. QLabel *m_pOpLabel;
  90. bool m_bUserRecordsVideo;
  91. private slots:
  92. void handleSilencePress();
  93. void handleButtonPress();
  94. void handleButton2Press();
  95. void handleMaximumsPress();
  96. void handleMinimumsPress();
  97. void handleGenerateWS();
  98. void handleSave2DPicture( void );
  99. void handleSave3DPicture(void);
  100. void handleAddMask();
  101. void handleDeleteMask();
  102. void handleUpdateMask();
  103. void handleSetStatusMask();
  104. void handleVideoRecorder();
  105. void handleReports();
  106. QPixmap *notepixmap;
  107. /*Map*/
  108. /*
  109. mediaBus *m_pVideoBus1;
  110. videoAVLIBSource *m_pVideoIpput1;
  111. VideoThumbWidget *m_pVideoWidget1;
  112. mediaBus *m_pVideoBus2;
  113. videoAVLIBSource *m_pVideoIpput2;
  114. VideoThumbWidget *m_pVideoWidget2;
  115. mediaBus *m_pVideoBus3;
  116. videoAVLIBSource *m_pVideoIpput3;
  117. VideoThumbWidget *m_pVideoWidget3;
  118. */
  119. //serialPort *mSerial;
  120. //protocolPTZ_VISCA *mCamera;
  121. public:
  122. // Method to fetch singleton instance.
  123. static mainWinow* getInstance();
  124. // Destructor
  125. virtual ~mainWinow();
  126. protected:
  127. mainWinow();
  128. void changeEvent(QEvent *event);
  129. private:
  130. // private static member referencing the single instance of the object
  131. // TODO: Replace basicLogCollection with the type of object you want to
  132. // return the single instance of
  133. static mainWinow* _instance;
  134. // Copy constructor
  135. // Declared but not defined to prevent auto-generated
  136. // copy constructor. Refer to "Effective C++" by Meyers
  137. mainWinow(const mainWinow& src);
  138. // Assignment operator
  139. // Declared but not defined to prevent auto-generated
  140. // assignment operator. Refer to "Effective C++" by Meyers
  141. mainWinow& operator=(const mainWinow& src);
  142. public slots:
  143. void handleVideoSettings(void);
  144. void handleClose(void);
  145. };
  146. #endif