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.

132 lines
3.8 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. VideoThumbWidget *m_pNetSourcePreview;
  25. videoAVLIBSource *m_pSourcePreviewInput;
  26. QVBoxLayout *m_pStage3Layout;
  27. uint8_t m_nAddSourceDialogStage;
  28. QDialogButtonBox *m_pButtonBox;
  29. QTabWidget *m_pDialogTabWidget;
  30. QWidget *m_pPage1;
  31. QLabel *m_pLabel1;
  32. QLabel *m_pLabel2;
  33. QLabel *m_pLabel3;
  34. QFrame *m_pFrame1;
  35. QFrame *m_pFrame2;
  36. QSpacerItem *m_pVerticalSpacer;
  37. QLabel *m_pLabel4;
  38. QWidget *m_pPage2;
  39. QWidget *m_pPage3;
  40. QWidget *m_pPage4;
  41. QWidget *m_pPage5;
  42. QWidget *m_pPage6;
  43. QPushButton *m_pButtonCmdCancelNet;
  44. QPushButton *m_pButtonCmdFinishNet;
  45. QPushButton *m_pButtonCmdShowDeviceSettings;
  46. QPushButton *m_pButtonCmdStartOnvif;
  47. QComboBox *m_pDeviceTypeCombo;
  48. QComboBox *m_pSourceTypeCombo;
  49. QComboBox *m_pLocalDevicesCombo;
  50. QComboBox *m_pDeviceResolutionCombo;
  51. QComboBox *m_pScaledResolutionCombo;
  52. QComboBox *m_pInputPinCombo;
  53. QFormLayout *m_pStage6Layout;
  54. QLabel *m_pPTZProtocolLabel;
  55. QLabel *m_pPTZComPortLabel;
  56. QLabel *m_pPTZComSpeedLabel;
  57. QLabel *m_pPTZCamIDLabel;
  58. QComboBox *m_pPTZProtocolCombo;
  59. QComboBox *m_pPTZComPortCombo;
  60. QSpinBox *m_pPTZComSpeedBox;
  61. QSpinBox *m_pPTZCamIDBox;
  62. QCheckBox *m_pPTZPanEna;
  63. QCheckBox *m_pPTZPanReversed;
  64. QDoubleSpinBox *m_pPTZPanStartBox;
  65. QDoubleSpinBox *m_pPTZPanEndBox;
  66. QCheckBox *m_pPTZTiltEna;
  67. QCheckBox *m_pPTZTiltReversed;
  68. QDoubleSpinBox *m_pPTZTiltStartBox;
  69. QDoubleSpinBox *m_pPTZTiltEndBox;
  70. QCheckBox *m_pPTZZoomEna;
  71. QDoubleSpinBox *m_pPTZMaxZoomBox;
  72. QCheckBox *m_pPTZDZoomEna;
  73. QSpinBox *m_pPTZMaxDZoomBox;
  74. QRadioButton *m_p16x9resolution;
  75. QRadioButton *m_p4x3resolution;
  76. QCheckBox *m_pScalePicture;
  77. QVBoxLayout *m_pStage1Layout;
  78. QVBoxLayout *m_pStage2Layout;
  79. QVBoxLayout *m_pStage4Layout;
  80. QHBoxLayout *m_pS2HMLayout;
  81. QVBoxLayout *m_pS2VMLayout;
  82. QSpacerItem *verticalSpacer;
  83. QSpacerItem *horizontalSpacer;
  84. QLineEdit *m_pLineText;
  85. /* Data */
  86. mediaVideoSourceManager *m_pSourceManager;
  87. /* Temp Data */
  88. SOURCE_INFO m_sTemporarySource;
  89. bool m_bTScaled;
  90. bool m_bTUseDeviceMenu;
  91. int m_iTScaledSizeIndex;
  92. void turnOnVideo(void);
  93. Ui::guiAddSourceDialog *ui;
  94. public:
  95. explicit guiAddSourceDialog(VideoSourceChooser *pPtr, QWidget *parent = 0);
  96. ~guiAddSourceDialog();
  97. public slots:
  98. void addSource();
  99. void cancelDialog();
  100. void setNetworkSourcePath(CSTR Path, CSTR device = NULL, CSTR user = NULL, CSTR pass = NULL);
  101. void setDialogStage(uint8_t Stage);
  102. void nextDialogStage();
  103. void setPreviewLocalSource(int index);
  104. void setSourceType(int index);
  105. void setCameraType(int index);
  106. void setProportions4(bool ch);
  107. void setProportions16(bool ch);
  108. void setResolution(int index);
  109. void setInputPin(int index);
  110. void setColorSystem(int index);
  111. void setStrechMode(bool mode);
  112. void setPTZProto(int index);
  113. void setPTZComPort(int index);
  114. void showOnvifObserverDialog(void);
  115. void showDeviceSettings(void);
  116. };
  117. #endif