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; }