~ubuntu-branches/ubuntu/hoary/psi/hoary

« back to all changes in this revision

Viewing changes to src/accountdlg.h

  • Committer: Bazaar Package Importer
  • Author(s): Jan Niehusmann
  • Date: 2002-04-19 02:28:44 UTC
  • Revision ID: james.westby@ubuntu.com-20020419022844-za7xgai5qyfd9xv6
Tags: upstream-0.8.5
ImportĀ upstreamĀ versionĀ 0.8.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/****************************************************************************
 
2
** accountdlg.h - dialogs for manipulating Jabber accounts
 
3
** Copyright (C) 2001, 2002  Justin Karneges
 
4
**
 
5
** This program is free software; you can redistribute it and/or
 
6
** modify it under the terms of the GNU General Public License
 
7
** as published by the Free Software Foundation; either version 2
 
8
** of the License, or (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 Free Software
 
17
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
 
18
**
 
19
****************************************************************************/
 
20
 
 
21
#ifndef ACCOUNTDLG_H
 
22
#define ACCOUNTDLG_H
 
23
 
 
24
#include<qdialog.h>
 
25
#include<qlistview.h>
 
26
#include"profiles.h"
 
27
#include"uniquewindow.h"
 
28
#include"jabsess.h"
 
29
#include"ui_accountmanage.h"
 
30
#include"ui_accountmodify.h"
 
31
#include"busywidget.h"
 
32
 
 
33
 
 
34
class AccountViewItem : public QListViewItem
 
35
{
 
36
public:
 
37
        AccountViewItem(QListView *, JabSession *);
 
38
 
 
39
        JabSession *s;
 
40
 
 
41
        void updateInfo();
 
42
};
 
43
 
 
44
class AccountManageDlg : public AccountManageUI
 
45
{
 
46
        Q_OBJECT
 
47
public:
 
48
        AccountManageDlg(JabSessionManager *, QWidget *parent=0, const char *name=0);
 
49
        ~AccountManageDlg();
 
50
 
 
51
        static AccountManageDlg *find();
 
52
 
 
53
signals:
 
54
        void signalModify(const QString &);
 
55
 
 
56
public slots:
 
57
        void updateEntry(JabSession *);
 
58
        void sessionUpdate(JabSession *);
 
59
 
 
60
private slots:
 
61
        void modify();
 
62
        void modify(QListViewItem *);
 
63
 
 
64
private:
 
65
        JabSessionManager *jsm;
 
66
};
 
67
 
 
68
class AccountModifyDlg : public AccountModifyUI, public UniqueWindow
 
69
{
 
70
        Q_OBJECT
 
71
public:
 
72
        AccountModifyDlg(JabSession *, bool haveSSL, QWidget *parent=0, const char *name=0);
 
73
        ~AccountModifyDlg();
 
74
 
 
75
        static AccountModifyDlg *find(const QString &accname);
 
76
 
 
77
private slots:
 
78
        void sslToggled(bool);
 
79
        void save();
 
80
        void doRegister();
 
81
 
 
82
private:
 
83
        JabSession *s;
 
84
        bool haveSSL;
 
85
};
 
86
 
 
87
class AccountRegisterDlg : public QDialog
 
88
{
 
89
        Q_OBJECT
 
90
public:
 
91
        AccountRegisterDlg(QWidget *parent=0, const char *name=0);
 
92
        ~AccountRegisterDlg();
 
93
 
 
94
        void start(const QString &, int, bool, const QString &, const QString &);
 
95
        void stop();
 
96
 
 
97
        static bool reg(QWidget *, const QString &, int, bool, const QString &, const QString &);
 
98
 
 
99
protected:
 
100
        // reimplemented
 
101
        void closeEvent(QCloseEvent *);
 
102
 
 
103
private slots:
 
104
        void accRegisterFinished(bool, const QString &);
 
105
        void jab_error(JabError *);
 
106
        void cancel();
 
107
 
 
108
private:
 
109
        Jabber *jab;
 
110
        BusyWidget *busy;
 
111
};
 
112
 
 
113
#endif