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.

121 lines
3.7 KiB

7 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. #ifndef __GUI_ADD_SOURCE_DIALOG_HEADER__
  2. #define __GUI_ADD_SOURCE_DIALOG_HEADER__
  3. #include "VideoThumbWidget.h"
  4. #include "OnvifVideoSourceFinder.h"
  5. #include "../../data/media/mediaVideoSourceManager.h"
  6. #include "../../data/media/video/videoAVLIBSource.h"
  7. class VideoSourceChooser;
  8. class guiAddSourceDialog : public QDialog{
  9. private:
  10. VideoSourceChooser *m_pParent;
  11. OnvifSourceFinder *m_pOnvifObserver;
  12. VideoThumbWidget *m_pSourcePreview;
  13. VideoThumbWidget *m_pNetSourcePreview;
  14. videoAVLIBSource *m_pSourcePreviewInput;
  15. QVBoxLayout *m_pStage3Layout;
  16. uint8_t m_nAddSourceDialogStage;
  17. QDialogButtonBox *m_pButtonBox;
  18. QTabWidget *m_pDialogTabWidget;
  19. QWidget *m_pPage1;
  20. QLabel *m_pLabel1;
  21. QLabel *m_pLabel2;
  22. QLabel *m_pLabel3;
  23. QFrame *m_pFrame1;
  24. QFrame *m_pFrame2;
  25. QSpacerItem *m_pVerticalSpacer;
  26. QLabel *m_pLabel4;
  27. QWidget *m_pPage2;
  28. QWidget *m_pPage3;
  29. QWidget *m_pPage4;
  30. QWidget *m_pPage5;
  31. QWidget *m_pPage6;
  32. QPushButton *m_pButtonCmdCancelNet;
  33. QPushButton *m_pButtonCmdFinishNet;
  34. QPushButton *m_pButtonCmdShowDeviceSettings;
  35. QPushButton *m_pButtonCmdStartOnvif;
  36. QComboBox *m_pDeviceTypeCombo;
  37. QComboBox *m_pSourceTypeCombo;
  38. QComboBox *m_pLocalDevicesCombo;
  39. QComboBox *m_pDeviceResolutionCombo;
  40. QComboBox *m_pScaledResolutionCombo;
  41. QComboBox *m_pInputPinCombo;
  42. QFormLayout *m_pStage6Layout;
  43. QLabel *m_pPTZProtocolLabel;
  44. QLabel *m_pPTZComPortLabel;
  45. QLabel *m_pPTZComSpeedLabel;
  46. QLabel *m_pPTZCamIDLabel;
  47. QComboBox *m_pPTZProtocolCombo;
  48. QComboBox *m_pPTZComPortCombo;
  49. QSpinBox *m_pPTZComSpeedBox;
  50. QSpinBox *m_pPTZCamIDBox;
  51. QCheckBox *m_pPTZPanEna;
  52. QCheckBox *m_pPTZPanReversed;
  53. QDoubleSpinBox *m_pPTZPanStartBox;
  54. QDoubleSpinBox *m_pPTZPanEndBox;
  55. QCheckBox *m_pPTZTiltEna;
  56. QCheckBox *m_pPTZTiltReversed;
  57. QDoubleSpinBox *m_pPTZTiltStartBox;
  58. QDoubleSpinBox *m_pPTZTiltEndBox;
  59. QCheckBox *m_pPTZZoomEna;
  60. QDoubleSpinBox *m_pPTZMaxZoomBox;
  61. QCheckBox *m_pPTZDZoomEna;
  62. QSpinBox *m_pPTZMaxDZoomBox;
  63. QRadioButton *m_p16x9resolution;
  64. QRadioButton *m_p4x3resolution;
  65. QCheckBox *m_pScalePicture;
  66. QVBoxLayout *m_pStage1Layout;
  67. QVBoxLayout *m_pStage2Layout;
  68. QVBoxLayout *m_pStage4Layout;
  69. QHBoxLayout *m_pS2HMLayout;
  70. QVBoxLayout *m_pS2VMLayout;
  71. QSpacerItem *verticalSpacer;
  72. QSpacerItem *horizontalSpacer;
  73. QLineEdit *m_pLineText;
  74. /* Data */
  75. mediaVideoSourceManager *m_pSourceManager;
  76. /* Temp Data */
  77. SOURCE_INFO m_sTemporarySource;
  78. bool m_bTScaled;
  79. bool m_bTUseDeviceMenu;
  80. int m_iTScaledSizeIndex;
  81. void turnOnVideo(void);
  82. public:
  83. explicit guiAddSourceDialog(VideoSourceChooser *parent);
  84. ~guiAddSourceDialog();
  85. public slots:
  86. void addSource();
  87. void cancelDialog();
  88. void setNetworkSourcePath(CSTR Path, CSTR device = NULL, CSTR user = NULL, CSTR pass = NULL);
  89. void setDialogStage(uint8_t Stage);
  90. void nextDialogStage();
  91. void setPreviewLocalSource(int index);
  92. void setSourceType(int index);
  93. void setCameraType(int index);
  94. void setProportions4(bool ch);
  95. void setProportions16(bool ch);
  96. void setResolution(int index);
  97. void setInputPin(int index);
  98. void setColorSystem(int index);
  99. void setStrechMode(bool mode);
  100. void setPTZProto(int index);
  101. void setPTZComPort(int index);
  102. void showOnvifObserverDialog(void);
  103. void showDeviceSettings(void);
  104. };
  105. #endif