add a convenience method, clearToolTipContent, which turns a common 3 liner into one

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=866377
This commit is contained in:
Aaron J. Seigo 2008-09-30 18:26:50 +00:00
parent 1e12bfe8ca
commit 58e9d2c40f
2 changed files with 12 additions and 0 deletions

View File

@ -236,6 +236,12 @@ void ToolTipManager::setToolTipContent(QGraphicsWidget *widget, const ToolTipCon
tooltip->updateTheme(); tooltip->updateTheme();
} }
void ToolTipManager::clearToolTipContent(QGraphicsWidget *widget)
{
ToolTipContent t;
setToolTipContent(widget, t);
}
bool ToolTipManager::widgetHasToolTip(QGraphicsWidget *widget) const bool ToolTipManager::widgetHasToolTip(QGraphicsWidget *widget) const
{ {
return d->tooltips.contains(widget); return d->tooltips.contains(widget);

View File

@ -179,6 +179,12 @@ public:
*/ */
void setToolTipContent(QGraphicsWidget *widget, const ToolTipContent &data); 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. * Checks whether a widget has a tooltip associated with it.
* *