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.

65 lines
1.6 KiB

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