Operating under the premise that applets will receive notified with
constraintsUpdated(LocationConstraint) whenever there is a change in position relative view makes global geometry handling much easier. This change ensures that moving an applet via its handle follows the above premise. svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=746173
This commit is contained in:
parent
10af4df668
commit
80bbadc39f
@ -335,6 +335,14 @@ void AppletHandle::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
|
||||
}
|
||||
}
|
||||
|
||||
QVariant AppletHandle::itemChange(GraphicsItemChange change, const QVariant &value)
|
||||
{
|
||||
if (change == ItemPositionHasChanged && m_applet) {
|
||||
m_applet->constraintsUpdated(Plasma::LocationConstraint);
|
||||
}
|
||||
return QGraphicsItem::itemChange(change, value);
|
||||
}
|
||||
|
||||
void AppletHandle::hoverEnterEvent(QGraphicsSceneHoverEvent *event)
|
||||
{
|
||||
Q_UNUSED(event);
|
||||
|
@ -52,6 +52,7 @@ class AppletHandle : public QObject, public QGraphicsItem
|
||||
void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
|
||||
void hoverEnterEvent(QGraphicsSceneHoverEvent *event);
|
||||
void hoverLeaveEvent(QGraphicsSceneHoverEvent *event);
|
||||
QVariant itemChange(GraphicsItemChange change, const QVariant &value);
|
||||
|
||||
Q_SIGNALS:
|
||||
void disappearDone(AppletHandle *self);
|
||||
|
Loading…
Reference in New Issue
Block a user