diff --git a/containment.cpp b/containment.cpp index bba096786..2f1e57a7d 100644 --- a/containment.cpp +++ b/containment.cpp @@ -482,18 +482,6 @@ void Containment::setLocation(Location location) return; } - bool emitGeomChange = false; - - if ((location == TopEdge || location == BottomEdge) && - (d->location == TopEdge || d->location == BottomEdge)) { - emitGeomChange = true; - } - - if ((location == RightEdge || location == LeftEdge) && - (d->location == RightEdge || d->location == LeftEdge)) { - emitGeomChange = true; - } - d->location = location; foreach (Applet *applet, d->applets) { @@ -751,7 +739,11 @@ void Containment::wheelEvent(QWheelEvent *event) QString trigger = ContainmentActions::eventToString(event); if (d->prepareContainmentActions(trigger, event->globalPos())) { - d->actionPlugins()->value(trigger)->contextEvent(event); + if (event->delta() > 0) { + d->actionPlugins()->value(trigger)->performNext(); + } else { + d->actionPlugins()->value(trigger)->performPrevious(); + } event->accept(); } } diff --git a/containmentactions.cpp b/containmentactions.cpp index 1c2d02ad3..7c159db62 100644 --- a/containmentactions.cpp +++ b/containmentactions.cpp @@ -128,9 +128,17 @@ void ContainmentActions::configurationAccepted() //do nothing by default } -void ContainmentActions::contextEvent(QEvent *event) +QAction *ContainmentActions::triggerableContextAction() +{ + return 0; +} + +void ContainmentActions::performNext() +{ +} + +void ContainmentActions::performPrevious() { - Q_UNUSED(event) } QList ContainmentActions::contextualActions() diff --git a/containmentactions.h b/containmentactions.h index b5305d5eb..e092bf91f 100644 --- a/containmentactions.h +++ b/containmentactions.h @@ -115,7 +115,9 @@ class PLASMA_EXPORT ContainmentActions : public QObject * those parameters. * The event may be a QMouseEvent or a QWheelEvent. */ - virtual void contextEvent(QEvent *event); + virtual QAction *triggerableContextAction(); + virtual void performNext(); + virtual void performPrevious(); /** * Implement this to provide a list of actions that can be added to another menu