whoops, forgot this other half of the commit

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=718011
This commit is contained in:
Aaron J. Seigo 2007-09-27 22:11:46 +00:00
parent 455d9faf55
commit 8f4ed43ae0
2 changed files with 0 additions and 28 deletions

View File

@ -411,32 +411,5 @@ void Widget::reparent(Widget *w)
update();
}
void Widget::contextMenuEvent(QGraphicsSceneContextMenuEvent *contextMenuEvent)
{
//kDebug() << "context menu event!";
if (!scene()) {
return;
}
Widget* item = dynamic_cast<Widget*>(parentItem());
if (!item) {
QGraphicsItem::contextMenuEvent(contextMenuEvent);
return;
}
while (item && item->parentItem()) {
item = dynamic_cast<Widget*>(item->parentItem());
}
if (!item) {
QGraphicsItem::contextMenuEvent(contextMenuEvent);
return;
}
item->contextMenuEvent(contextMenuEvent);
contextMenuEvent->accept();
return;
}
} // Plasma namespace

View File

@ -255,7 +255,6 @@ protected:
* @param widget the parent QWidget (most likely the Corona)
*/
virtual void paintWidget(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
void contextMenuEvent(QGraphicsSceneContextMenuEvent *contextMenuEvent);
private:
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);