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.

69 lines
1.7 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. #ifndef __ONVIF_SOURCE_CHOOSER_WIDGET_HEADER__
  2. #define __ONVIF_SOURCE_CHOOSER_WIDGET_HEADER__
  3. #ifdef __linux__
  4. #include <QDialog>
  5. #else
  6. #include "../gui.h"
  7. #endif
  8. //#include "../../data/protocol/onvifDeviceNode.h"
  9. #include "../../data/protocol/onvifMediaObserver.h"
  10. #include "../controls/VideoThumbWidget.h"
  11. #include "../../data/media/video/videoAVLIBSource.h"
  12. class guiAddSourceDialog;
  13. class OnvifClientDevice;
  14. class OnvifSourceFinderDialog : public QDialog {
  15. private:
  16. onvifMediaObserver *m_pOnvifObserver;
  17. OnvifClientDevice *m_pDeviceNode;
  18. guiAddSourceDialog *m_pParentDialog;
  19. CSTR m_pSelectedProfileToken;
  20. /* GUI */
  21. QHBoxLayout *m_pHL;
  22. QVBoxLayout *m_pVL1;
  23. QVBoxLayout *m_pVL2;
  24. QTreeWidget *m_pTreeWidget;
  25. QTableWidget *m_pTableWidget;
  26. QProgressBar *m_pProgressBar;
  27. QListWidget *m_pProfileslist;
  28. QLineEdit *m_pTxtLogin;
  29. QLineEdit *m_pTxtPassword;
  30. QPushButton *m_pButtonCmdConnect;
  31. QPushButton *m_pButtonCmdSearch;
  32. QSpacerItem *m_pVSpacer;
  33. VideoThumbWidget *m_pStreamPreview;
  34. videoAVLIBSource *m_pStreamSource;
  35. QPushButton *m_pButtonCmdTestProfile;
  36. QPushButton *m_pButtonCmdUseProfile;
  37. QTimer *m_pTimer;
  38. char m_pDevURL[MAX_PATH_LEN];
  39. int m_nSelectedProfile;
  40. public:
  41. explicit OnvifSourceFinderDialog( guiAddSourceDialog *parent = NULL );
  42. ~OnvifSourceFinderDialog();
  43. public slots:
  44. void connectToSelectedSource();
  45. void startDevicesDiscovery();
  46. void startAskDevice();
  47. void updateProgress();
  48. void treeItemClicked(QTreeWidgetItem *item,int column);
  49. void listItemClicked(QListWidgetItem *item);
  50. void listItemDblClicked(QListWidgetItem *item);
  51. void startPrevewNetStream(void);
  52. void useSelectedProfile(void);
  53. };
  54. #endif