~ubuntu-branches/ubuntu/breezy/psi/breezy

« back to all changes in this revision

Viewing changes to src/infodlg.h

  • Committer: Bazaar Package Importer
  • Author(s): Jan Niehusmann
  • Date: 2004-06-15 00:10:41 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20040615001041-enywb6pcpe4sjsw6
Tags: 0.9.2-1
* New upstream release
* Set KDEDIR for ./configure so kde specific files get installed
* Don't install libpsiwidgets.so. It got installed in /usr/share
  where it doesn't belong. May be included (at a better location)
  later.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/****************************************************************************
2
 
** infodlg.h - show contact info
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
 
****************************************************************************/
 
1
/*
 
2
 * infodlg.h - handle vcard
 
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 library; if not, write to the Free Software
 
17
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
18
 *
 
19
 */
20
20
 
21
21
#ifndef INFODLG_H
22
22
#define INFODLG_H
23
23
 
24
 
#include<qwidget.h>
25
 
#include<qpixmap.h>
26
 
#include<qlabel.h>
27
24
#include"ui_info.h"
28
 
#include"userlist.h"
29
 
#include"jabber.h"
30
 
#include"uniquewindow.h"
31
 
#include"busywidget.h"
32
 
 
33
 
#define INFODLG_USER    0
34
 
#define INFODLG_CONTACT 1
35
 
 
36
 
 
37
 
class InfoDlg : public InfoUI, public UniqueWindow
 
25
 
 
26
namespace XMPP
 
27
{
 
28
        class Jid;
 
29
        class VCard;
 
30
}
 
31
 
 
32
class PsiAccount;
 
33
 
 
34
class InfoDlg : public InfoUI
38
35
{
39
36
        Q_OBJECT
40
37
public:
41
 
        InfoDlg(int type, const QString &, const VCard &, int localStatus, QWidget *parent=0, const char *name=0);
42
 
 
43
 
        static InfoDlg *find(const QString &);
 
38
        enum { Self, Contact };
 
39
        InfoDlg(int type, const XMPP::Jid &, const XMPP::VCard &, PsiAccount *, QWidget *parent=0, const char *name=0, bool cacheVCard = true);
 
40
        ~InfoDlg();
44
41
 
45
42
protected:
46
43
        // reimplemented
47
 
        void closeEvent(QCloseEvent *);
48
 
 
49
 
signals:
50
 
        void signalGetVCard(const QString &, QString *);
51
 
        void signalCancelTransaction(const QString &);
52
 
        void signalSetVCard(const VCard &, QString *);
 
44
        //void closeEvent(QCloseEvent *);
53
45
 
54
46
public slots:
55
47
        void doRefresh();
56
 
        void localUpdate(const JabRosterEntry &);
57
 
        void updateVCard(const VCard &);
58
 
        void result(bool);
59
 
        void error();
 
48
        void done(int);
60
49
 
61
50
private slots:
 
51
        void jt_finished();
62
52
        void doSubmit();
63
53
        void textChanged();
64
54
 
65
55
private:
66
 
        BusyWidget *busy;
67
 
        VCard vcard, submit_vcard;
68
 
        QString v_jid;
69
 
        int type;
70
 
 
71
 
        QString id;
72
 
        bool isBusy;
73
 
        int actionType;
74
 
 
75
 
        void setData(const VCard &);
76
 
        void makeVCard();
 
56
        class Private;
 
57
        Private *d;
 
58
 
 
59
        void setData(const XMPP::VCard &);
 
60
        XMPP::VCard makeVCard();
77
61
        void fieldsEnable(bool);
78
62
        void setReadOnly(bool);
79
63
        bool edited();
80
64
        void setEdited(bool);
81
 
 
82
 
        bool te_edited;
83
65
};
84
66
 
85
67
#endif
86