diff options
| author | isanae <14251494+isanae@users.noreply.github.com> | 2019-08-03 09:31:19 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-08-03 09:31:19 -0400 |
| commit | a7df11a31d684cfc341fc401dc3a9449f2538084 (patch) | |
| tree | 04005ddcf6b364c0b1132e47c0490314c14726ae /src/settingsdialognexus.h | |
| parent | 80dd9222f325959a26580ce2fdd1ebc4b7979517 (diff) | |
| parent | 712c8687c208629e22ef7b4d8015c899c2ea053a (diff) | |
Merge pull request #808 from isanae/settings-rework
Settings rework
Diffstat (limited to 'src/settingsdialognexus.h')
| -rw-r--r-- | src/settingsdialognexus.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/src/settingsdialognexus.h b/src/settingsdialognexus.h new file mode 100644 index 00000000..cca2e1b5 --- /dev/null +++ b/src/settingsdialognexus.h @@ -0,0 +1,41 @@ +#ifndef SETTINGSDIALOGNEXUS_H +#define SETTINGSDIALOGNEXUS_H + +#include "settings.h" +#include "settingsdialog.h" +#include "nxmaccessmanager.h" + +class NexusSettingsTab : public SettingsTab +{ +public: + NexusSettingsTab(Settings *m_parent, SettingsDialog &m_dialog); + void update(); + +private: + std::unique_ptr<NexusSSOLogin> m_nexusLogin; + std::unique_ptr<NexusKeyValidator> m_nexusValidator; + + void on_nexusConnect_clicked(); + void on_nexusManualKey_clicked(); + void on_nexusDisconnect_clicked(); + void on_clearCacheButton_clicked(); + void on_associateButton_clicked(); + + 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 addNexusLog(const QString& s); +}; + +#endif // SETTINGSDIALOGNEXUS_H |
