diff options
| author | Peter Penz <[email protected]> | 2008-04-09 20:12:43 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2008-04-09 20:12:43 +0000 |
| commit | 9d4250e10ada4e2410722951dbd406263b61041c (patch) | |
| tree | 6adfd44875d3844ad97805b35c29c50a633a9344 /src/kformattedballoontipdelegate.h | |
| parent | 60f40aaa4dcf789ccdd09d12030787c501986252 (diff) | |
Provide tooltips. Per default tooltips are turned off because the information sidebar is turned on already.
Thanks a lot to Konstantin Heil and Fredrik Höglund for the code :-)
CCMAIL: [email protected]
CCMAIL: [email protected]
svn path=/trunk/KDE/kdebase/apps/; revision=795324
Diffstat (limited to 'src/kformattedballoontipdelegate.h')
| -rw-r--r-- | src/kformattedballoontipdelegate.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/src/kformattedballoontipdelegate.h b/src/kformattedballoontipdelegate.h new file mode 100644 index 000000000..c4448b8c3 --- /dev/null +++ b/src/kformattedballoontipdelegate.h @@ -0,0 +1,41 @@ +/******************************************************************************* + * Copyright (C) 2008 by Fredrik Höglund <[email protected]> * + * Copyright (C) 2008 by Konstantin Heil <[email protected]> * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * + *******************************************************************************/ + +#ifndef KFORMATTEDBALLOONTIPDELEGATE_H +#define KFORMATTEDBALLOONTIPDELEGATE_H + +#include "ktooltip.h" +#include <QPainter> + +class KFormattedBalloonTipDelegate : public KToolTipDelegate +{ +public: + KFormattedBalloonTipDelegate() {} + ~KFormattedBalloonTipDelegate() {} + + QSize sizeHint(const KStyleOptionToolTip *option, const KToolTipItem *item) const; + void paint(QPainter *painter, const KStyleOptionToolTip *option, const KToolTipItem *item) const; + QRegion inputShape(const KStyleOptionToolTip *option) const; + QRegion shapeMask(const KStyleOptionToolTip *option) const; + + QPainterPath createPath(const KStyleOptionToolTip *option, QRect *contents) const; +}; + +#endif |
