From 58e9d2c40f452e354367a2283274057cbbaa71be Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Tue, 30 Sep 2008 18:26:50 +0000 Subject: [PATCH] add a convenience method, clearToolTipContent, which turns a common 3 liner into one svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=866377 --- tooltipmanager.cpp | 6 ++++++ tooltipmanager.h | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/tooltipmanager.cpp b/tooltipmanager.cpp index 25df21b8a..0b243ec31 100644 --- a/tooltipmanager.cpp +++ b/tooltipmanager.cpp @@ -236,6 +236,12 @@ void ToolTipManager::setToolTipContent(QGraphicsWidget *widget, const ToolTipCon tooltip->updateTheme(); } +void ToolTipManager::clearToolTipContent(QGraphicsWidget *widget) +{ + ToolTipContent t; + setToolTipContent(widget, t); +} + bool ToolTipManager::widgetHasToolTip(QGraphicsWidget *widget) const { return d->tooltips.contains(widget); diff --git a/tooltipmanager.h b/tooltipmanager.h index c9dad242c..a0b2f35c3 100644 --- a/tooltipmanager.h +++ b/tooltipmanager.h @@ -179,6 +179,12 @@ public: */ void setToolTipContent(QGraphicsWidget *widget, const ToolTipContent &data); + /** + * Clears the tooltip data associated with this widget, but keeps + * the widget registered. + */ + void clearToolTipContent(QGraphicsWidget *widget); + /** * Checks whether a widget has a tooltip associated with it. *