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);
|
||||
|
@ -277,7 +277,14 @@ public:
|
||||
* Setter for data shown in tooltip
|
||||
* @param data a ToolTip::Data object containing icon and text
|
||||
*/
|
||||
void setToolTip( const ToolTipData &dt );
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user