1
/****************************************************************************
2
** chatdlg.h - a single window chat dialog
3
** Copyright (C) 2001, 2002 Justin Karneges
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.
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.
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.
19
****************************************************************************/
27
#include<qtoolbutton.h>
33
#include"uniquewindow.h"
35
class ChatDlg : public QWidget, public UniqueWindow
39
ChatDlg(UserListItem *item, const QString &, int _localStatus, QWidget *parent=0);
42
QString & jid() { return v_jid; }
43
static ChatDlg *find(const QString &);
44
static QSize defaultSize();
51
void keyPressEvent(QKeyEvent *);
52
void closeEvent(QCloseEvent *);
53
void resizeEvent(QResizeEvent *);
54
void showEvent(QShowEvent *);
55
void windowActivationChange(bool);
58
void aSend(const Message &);
59
void aHistory(const QString &jid);
60
void aAuth(const QString &jid);
61
void aAdd(const QString &jid);
62
void aInfo(const QString &jid);
63
void aOpenURL(const QString &url);
66
void localUpdate(const JabRosterEntry &);
67
void updateContact(UserListItem *);
68
void incomingMessage(const Message &);
80
void deferredScroll();
81
void setKeepOpenFalse();
85
QString v_jid, v_nick;
88
QString whoami, dispNick;
93
QLineEdit *le_nick, *le_jid;
94
QLabel *lb_statusIcon;
95
QToolButton *tb_send, *tb_history, *tb_info;
97
void appendMessage(const Message &);
98
void appendSysMsg(const QString &);
102
QTimer *selfDestruct;
103
void setSelfDestruct(int);