From kde-commits Mon Aug 31 23:10:50 2009 From: Eric Laffoon Date: Mon, 31 Aug 2009 23:10:50 +0000 To: kde-commits Subject: branches/KDE/3.5/kdewebdev/kommander/widgets Message-Id: <1251760250.269717.23002.nullmailer () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=125176026000791 SVN commit 1017933 by sequitur: add context menu M +7 -0 pixmaplabel.cpp M +2 -0 pixmaplabel.h --- branches/KDE/3.5/kdewebdev/kommander/widgets/pixmaplabel.cpp #1017932:1017933 @@ -94,6 +94,13 @@ emit widgetOpened(); } +void PixmapLabel::contextMenuEvent( QContextMenuEvent * e ) +{ + e->accept(); + QPoint p = e->globalPos(); + emit contextMenuRequested(p.x(), p.y()); +} + bool PixmapLabel::isFunctionSupported(int f) { return f == DCOP::text || f == DCOP::setText || f == DCOP::clear || f == DCOP::geometry; --- branches/KDE/3.5/kdewebdev/kommander/widgets/pixmaplabel.h #1017932:1017933 @@ -56,8 +56,10 @@ signals: void widgetOpened(); void widgetTextChanged(const QString&); + void contextMenuRequested(int xpos, int ypos); protected: void showEvent(QShowEvent *e); + void contextMenuEvent( QContextMenuEvent * e ); private: };