UI: Add auth. support to settings/autoconfig

Adds the ability to connect/login to an account via the settings and
auto-configuration dialogs.  Checks registered Auth objects, and if the
Auth object matches the currently selected service in the settings
window or auto-configuration dialog, will display "connect account"
buttons for the user to be able to click (which are optional, they can
still use stream keys if they'd prefer).
This commit is contained in:
jp9000
2019-02-06 22:37:36 -08:00
parent ccc64df371
commit 67bb8d7028
8 changed files with 593 additions and 6 deletions

View File

@@ -8,6 +8,7 @@
#include <condition_variable>
#include <utility>
#include <thread>
#include <memory>
#include <vector>
#include <string>
#include <mutex>
@@ -18,6 +19,7 @@ class Ui_AutoConfigStreamPage;
class Ui_AutoConfigTestPage;
class AutoConfigStreamPage;
class Auth;
class AutoConfig : public QWizard {
Q_OBJECT
@@ -160,9 +162,12 @@ class AutoConfigStreamPage : public QWizardPage {
friend class AutoConfig;
enum class Section : int {
Connect,
StreamKey,
};
std::shared_ptr<Auth> auth;
Ui_AutoConfigStreamPage *ui;
QString lastService;
bool ready = false;
@@ -178,8 +183,14 @@ public:
virtual int nextId() const override;
virtual bool validatePage() override;
void OnAuthConnected();
void OnOAuthStreamKeyConnected();
public slots:
void on_show_clicked();
void on_connectAccount_clicked();
void on_disconnectAccount_clicked();
void on_useStreamKey_clicked();
void ServiceChanged();
void UpdateKeyLink();
void UpdateServerList();