Ok this is the major rework of quassel we've all been waiting for. For the actual...
[quassel.git] / src / qtgui / coreconnectdlg.h
1 /***************************************************************************
2  *   Copyright (C) 2005/06 by The Quassel Team                             *
3  *   devel@quassel-irc.org                                                 *
4  *                                                                         *
5  *   This program is free software; you can redistribute it and/or modify  *
6  *   it under the terms of the GNU General Public License as published by  *
7  *   the Free Software Foundation; either version 2 of the License, or     *
8  *   (at your option) any later version.                                   *
9  *                                                                         *
10  *   This program is distributed in the hope that it will be useful,       *
11  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
12  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
13  *   GNU General Public License for more details.                          *
14  *                                                                         *
15  *   You should have received a copy of the GNU General Public License     *
16  *   along with this program; if not, write to the                         *
17  *   Free Software Foundation, Inc.,                                       *
18  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
19  ***************************************************************************/
20
21 #ifndef _CORECONNECTDLG_H
22 #define _CORECONNECTDLG_H
23
24 #include "ui_coreconnectdlg.h"
25 #include "global.h"
26
27 class CoreConnectDlg: public QDialog {
28   Q_OBJECT
29
30   public:
31     CoreConnectDlg(QWidget *parent, bool doAutoConnect = false);
32     ~CoreConnectDlg();
33     QVariant getCoreState();
34
35     bool willDoInternalAutoConnect();
36
37   public slots:
38     void doAutoConnect();
39
40   private slots:
41     void createAccount();
42     void removeAccount();
43     void accountChanged(const QString & = "");
44     void setAccountEditEnabled(bool);
45     void autoConnectToggled(bool);
46     bool checkInputValid();
47     void hostEditChanged(QString);
48     void hostSelected();
49     void doConnect();
50
51     void coreConnected();
52     void coreConnectionError(QString);
53     //void coreConnectionMsg(const QString &);
54     //void coreConnectionProgress(uint partial, uint total);
55     void updateProgressBar(uint partial, uint total);
56     void recvCoreState(QVariant);
57
58   private:
59     Ui::CoreConnectDlg ui;
60     QVariant coreState;
61
62     void cancelConnect();
63     void setStartState();
64     QVariantMap accountData;
65     QString curacc;
66 };
67
68 #endif