a rather horrific hack, passing the mouse event around, but it's the only way i can find to *reliably* get the event passed around which we must have to locate where on screen to pop things up at

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=729453
This commit is contained in:
Aaron J. Seigo 2007-10-26 02:15:04 +00:00
parent c0231730e2
commit 49914e5a49
2 changed files with 6 additions and 1 deletions

View File

@ -922,8 +922,9 @@ void Icon::mousePressEvent(QGraphicsSceneMouseEvent *event)
d->state = Private::PressedState;
emit pressed(true);
emit pressed(true, event);
event->ignore();
event->accept();
update();
}
@ -948,9 +949,11 @@ void Icon::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
if (was == Private::PressedState) {
emit pressed(false);
emit pressed(false, event);
if (inside) {
emit clicked();
emit clicked(event);
}
d->state = Private::NoState;
}

View File

@ -177,11 +177,13 @@ Q_SIGNALS:
* Indicates when the icon has been pressed.
*/
void pressed(bool down);
void pressed(bool down, QGraphicsSceneMouseEvent *event);
/**
* Indicates when the icon has been clicked.
*/
void clicked();
void clicked(QGraphicsSceneMouseEvent *event);
protected:
bool isDown();