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
****************************************************************************/
2
* historydlg.h - a dialog to show event 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 library; if not, write to the Free Software
17
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21
21
#ifndef HISTORYDLG_H
22
22
#define HISTORYDLG_H
26
24
#include<qlistview.h>
27
25
#include<qsimplerichtext.h>
32
#include"uniquewindow.h"
35
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;
38
HistoryViewItem(PsiEvent *, const QString &, int id, QListView *);
49
void paintCell(QPainter *p, const QColorGroup & cg, int column, int width, int alignment);
51
int compare(QListViewItem *, int column, bool ascending) const;
54
54
class HistoryView : public QListView
58
HistoryView(QWidget *parent=0, const char *name=0);
61
void addMessage(Message *);
64
void keyPressEvent(QKeyEvent *e);
58
HistoryView(QWidget *parent=0, const char *name=0);
61
void addEvent(PsiEvent *, const QString &);
64
void keyPressEvent(QKeyEvent *e);
65
void resizeEvent(QResizeEvent *e);
67
void aOpenMessage(const Message &);
68
void aOpenEvent(PsiEvent *);
73
void qlv_doubleclick(QListViewItem *);
74
void qlv_contextPopup(QListViewItem *, const QPoint &, int);
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
80
class HistoryDlg : public QWidget
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);
84
HistoryDlg(const Jid &, PsiAccount *);
88
void keyPressEvent(QKeyEvent *e);
89
void closeEvent(QCloseEvent *e);
95
void openMessage(const Message &);
92
void openEvent(PsiEvent *);
104
void comboChanged(int);
105
void searchTextChanged(const QString &);
105
void actionOpenEvent(PsiEvent *);
109
void actionOpenMessage(const Message &);
109
void le_textChanged(const QString &);
114
QLineEdit *le_search;
116
void displayResult(const EDBResult *, int, int max=-1);
117
void exportHistory(const QString &fname);