1
0

AutoConfigStreamPage.hpp 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #pragma once
  2. #include <QWizardPage>
  3. class Auth;
  4. class Ui_AutoConfigStreamPage;
  5. class AutoConfigStreamPage : public QWizardPage {
  6. Q_OBJECT
  7. friend class AutoConfig;
  8. enum class Section : int {
  9. Connect,
  10. StreamKey,
  11. };
  12. std::shared_ptr<Auth> auth;
  13. std::unique_ptr<Ui_AutoConfigStreamPage> ui;
  14. QString lastService;
  15. bool ready = false;
  16. void LoadServices(bool showAll);
  17. inline bool IsCustomService() const;
  18. public:
  19. AutoConfigStreamPage(QWidget *parent = nullptr);
  20. ~AutoConfigStreamPage();
  21. virtual bool isComplete() const override;
  22. virtual int nextId() const override;
  23. virtual bool validatePage() override;
  24. void OnAuthConnected();
  25. void OnOAuthStreamKeyConnected();
  26. public slots:
  27. void on_show_clicked();
  28. void on_connectAccount_clicked();
  29. void on_disconnectAccount_clicked();
  30. void on_useStreamKey_clicked();
  31. void on_preferHardware_clicked();
  32. void ServiceChanged();
  33. void UpdateKeyLink();
  34. void UpdateMoreInfoLink();
  35. void UpdateServerList();
  36. void UpdateCompleted();
  37. void reset_service_ui_fields(std::string &service);
  38. };