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.

135 lines
4.0 KiB

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