From kde-commits Thu Dec 23 08:52:49 2004 From: =?utf-8?q?Aaron=20J=2E=20Seigo?= Date: Thu, 23 Dec 2004 08:52:49 +0000 To: kde-commits Subject: kdebase/kicker/buttons Message-Id: <20041223085249.E9BEB1BC53 () office ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=110379198002102 CVS commit by aseigo: show tooltips unless we have the icon zoomy thing (or tooltips are turned off) M +21 -0 panelbutton.cpp 1.17 M +1 -1 panelbutton.h 1.15 --- kdebase/kicker/buttons/panelbutton.cpp #1.16:1.17 @@ -26,4 +26,5 @@ CONNECTION WITH THE SOFTWARE OR THE USE #include #include +#include #include @@ -74,4 +75,14 @@ PanelButton::PanelButton( QWidget* paren void PanelButton::configure() { + if (!Kicker::the()->showMouseOverEffects() && + Kicker::the()->showTooltips()) + { + QToolTip::add(this, m_tip); + } + else + { + QToolTip::remove(this); + } + QString name = tileName(); if( name.isEmpty() ) @@ -261,4 +272,14 @@ void PanelButton::showMouseOver() } +void PanelButton::setTip(const QString& tip) +{ + m_tip = tip; + if (!Kicker::the()->showMouseOverEffects() && + Kicker::the()->showTooltips()) + { + QToolTip::add(this, m_tip); + } +} + void PanelButton::hideMouseOver() { --- kdebase/kicker/buttons/panelbutton.h #1.14:1.15 @@ -56,5 +56,5 @@ public: const QString& title() const { return m_title; } - void setTip(const QString& tip) { m_tip = tip; } + void setTip(const QString& tip); const QString& tip() const { return m_tip; }