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/ktooltip_p.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/ktooltip_p.h')
| -rw-r--r-- | src/ktooltip_p.h | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/src/ktooltip_p.h b/src/ktooltip_p.h new file mode 100644 index 000000000..16ca85293 --- /dev/null +++ b/src/ktooltip_p.h @@ -0,0 +1,63 @@ +/*************************************************************************** + * Copyright (C) 2008 by Fredrik Höglund <[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 KTOOLTIP_P_H +#define KTOOLTIP_P_H + +class KAbstractToolTipLabel; +class KStyleOptionToolTip; +class KToolTipDelegate; + +class KToolTipManager +{ +public: + ~KToolTipManager(); + + static KToolTipManager *instance() { + if (!s_instance) + s_instance = new KToolTipManager(); + + return s_instance; + } + + void showTip(const QPoint &pos, KToolTipItem *item); + void hideTip(); + + void initStyleOption(KStyleOptionToolTip *option) const; + bool haveAlphaChannel() const; + + void setDelegate(KToolTipDelegate *delegate); + KToolTipDelegate *delegate() const; + +private: + KToolTipManager(); + + KAbstractToolTipLabel *label; + KToolTipItem *currentItem; + KToolTipDelegate *m_delegate; + +#ifdef Q_WS_X11 + bool haveArgbVisual; + Atom net_wm_cm_s0; +#endif + + static KToolTipManager *s_instance; +}; + +#endif |
