diff options
| author | Jeremy Rimpo <jrim@rimpo.org> | 2019-07-22 01:02:21 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-07-22 01:02:21 -0500 |
| commit | 1f1b838c2b3fd3148d2c2a1a8fe6fcf9fb07383f (patch) | |
| tree | 33c20c0cc6e5f0029558c8e8383a0fdf68571689 /src/settingsdialog.h | |
| parent | 613aa037cf8dc728eac474ee6cf6b790293d5114 (diff) | |
| parent | 2d78957c3d4c33de5813d7ee5b86dec8cb01478c (diff) | |
Merge pull request #796 from isanae/login-progress-dialog
Nexus login progress dialog and Nexus settings
Diffstat (limited to 'src/settingsdialog.h')
| -rw-r--r-- | src/settingsdialog.h | 34 |
1 files changed, 16 insertions, 18 deletions
diff --git a/src/settingsdialog.h b/src/settingsdialog.h index 858a36d4..c5f487fd 100644 --- a/src/settingsdialog.h +++ b/src/settingsdialog.h @@ -21,12 +21,9 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>. #define SETTINGSDIALOG_H #include "tutorabledialog.h" +#include "nxmaccessmanager.h" #include <iplugin.h> -#include <QComboBox> -#include <QDialog> -#include <QWebSocket> #include <QListWidgetItem> -#include <QTimer> class PluginContainer; class Settings; @@ -35,6 +32,7 @@ namespace Ui { class SettingsDialog; } + /** * dialog used to change settings for Mod Organizer. On top of the * settings managed by the "Settings" class, this offers a button to open the @@ -127,11 +125,6 @@ private slots: void on_resetGeometryBtn_clicked(); void deleteBlacklistItem(); - void dispatchLogin(); - void loginPing(); - void authError(QAbstractSocket::SocketError error); - void receiveApiKey(const QString &apiKey); - void completeApiConnection(); private: Ui::SettingsDialog *ui; @@ -145,23 +138,28 @@ private: QColor m_ContainsColor; QColor m_ContainedColor; - bool m_KeyReceived; - bool m_KeyCleared; bool m_GeometriesReset; - QString m_UUID; - QString m_AuthToken; + bool m_keyChanged; QString m_ExecutableBlacklist; - QWebSocket *m_nexusLogin; - QTimer m_loginTimer; - int m_totalPings = 0; + std::unique_ptr<NexusSSOLogin> m_nexusLogin; + std::unique_ptr<NexusKeyValidator> m_nexusValidator; + void validateKey(const QString& key); bool setKey(const QString& key); bool clearKey(); + + void updateNexusState(); void updateNexusButtons(); + void updateNexusData(); + + void onSSOKeyChanged(const QString& key); + void onSSOStateChanged(NexusSSOLogin::States s, const QString& e); + + void onValidatorStateChanged(NexusKeyValidator::States s, const QString& e); + void onValidatorFinished(const APIUserAccount& user); - void fetchNexusApiKey(); - void testApiKey(); + void addNexusLog(const QString& s); }; #endif // SETTINGSDIALOG_H |
