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.

127 lines
3.7 KiB

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