X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fcoreconfigwizard.h;fp=src%2Fqtui%2Fcoreconfigwizard.h;h=5b09a872655ca15079278d5a588fcecf1a4c3e21;hp=bcc765fe4c84670e4e5d98e79e50fa1e0fba4962;hb=cfbd4daee17dbb3c4052d938bf33edd08711d728;hpb=46f20e19a343ad0fa17dde6c32f17e60fc682c9b diff --git a/src/qtui/coreconfigwizard.h b/src/qtui/coreconfigwizard.h index bcc765fe..5b09a872 100644 --- a/src/qtui/coreconfigwizard.h +++ b/src/qtui/coreconfigwizard.h @@ -18,10 +18,11 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ -#ifndef _CORECONFIGWIZARD_H_ -#define _CORECONFIGWIZARD_H_ +#pragma once + +#include +#include -#include #include #include @@ -54,9 +55,7 @@ public: ConclusionPage }; - CoreConfigWizard(CoreConnection *connection, const QList &backends, const QList &authenticators, QWidget *parent = 0); - QHash backends() const; - QHash authenticators() const; + CoreConfigWizard(CoreConnection *connection, const QVariantList &backendInfos, const QVariantList &authInfos, QWidget *parent = 0); inline CoreConnection *coreConnection() const { return _connection; } @@ -75,9 +74,6 @@ private slots: void startOver(); private: - QHash _backends; - QHash _authenticators; - CoreConfigWizardPages::SyncPage *syncPage; CoreConfigWizardPages::SyncRelayPage *syncRelayPage; @@ -114,37 +110,45 @@ private: class AuthenticationSelectionPage : public QWizardPage { Q_OBJECT + using FieldInfo = std::tuple; public: - AuthenticationSelectionPage(const QHash &backends, QWidget *parent = 0); + AuthenticationSelectionPage(const QVariantList &authInfos, QWidget *parent = 0); int nextId() const; - QString selectedBackend() const; + QString displayName() const; + QString authenticator() const; QVariantMap authProperties() const; private slots: - void on_backendList_currentIndexChanged(); + void on_backendList_currentIndexChanged(int index); + private: Ui::CoreConfigWizardAuthenticationSelectionPage ui; - QGroupBox *_connectionBox; - QHash _backends; + QGroupBox *_fieldBox {nullptr}; + std::vector _authProperties; + std::vector> _authFields; }; class StorageSelectionPage : public QWizardPage { Q_OBJECT + using FieldInfo = std::tuple; public: - StorageSelectionPage(const QHash &backends, QWidget *parent = 0); + StorageSelectionPage(const QVariantList &backendInfos, QWidget *parent = 0); int nextId() const; - QString selectedBackend() const; - QVariantMap connectionProperties() const; + QString displayName() const; + QString backend() const; + QVariantMap backendProperties() const; private slots: - void on_backendList_currentIndexChanged(); + void on_backendList_currentIndexChanged(int index); + private: Ui::CoreConfigWizardStorageSelectionPage ui; - QGroupBox *_connectionBox; - QHash _backends; + QGroupBox *_fieldBox {nullptr}; + std::vector _backendProperties; + std::vector> _backendFields; }; class SyncPage : public QWizardPage @@ -167,8 +171,8 @@ signals: private: Ui::CoreConfigWizardSyncPage ui; - bool complete; - bool hasError; + bool _complete {false}; + bool _hasError {false}; }; @@ -191,5 +195,3 @@ private: Mode mode; }; } - -#endif