auth-twitch.hpp 845 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #pragma once
  2. #include <QDialog>
  3. #include <QTimer>
  4. #include <string>
  5. #include <memory>
  6. #include "auth-oauth.hpp"
  7. class TwitchWidget;
  8. class TwitchAuth : public OAuthStreamKey {
  9. Q_OBJECT
  10. friend class TwitchLogin;
  11. QSharedPointer<TwitchWidget> chat;
  12. QSharedPointer<TwitchWidget> info;
  13. QSharedPointer<TwitchWidget> stat;
  14. QSharedPointer<QAction> chatMenu;
  15. QSharedPointer<QAction> infoMenu;
  16. QSharedPointer<QAction> statMenu;
  17. bool uiLoaded = false;
  18. std::string name;
  19. virtual bool RetryLogin() override;
  20. virtual void SaveInternal() override;
  21. virtual bool LoadInternal() override;
  22. bool GetChannelInfo();
  23. virtual void LoadUI() override;
  24. public:
  25. TwitchAuth(const Def &d);
  26. static std::shared_ptr<Auth> Login(QWidget *parent);
  27. QTimer uiLoadTimer;
  28. public slots:
  29. void TryLoadSecondaryUIPanes();
  30. void LoadSecondaryUIPanes();
  31. };