X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fcoreconnectdlg.h;h=040d5ecb7055dff92bccdc5e04fbe0719541c3c9;hp=3cd729470aea271c731261137d1cc66eaaee95e2;hb=7857c5659678c969a870b2a68407f2906d96df15;hpb=671e451cf1c10a6e3f442af82b58bfc4de0cb5a2 diff --git a/src/qtui/coreconnectdlg.h b/src/qtui/coreconnectdlg.h index 3cd72947..040d5ecb 100644 --- a/src/qtui/coreconnectdlg.h +++ b/src/qtui/coreconnectdlg.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-08 by the Quassel IRC Team * + * Copyright (C) 2005-2014 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -15,109 +15,51 @@ * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ -#ifndef _CORECONNECTDLG_H_ -#define _CORECONNECTDLG_H_ +#ifndef CORECONNECTDLG_H +#define CORECONNECTDLG_H -#include +#include -#include "types.h" +#include "coreaccount.h" -#include "ui_coreconnectdlg.h" -#include "ui_coreaccounteditdlg.h" +#include "ui_coreconnectauthdlg.h" -class ClientSyncer; -class CoreConfigWizard; +class CoreAccountSettingsPage; -class CoreConnectDlg : public QDialog { - Q_OBJECT +class CoreConnectDlg : public QDialog +{ + Q_OBJECT - public: - CoreConnectDlg(QWidget *parent = 0, bool = false); - ~CoreConnectDlg(); +public: + CoreConnectDlg(QWidget *parent = 0); + AccountId selectedAccount() const; - private slots: + void accept(); - /*** Phase Null: Accounts ***/ - void restartPhaseNull(); - - void on_accountList_itemSelectionChanged(); - void on_autoConnect_clicked(bool); - - void on_addAccount_clicked(); - void on_editAccount_clicked(); - void on_deleteAccount_clicked(); - - void on_accountList_itemDoubleClicked(QListWidgetItem *item); - void on_accountButtonBox_accepted(); - - void setAccountWidgetStates(); - - /*** Phase One: Connection ***/ - void connectToCore(); - - void initPhaseError(const QString &error); - void initPhaseMsg(const QString &msg); - void initPhaseSocketState(QAbstractSocket::SocketState); - void encrypted(bool); - - /*** Phase Two: Login ***/ - void startLogin(); - void doLogin(); - void doLogin(const QVariantMap &loginData); - void loginFailed(const QString &); - void startCoreConfig(const QVariantList &backends); - void configWizardAccepted(); - void configWizardRejected(); - void on_launchCoreConfigWizard_clicked(); - - void setLoginWidgetStates(); - - /*** Phase Three: Sync ***/ - void startSync(); - void syncFinished(); - - void coreSessionProgress(quint32, quint32); - void coreNetworksProgress(quint32, quint32); - - private: - Ui::CoreConnectDlg ui; - - AccountId autoConnectAccount; - QHash accounts; - QVariantMap accountData; - AccountId account; - - bool doingAutoConnect; - - QVariantList storageBackends; - - ClientSyncer *clientSyncer; - CoreConfigWizard *wizard; +private: + CoreAccountSettingsPage *_settingsPage; }; -class CoreAccountEditDlg : public QDialog { - Q_OBJECT - public: - CoreAccountEditDlg(AccountId id, const QVariantMap &data, const QStringList &existing = QStringList(), QWidget *parent = 0); +class CoreConnectAuthDlg : public QDialog +{ + Q_OBJECT - QVariantMap accountData(); +public: + CoreConnectAuthDlg(CoreAccount *account, QWidget *parent = 0); - private slots: - void on_host_textChanged(const QString &); - void on_accountName_textChanged(const QString &); - void on_useRemote_toggled(bool); + void accept(); - void setWidgetStates(); +private slots: + void setButtonStates(); - private: - Ui::CoreAccountEditDlg ui; - - QStringList existing; - QVariantMap account; +private: + Ui::CoreConnectAuthDlg ui; + CoreAccount *_account; }; + #endif