Fix license headers: Quassel IRC Team -> Quassel Project, 2007 -> 2008
[quassel.git] / src / qtui / coreconnectdlg.h
1 /***************************************************************************
2  *   Copyright (C) 2005-08 by the Quassel Project                          *
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) version 3.                                           *
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
26 class CoreConnectDlg: public QDialog {
27   Q_OBJECT
28
29   public:
30     CoreConnectDlg(QWidget *parent, bool doAutoConnect = false);
31     ~CoreConnectDlg();
32     QVariant getCoreState();
33
34     bool willDoInternalAutoConnect();
35     
36   public slots:
37     void doAutoConnect();
38
39   private slots:
40     void createAccount();
41     void removeAccount();
42     void accountChanged(const QString & = "");
43     void setAccountEditEnabled(bool);
44     void autoConnectToggled(bool);
45     bool checkInputValid();
46     void hostEditChanged(QString);
47     void hostSelected();
48     void doConnect();
49
50     void coreConnected();
51     void coreConnectionError(QString);
52     //void coreConnectionMsg(const QString &);
53     //void coreConnectionProgress(uint partial, uint total);
54     void updateProgressBar(uint partial, uint total);
55     void recvCoreState(QVariant);
56     
57     void showConfigWizard(const QVariantMap &coredata);
58
59   private:
60     Ui::CoreConnectDlg ui;
61     QVariant coreState;
62
63     void cancelConnect();
64     void setStartState();
65     QVariantMap accountData;
66     QString curacc;
67 };
68
69 #endif