~ubuntu-branches/ubuntu/quantal/psi/quantal

« back to all changes in this revision

Viewing changes to src/groupchatdlg.h

  • Committer: Bazaar Package Importer
  • Author(s): Jan Niehusmann
  • Date: 2008-04-14 18:57:30 UTC
  • mfrom: (2.1.9 hardy)
  • Revision ID: james.westby@ubuntu.com-20080414185730-528re3zp0m2hdlhi
Tags: 0.11-8
* added CONFIG -= link_prl to .pro files and removed dependencies
  which are made unnecessary by this change
* Fix segfault when closing last chat tab with qt4.4
  (This is from upstream svn, rev. 1101) (Closes: Bug#476122)

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 *
19
19
 */
20
20
 
21
 
#include<qlistview.h>
22
 
#include<qlineedit.h>
23
 
#include<qtooltip.h>
24
 
#include"advwidget.h"
25
 
#include"im.h"
26
 
#include"ui_gcjoin.h"
 
21
#ifndef GROUPCHATDLG_H
 
22
#define GROUPCHATDLG_H
 
23
 
 
24
#include <QWidget>
 
25
#include <QDialog>
 
26
 
 
27
#include "ui_groupchatdlg.h"
 
28
#include "mucmanager.h"
 
29
#include "advwidget.h"
27
30
 
28
31
using namespace XMPP;
29
32
 
30
33
class PsiCon;
31
34
class PsiAccount;
32
 
 
33
 
class GCJoinDlg : public GCJoinUI
34
 
{
35
 
        Q_OBJECT
36
 
public:
37
 
        GCJoinDlg(PsiCon *, PsiAccount *);
38
 
        ~GCJoinDlg();
39
 
 
40
 
        void joined();
41
 
        void error(int, const QString &);
42
 
 
43
 
protected:
44
 
        //void closeEvent(QCloseEvent *);
45
 
 
46
 
public slots:
47
 
        void done(int);
48
 
 
49
 
private slots:
50
 
        void doJoin();
51
 
        void updateIdentity(PsiAccount *);
52
 
        void pa_disconnected();
53
 
        void recent_activated(int);
54
 
 
55
 
private:
56
 
        class Private;
57
 
        Private *d;
58
 
 
59
 
        void disableWidgets();
60
 
        void enableWidgets();
61
 
};
62
 
 
63
 
class GCUserViewItem : public QListViewItem
64
 
{
65
 
public:
66
 
        GCUserViewItem(QListView *);
67
 
 
68
 
        Status s;
69
 
};
70
 
 
71
 
class GCUserView : public QListView, public QToolTip
72
 
{
73
 
        Q_OBJECT
74
 
public:
75
 
        GCUserView(QWidget *parent=0, const char *name=0);
76
 
        ~GCUserView();
77
 
 
78
 
        void updateAll();
79
 
        QListViewItem *findEntry(const QString &);
80
 
        void updateEntry(const QString &, const Status &);
81
 
        void removeEntry(const QString &);
82
 
        QStringList nickList() const;
83
 
 
84
 
protected:
85
 
        // reimplemented
86
 
        void maybeTip(const QPoint &);
87
 
 
88
 
signals:
89
 
        void action(const QString &, const Status &, int);
90
 
 
91
 
private slots:
92
 
        void qlv_doubleClicked(QListViewItem *);
93
 
        void qlv_contextMenuRequested(QListViewItem *, const QPoint &, int);
94
 
};
 
35
class PsiOptions;
 
36
class QRect;
 
37
class GCMainDlg;
 
38
class QPainter;
 
39
class QColorGroup;
 
40
class Q3DragObject;
 
41
namespace XMPP {
 
42
        class Message;
 
43
}
95
44
 
96
45
/*class GCLineEdit : public QLineEdit
97
46
{
115
64
        ~GCMainDlg();
116
65
 
117
66
        Jid jid() const;
 
67
        PsiAccount* account() const;
118
68
 
119
69
        void error(int, const QString &);
120
70
        void presence(const QString &, const Status &);
121
71
        void message(const Message &);
122
72
        void joined();
 
73
        void setPassword(const QString&);
 
74
        const QString& nick() const;
123
75
 
124
76
protected:
 
77
        void setShortcuts();
 
78
 
 
79
        // reimplemented
125
80
        void keyPressEvent(QKeyEvent *);
 
81
        void dragEnterEvent(QDragEnterEvent *);
 
82
        void dropEvent(QDropEvent *);
126
83
        void closeEvent(QCloseEvent *);
 
84
        void resizeEvent(QResizeEvent*);
 
85
 
127
86
        void windowActivationChange(bool);
 
87
        void mucInfoDialog(const QString& title, const QString& message, const Jid& actor, const QString& reason);
128
88
 
129
89
signals:
130
90
        void aSend(const Message &);
133
93
        void optionsUpdate();
134
94
 
135
95
private slots:
 
96
        void scrollUp();
 
97
        void scrollDown();
136
98
        void mle_returnPressed();
137
99
        void doTopic();
138
100
        void openFind();
139
 
        void doFind(int, int, const QString &);
 
101
        void configureRoom();
 
102
        void doFind(const QString &);
140
103
        void flashAnimate();
141
104
        void pa_updatedActivity();
142
105
        void goDisc();
144
107
        void lv_action(const QString &, const Status &, int);
145
108
        void doClear();
146
109
        void doClearButton();
147
 
        void toggleSmallChat();
148
110
        void buildMenu();
149
111
        void logSelectionChanged();
 
112
        void setConnecting();
 
113
        void unsetConnecting();
 
114
        void action_error(MUCManager::Action, int, const QString&);
 
115
        void updateIdentityVisibility();
 
116
#ifdef WHITEBOARDING
 
117
        void openWhiteboard();
 
118
#endif
 
119
        void chatEditCreated();
150
120
 
151
121
public:
152
122
        class Private;
 
123
        friend class Private;
153
124
private:
154
125
        Private *d;
 
126
        Ui::GroupChatDlg ui_;
155
127
 
156
128
        void doFlash(bool);
157
129
        void doAlert();
165
137
        QString getNickColor(QString);
166
138
        QMap<QString,int> nicks;
167
139
        int nicknumber;
 
140
        PsiOptions* options_;
168
141
};
169
142
 
170
143
class GCFindDlg : public QDialog
171
144
{
172
145
        Q_OBJECT
173
146
public:
174
 
        GCFindDlg(int, int, const QString &, QWidget *parent=0, const char *name=0);
 
147
        GCFindDlg(const QString &, QWidget *parent=0, const char *name=0);
175
148
        ~GCFindDlg();
176
149
 
177
 
        void found(int, int);
 
150
        void found();
178
151
        void error(const QString &);
179
152
 
180
153
signals:
181
 
        void find(int, int, const QString &);
 
154
        void find(const QString &);
182
155
 
183
156
private slots:
184
157
        void doFind();
185
158
 
186
159
private:
187
 
        int para, index;
188
160
        QLineEdit *le_input;
189
161
};
 
162
 
 
163
#endif