have the tooltip inform the widget that it's about to tip so last second updates can be made, particularly nice for expensive tooltips
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=786834
This commit is contained in:
parent
124f1da013
commit
abf654c5c5
@ -135,6 +135,7 @@ void ToolTip::showToolTip()
|
||||
return;
|
||||
}
|
||||
|
||||
d->currentWidget->updateToolTip();
|
||||
setData(*d->currentWidget->toolTip());
|
||||
|
||||
if( d->windowToPreview != 0 ) {
|
||||
|
@ -398,6 +398,10 @@ void Widget::setToolTip(const ToolTipData &tip)
|
||||
}
|
||||
}
|
||||
|
||||
void Widget::updateToolTip()
|
||||
{
|
||||
}
|
||||
|
||||
void Widget::paintWidget(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
|
||||
{
|
||||
Q_UNUSED(painter);
|
||||
|
@ -279,6 +279,13 @@ public:
|
||||
*/
|
||||
void setToolTip(const ToolTipData &dt);
|
||||
|
||||
/**
|
||||
* Called when the tooltip data should be updated, e.g. right before
|
||||
* a tooltip is shown. This allows tips that are more expensive to
|
||||
* create ahead of time to be set at the last possible moment.
|
||||
*/
|
||||
virtual void updateToolTip();
|
||||
|
||||
/**
|
||||
* Recomended position for a popup window like a menu or a tooltip
|
||||
* given its size
|
||||
|
Loading…
Reference in New Issue
Block a user