1
/****************************************************************************
2
** historydlg.h - a dialog to show message history
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<qsimplerichtext.h>
32
#include"uniquewindow.h"
35
class HistoryViewItem : public QListViewItem
38
HistoryViewItem(Message *, int id, QListView *);
48
void paintCell(QPainter *p, const QColorGroup & cg, int column, int width, int alignment);
50
int compare(QListViewItem *xi, int column, bool ascending) const;
54
class HistoryView : public QListView
58
HistoryView(QWidget *parent=0, const char *name=0);
61
void addMessage(Message *);
64
void keyPressEvent(QKeyEvent *e);
67
void aOpenMessage(const Message &);
70
void resizeEvent(QResizeEvent *e);
76
void qlv_doubleclick(QListViewItem *);
77
void qlv_contextPopup(QListViewItem *, const QPoint &, int);
81
class HistoryDlg : public QWidget, public UniqueWindow
85
HistoryDlg(UserListItem *item, QWidget *parent=0, const char *name=0);
87
QString & jid() { return v_jid; }
89
static HistoryDlg * find(const QString &);
92
void keyPressEvent(QKeyEvent *e);
95
void openMessage(const Message &);
104
void comboChanged(int);
105
void searchTextChanged(const QString &);
109
void actionOpenMessage(const Message &);
114
QLineEdit *le_search;