~ubuntu-branches/ubuntu/jaunty/quassel/jaunty

« back to all changes in this revision

Viewing changes to dev-notes/obsolete/qtopia/coreconnectdlg.h

  • Committer: Bazaar Package Importer
  • Author(s): Harald Sitter
  • Date: 2008-11-17 15:22:46 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20081117152246-3lwlpnr4r08910kv
Tags: 0.3.1-0ubuntu1
* New upstream release (LP: #271403)
* Drop all patches originated from upstream (quassel_*)
* Compile with non-builtin quassel icons
  + Introduce new quassel-data package
  + quassel and quassel-client depend on quassel-data
  + Don't manually enforce icon installation for desktop files in debian/rules
  + Add quassel_01_fix_iconloader.patch
* Drop perl build dependency, I have no clue why it was added in the first
  place. Neither changelog nor Bazaar knows, and since quassel compiles just
  fine without it, removing it should be save.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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 <QAbstractSocket>
 
25
 
 
26
#include "types.h"
 
27
 
 
28
#include "ui_coreconnectdlg.h"
 
29
#include "ui_coreconnectprogressdlg.h"
 
30
#include "ui_coreaccounteditdlg.h"
 
31
 
 
32
class ClientSyncer;
 
33
class CoreConnectProgressDlg;
 
34
 
 
35
class CoreConnectDlg : public QDialog {
 
36
  Q_OBJECT
 
37
 
 
38
  public:
 
39
    CoreConnectDlg(QWidget *parent = 0, bool doAutoConnect = false);
 
40
    ~CoreConnectDlg();
 
41
    QVariant getCoreState();
 
42
 
 
43
  private slots:
 
44
    void createAccount();
 
45
    void removeAccount();
 
46
    void editAccount();
 
47
    void setWidgetStates();
 
48
    void doConnect();
 
49
    void connectionSuccess();
 
50
    void connectionFailure();
 
51
 
 
52
    /*** Phase One: Connection ***/
 
53
 
 
54
    void restartPhaseNull();
 
55
    void initPhaseError(const QString &error);
 
56
    void initPhaseMsg(const QString &msg);
 
57
    void initPhaseSocketState(QAbstractSocket::SocketState);
 
58
 
 
59
    /*** Phase Two: Login ***/
 
60
    void startLogin();
 
61
    void loginFailed(const QString &);
 
62
 
 
63
    /*** Phase Three: Sync ***/
 
64
    void startSync();
 
65
 
 
66
  private:
 
67
    Ui::CoreConnectDlg ui;
 
68
    ClientSyncer *clientSyncer;
 
69
 
 
70
    AccountId autoConnectAccount;
 
71
    QHash<AccountId, QVariantMap> accounts;
 
72
    QVariantMap accountData;
 
73
    AccountId account;
 
74
 
 
75
    void editAccount(QString);
 
76
 
 
77
    QAction *newAccAction, *editAccAction, *delAccAction;
 
78
 
 
79
    CoreConnectProgressDlg *progressDlg;
 
80
};
 
81
 
 
82
class CoreAccountEditDlg : public QDialog {
 
83
  Q_OBJECT
 
84
 
 
85
  public:
 
86
    CoreAccountEditDlg(AccountId id, const QVariantMap &data, const QStringList &existing = QStringList(), QWidget *parent = 0);
 
87
    QVariantMap accountData();
 
88
 
 
89
  public slots:
 
90
    void accept();
 
91
 
 
92
  private slots:
 
93
 
 
94
 
 
95
  private:
 
96
    Ui::CoreAccountEditDlg ui;
 
97
    QVariantMap account;
 
98
    QStringList existing;
 
99
 
 
100
};
 
101
 
 
102
class CoreConnectProgressDlg : public QDialog {
 
103
  Q_OBJECT
 
104
 
 
105
  public:
 
106
    CoreConnectProgressDlg(ClientSyncer *, QDialog *parent = 0);
 
107
 
 
108
  private slots:
 
109
 
 
110
    void syncFinished();
 
111
 
 
112
    void coreSessionProgress(quint32, quint32);
 
113
    void coreNetworksProgress(quint32, quint32);
 
114
    void coreChannelsProgress(quint32, quint32);
 
115
    void coreIrcUsersProgress(quint32, quint32);
 
116
 
 
117
  private:
 
118
    Ui::CoreConnectProgressDlg ui;
 
119
 
 
120
};
 
121
 
 
122
#endif