1
#ifndef _KVI_IRCVIEWTOOLS_H_
2
#define _KVI_IRCVIEWTOOLS_H_
3
//=============================================================================
5
// File : kvi_ircviewtools.h
6
// Creation date : Sat Oct 9 2004 16:03:01 by Szymon Stefanek
8
// This file is part of the KVirc irc client distribution
9
// Copyright (C) 2004-2008 Szymon Stefanek (pragma at kvirc dot net)
11
// This program is FREE software. You can redistribute it and/or
12
// modify it under the terms of the GNU General Public License
13
// as published by the Free Software Foundation; either version 2
14
// of the License, or (at your opinion) any later version.
16
// This program is distributed in the HOPE that it will be USEFUL,
17
// but WITHOUT ANY WARRANTY; without even the implied warranty of
18
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
19
// See the GNU General Public License for more details.
21
// You should have received a copy of the GNU General Public License
22
// along with this program. If not, write to the Free Software Foundation,
23
// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
25
//=============================================================================
27
#include "kvi_settings.h"
28
#include "kvi_tal_tooltip.h"
32
#include <QTreeWidget>
40
class KviIrcViewToolTip : public KviTalToolTip
43
KviIrcViewToolTip(KviIrcView * pView);
44
virtual ~KviIrcViewToolTip();
48
virtual void maybeTip(const QPoint &pnt);
50
void doTip(const QRect &rct,const QString &str){ tip(rct,str); };
53
//=========================================================================================================
54
// Item for the filter list view
55
//=========================================================================================================
57
class KviIrcViewToolWidget;
60
class KviIrcMessageCheckListItem : public QTreeWidgetItem
63
KviIrcMessageCheckListItem(QTreeWidget * par,KviIrcViewToolWidget * w,int id);
64
~KviIrcMessageCheckListItem();
68
KviIrcViewToolWidget * m_pToolWidget;
70
//void setToolWidget(KviIrcViewToolWidget * w){ m_pToolWidget = w; };
71
void setOn(bool b){setCheckState(0,b?Qt::Checked:Qt::Unchecked);};
73
if (checkState(0)==Qt::Checked) return true;
78
//=========================================================================================================
79
// Search tools widget
80
//=========================================================================================================
84
class KviIrcViewToolWidget : public QFrame
86
friend class KviIrcView;
89
KviIrcViewToolWidget(KviIrcView * par);
90
~KviIrcViewToolWidget();
92
KviIrcView * m_pIrcView;
93
QLineEdit * m_pStringToFind;
96
QCheckBox * m_pCaseSensitive;
97
QCheckBox * m_pRegExp;
98
QCheckBox * m_pExtendedRegExp;
100
QLabel * m_pFindResult;
102
QTreeWidget * m_pFilterView;
104
KviIrcMessageCheckListItem ** m_pFilterItems;
107
void setFindResult(const QString & text);
108
inline bool messageEnabled(int msg_type){ return m_pFilterItems[msg_type]->isOn();};
113
void filterEnableAll();
114
void filterEnableNone();
118
virtual void hideEvent( QHideEvent * );
119
virtual void closeEvent( QCloseEvent * e );
120
virtual void mouseMoveEvent(QMouseEvent *);
121
virtual void mousePressEvent(QMouseEvent *);
124
#endif //!_KVI_IRCVIEWTOOLS_H_