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.

216 lines
6.0 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
7 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. #ifndef __QT5_MAIN_WINDOW_HEADER__
  2. #define __QT5_MAIN_WINDOW_HEADER__
  3. #ifndef __linux__
  4. #include <WinSock2.h>
  5. #endif
  6. #include "../../components/base/basicSettingsProvider.h"
  7. #include "../../gui/guiClass.h"
  8. #include "../../data/media/video/videoAVLIBSource.h"
  9. #include "../../gui/controls/VideoWidget.h"
  10. #include "../../gui/controls/OpenGLWidget.h"
  11. #include "../../gui/controls/OGLRadarWidget.h"
  12. #include "../../gui/controls/RangeMapWidget.h"
  13. #include "../../gui/controls/RadarMapWidget.h"
  14. #include "../../gui/controls/VideoSourceChooser.h"
  15. #include "../../gui/controls/DeviceChooser.h"
  16. #include "../../gui/controls/TimeShowWidget.h"
  17. #include "../../gui/controls/EventViewWidget.h"
  18. #include "../../gui/dialogs/ReportsManagerDialog.h"
  19. #include "../../gui/controls/mapControl/QMapControl"
  20. #include "../../gui/controls/mapControl/openaerialmapadapter.h"
  21. #include "../../components/object/objectLGS.h"
  22. #include "../../components/object/objectEventReport.h"
  23. //#include "../../gui/controls/SettingsLGS.h"
  24. #include "../../hardware/stick/joystick.h"
  25. class mainWinow : public QMainWindow{
  26. private:
  27. config_setting_t *m_pSettings;
  28. /* Main Widget */
  29. QWidget *m_pMainWidget;
  30. /* Layouts */
  31. //QMainWindowLayout *m_pMainLayout;
  32. QVBoxLayout *m_pVerticalLayout;
  33. QVBoxLayout *m_pVerticalMapLayout;
  34. QVBoxLayout *m_pVerticalSideLayout;
  35. QHBoxLayout *m_pHorizontalLayout;
  36. QHBoxLayout *m_pScrolbarLayout;
  37. QVBoxLayout *m_pVVVLayout;
  38. QVBoxLayout *m_pVCVLayout;
  39. QPushButton *m_pButtonCmdVideoRecord;
  40. QSpacerItem *m_pVSpacer1;
  41. QSpacerItem *m_pVSpacer2;
  42. QSpacerItem *m_pVSpacer3;
  43. joysticObject *m_pJoyStick;
  44. /* Widgets */
  45. QFrame *m_pTitleFrame;
  46. TimeShowWidget *m_pTitleWidget;
  47. QStatusBar *m_pStatusBar;
  48. QSpacerItem *verticalSpacer;
  49. QSpacerItem *verticalSideSpacer;
  50. QSpacerItem *horisontalSpacer;
  51. QSpacerItem *scrolbarSpacer;
  52. QPushButton *m_pButtonCmdClear;
  53. QPushButton *m_pButtonCmdReset;
  54. QPushButton *m_pButtonCmdSilence;
  55. QPushButton *m_pButtonCmdReport;
  56. QPushButton *m_pButtonCmdExit;
  57. QPushButton *m_pButtonCmdSettings;
  58. QScrollArea *m_pScrollArea;
  59. QScrollArea *m_pDevScrollArea;
  60. EventViewerList *m_pEventsList;
  61. //QWidget *m_pScrollAreaWidgetContents;
  62. DeviceChooser *m_pDevScrollAreaWidgetContents;
  63. VideoSourceChooser *m_pScrollAreaWidgetContents;
  64. QPushButton *m_pAddVideoSource;
  65. VideoWidget *m_pMainVideoWidget;
  66. //clientPort *m_pMasterSocket;
  67. //clientPort *m_pSlaveSocket;
  68. //objectLGS *m_pMasterDevice;
  69. //objectLGS *m_pSlaveDevice;
  70. guiReportsManagerDialog *m_pReportManager;
  71. objectEventReport *m_pReportCreator;
  72. //Control Panels
  73. QTabWidget *m_pTabWidget;
  74. QWidget *m_pPage1;
  75. QWidget *m_pPage2;
  76. QWidget *m_pPage3;
  77. QWidget *m_pPage4;
  78. QWidget *m_pPage5;
  79. QHBoxLayout *m_pPage1Layout;
  80. QHBoxLayout *m_pPage2Layout;
  81. QVBoxLayout *m_pPage3Layout;
  82. QVBoxLayout *m_pPage4Layout;
  83. QVBoxLayout *m_pPage5Layout;
  84. QPushButton *m_pButton1;
  85. QPushButton *m_pButton2;
  86. QPushButton *m_pButton3;
  87. QPushButton *m_pButton4;
  88. QPushButton *m_pButton5;//Add Mask
  89. QPushButton *m_pButton6;//Delete Mask
  90. QPushButton *m_pButton7;//Activate Masks
  91. QPushButton *m_pButton8;//Deactivate Masks
  92. QHBoxLayout *mpLayout;
  93. QSpacerItem *mpSpacer;
  94. QProgressBar *m_pProgressBar;
  95. QHBoxLayout *m_pHorizontalLayout1;
  96. QHBoxLayout *m_pHorizontalLayout2;
  97. QHBoxLayout *m_pHorizontalLayout3;
  98. QRadioButton *m_pRadioButton1;
  99. QRadioButton *m_pRadioButton2;
  100. QGroupBox *m_pRadioGroup;
  101. QGroupBox *m_pSampleGroup;
  102. QComboBox *m_pLRFCombo;
  103. QLabel *m_pStMiRalabel;
  104. QLabel *m_pStMaRalabel;
  105. QLabel *m_pStMiSalabel;
  106. QLabel *m_pStMaSalabel;
  107. QLabel *m_pStMiRaVal;
  108. QLabel *m_pStMaRaVal;
  109. QLabel *m_pStMiSaVal;
  110. QLabel *m_pStMaSaVal;
  111. QLabel *m_pOpLabel;
  112. bool m_bUserRecordsVideo;
  113. private slots:
  114. void handleSilencePress();
  115. void handleButtonPress();
  116. void handleButton2Press();
  117. void handleMaximumsPress();
  118. void handleMinimumsPress();
  119. void handleGenerateWS();
  120. void handleSave2DPicture( void );
  121. void handleSave3DPicture(void);
  122. void handleAddMask();
  123. void handleDeleteMask();
  124. void handleUpdateMask();
  125. void handleSetStatusMask();
  126. void handleVideoRecorder();
  127. void handleReports();
  128. /*Map*/
  129. MapControl *m_pMapControl;
  130. MapAdapter *m_pMapAdapter;
  131. /* OpenGL */
  132. RangeMapWidget *m_pRangeMap;
  133. RadarMapWidget *m_pRangeRadar;
  134. GLRadar *m_pGLRadar;
  135. QPixmap *notepixmap;
  136. Layer* sights;
  137. Layer* museum;
  138. Layer* pubs;
  139. Layer* notes;
  140. Layer* base;
  141. /*Map*/
  142. /*
  143. mediaBus *m_pVideoBus1;
  144. videoAVLIBSource *m_pVideoIpput1;
  145. VideoThumbWidget *m_pVideoWidget1;
  146. mediaBus *m_pVideoBus2;
  147. videoAVLIBSource *m_pVideoIpput2;
  148. VideoThumbWidget *m_pVideoWidget2;
  149. mediaBus *m_pVideoBus3;
  150. videoAVLIBSource *m_pVideoIpput3;
  151. VideoThumbWidget *m_pVideoWidget3;
  152. */
  153. //serialPort *mSerial;
  154. //protocolPTZ_VISCA *mCamera;
  155. public:
  156. // Method to fetch singleton instance.
  157. static mainWinow* getInstance();
  158. // Destructor
  159. virtual ~mainWinow();
  160. RangeMapWidget *getRangeMap( void ){
  161. return m_pRangeMap;
  162. };
  163. RadarMapWidget *getRadarMap( void ){
  164. return m_pRangeRadar;
  165. };
  166. GLRadar *getGLRadar( void ){
  167. return m_pGLRadar;
  168. };
  169. protected:
  170. mainWinow();
  171. void changeEvent(QEvent *event);
  172. private:
  173. // private static member referencing the single instance of the object
  174. // TODO: Replace basicLogCollection with the type of object you want to
  175. // return the single instance of
  176. static mainWinow* _instance;
  177. // Copy constructor
  178. // Declared but not defined to prevent auto-generated
  179. // copy constructor. Refer to "Effective C++" by Meyers
  180. mainWinow(const mainWinow& src);
  181. // Assignment operator
  182. // Declared but not defined to prevent auto-generated
  183. // assignment operator. Refer to "Effective C++" by Meyers
  184. mainWinow& operator=(const mainWinow& src);
  185. public slots:
  186. void callbackSettings(void);
  187. void callbackClear(void);
  188. };
  189. #endif