1
/****************************************************************************
2
** eventdlg.h - multi-window chat dialog for sending/receiving events
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<qpushbutton.h>
28
#include<qtoolbutton.h>
39
#include"uniquewindow.h"
41
class AnimatedButton : public QPushButton
45
AnimatedButton(QWidget *parent=0, const char *name=0);
48
bool isActive() { return v_isActive; }
56
void changeIcon(const QPixmap &);
63
class ELineEdit : public QLineEdit
67
ELineEdit(QWidget *parent=0, const char *name=0);
70
void dragEnterEvent(QDragEnterEvent *);
71
void dropEvent(QDropEvent *);
74
class EventDlg : public QWidget, public UniqueWindow
78
EventDlg(UserListItem *item, int localStatus, bool isUnique, bool compose=FALSE, bool urlMode=FALSE);
79
EventDlg(const QStringList &to, int x_localStatus);
84
QString & jid() { return v_jid; }
85
static EventDlg *find(const QString &);
86
static QSize defaultSize();
90
void resizeEvent(QResizeEvent *);
93
void aSend(const Message &);
94
void aHistory(const QString &jid);
95
void aReply(const QString &jid);
96
void aReadNext(const QString &jid);
97
void aAuth(const QString &jid);
98
void aInfo(const QString &jid);
99
void aOpenURL(const QString &url);
102
void localUpdate(const JabRosterEntry &);
103
void updateContact(UserListItem *);
104
void updateReadNext(int nextType, int amount);
105
void updateEvent(const Message &);
106
void closeAfterReply();
107
void optionsUpdate();
114
void setCurrentTime();
115
void showSubject(bool);
122
bool isCompose, isMulti;
123
QString v_jid, v_nick;
133
QWidget *lo_single, *lo_multi;
135
QLabel *lb_statusIcon, *lb_statusStr, *lb_eventType, *lb_time;
136
QLineEdit *le_nick, *le_jid;
138
QPushButton *pb_toMulti, *pb_toSingle;
139
QToolButton *tb_subj, *tb_url, *tb_history, *tb_info;
140
QComboBox *cb_eventType;
149
QLabel *lb_url, *lb_desc;
150
QLineEdit *le_url, *le_desc;
152
QPushButton *pb_button1;
155
AnimatedButton *pb_next;
159
void setTime(const QDateTime &);
161
void keyPressEvent(QKeyEvent *e);