2019-02-06 22:45:06 -08:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <QDialog>
|
|
|
|
#include <QTimer>
|
|
|
|
#include <string>
|
|
|
|
#include <memory>
|
|
|
|
|
|
|
|
#include "auth-oauth.hpp"
|
|
|
|
|
2019-09-03 16:08:48 -07:00
|
|
|
class BrowserDock;
|
2019-02-06 22:45:06 -08:00
|
|
|
|
|
|
|
class TwitchAuth : public OAuthStreamKey {
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
friend class TwitchLogin;
|
|
|
|
|
2019-09-03 16:08:48 -07:00
|
|
|
QSharedPointer<BrowserDock> chat;
|
|
|
|
QSharedPointer<BrowserDock> info;
|
|
|
|
QSharedPointer<BrowserDock> stat;
|
|
|
|
QSharedPointer<BrowserDock> feed;
|
2019-02-06 22:45:06 -08:00
|
|
|
QSharedPointer<QAction> chatMenu;
|
|
|
|
QSharedPointer<QAction> infoMenu;
|
|
|
|
QSharedPointer<QAction> statMenu;
|
2019-03-06 14:26:12 -08:00
|
|
|
QSharedPointer<QAction> feedMenu;
|
2019-02-06 22:45:06 -08:00
|
|
|
bool uiLoaded = false;
|
|
|
|
|
|
|
|
std::string name;
|
|
|
|
|
|
|
|
virtual bool RetryLogin() override;
|
|
|
|
|
|
|
|
virtual void SaveInternal() override;
|
|
|
|
virtual bool LoadInternal() override;
|
|
|
|
|
|
|
|
bool GetChannelInfo();
|
|
|
|
|
|
|
|
virtual void LoadUI() override;
|
|
|
|
|
|
|
|
public:
|
|
|
|
TwitchAuth(const Def &d);
|
|
|
|
|
|
|
|
static std::shared_ptr<Auth> Login(QWidget *parent);
|
|
|
|
|
|
|
|
QTimer uiLoadTimer;
|
|
|
|
|
|
|
|
public slots:
|
|
|
|
void TryLoadSecondaryUIPanes();
|
|
|
|
void LoadSecondaryUIPanes();
|
|
|
|
};
|