KVIrc 5.2.4
Developer APIs
KviTalToolTip.h
Go to the documentation of this file.
1#ifndef _KVI_TAL_TOOLTIP_H_
2#define _KVI_TAL_TOOLTIP_H_
3//=============================================================================
4//
5// File : KviTalToolTip.h
6// Creation date : Mon May 05 2008 11:25:08 by Alessandro Carbone
7//
8// This file is part of the KVIrc IRC client distribution
9// Copyright (C) 2008 Alessandro Carbone (elfonol at gmail dot com)
10//
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 option) any later version.
15//
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.
20//
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.
24//
25//=============================================================================
26
27#include "kvi_settings.h"
28
29#include <QToolTip>
30#include <QObject>
31
32class KviTalToolTip;
33
34// This is useful only with Qt4, but we put it here anyway
35// to have both a consistent API and make moc happy
36class KviTalToolTipHelper : public QObject
37{
38 friend class KviTalToolTip;
39 Q_OBJECT
40public:
41 KviTalToolTipHelper(KviTalToolTip * pToolTip, QWidget * pWidget);
43
44protected:
46
47protected:
48 bool eventFilter(QObject * pObject, QEvent * pEvent) override;
49 void toolTipDying();
50};
51
53{
54 friend class KviTalToolTipHelper;
55
56public:
57 KviTalToolTip(QWidget * pParent);
58 virtual ~KviTalToolTip();
59
60protected:
62 QWidget * m_pParent;
63
64public:
65 static void add(QWidget * widget, const QString & text);
66 static void remove(QWidget * widget);
67 virtual void tip(const QRect & rect, const QString & text);
68
69protected:
70 virtual void maybeTip(const QPoint & p);
71 void helperDying();
72};
73
74#endif // _KVI_TAL_TOOLTIP_H_
Definition KviTalToolTip.h:37
bool eventFilter(QObject *pObject, QEvent *pEvent) override
Definition KviTalToolTip.cpp:51
KviTalToolTip * m_pToolTip
Definition KviTalToolTip.h:45
void toolTipDying()
Definition KviTalToolTip.cpp:46
~KviTalToolTipHelper()
Definition KviTalToolTip.cpp:37
Definition KviTalToolTip.h:53
KviTalToolTipHelper * m_pHelper
Definition KviTalToolTip.h:61
QWidget * m_pParent
Definition KviTalToolTip.h:62
#define p
Definition detector.cpp:81
This file contains compile time settings.
#define KVILIB_API
Definition kvi_settings.h:124