Review Request: move sceneEventFilter and mouseMoveEvent from icon to applet

Aaron Seigo aseigo at kde.org
Wed Feb 20 17:40:12 CET 2008


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://mattr.info/r/167/#review156
-----------------------------------------------------------

Ship it!


i'm glad to see this centralized. my only concern is that call installSceneEventFilter like that means we can't know which items are to be tracked for what reason in the event filter; if we extend the use of the event filter to include some other function it may get uncomfortable.

however, i suppose we *could* at that point keep the current code as the fall-through default condition.

as for not possible to drag to the panel, this is not those only issue with the code: it prevents z-order changes as well. at least now that the code is in one place, we can fix these problems in one place.

the solution is to forward these calls on to the handle. of course, the applet doesn't know about the handle right now, but with Qt 4.4 we apparently have the new ability to give items decorations which may resolve this  issue in its entirety.

- Aaron


On 2008-02-20 06:09:08, Marco Martin wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://mattr.info/r/167/
> -----------------------------------------------------------
> 
> (Updated 2008-02-20 06:09:08)
> 
> 
> Review request for Plasma.
> 
> 
> Summary
> -------
> 
> This is a transplant of sceneEventFilter and mouseMoveEvent implementations from the icon applet to the applet class as discussed on plasma-devel a while ago, could save some duplicate code on applets that have widgets that must be able to both manage mouse clicks and being dragged around
> to use this one must do in the applet widget->installSceneEventFilter(this) on every needed widget.
> 
> 
> Diffs
> -----
> 
>   /trunk/KDE/kdebase/workspace/libs/plasma/applet.h
>   /trunk/KDE/kdebase/workspace/libs/plasma/applet.cpp
>   /trunk/KDE/kdebase/workspace/plasma/applets/icon/icon.h
>   /trunk/KDE/kdebase/workspace/plasma/applets/icon/icon.cpp
> 
> Diff: http://mattr.info/r/167/diff
> 
> 
> Testing
> -------
> 
> tested with icon applet and with the trashcan
> it works, but it's not possible to drag icons from desktop to the panel (as it reimplements a piece of the hande, it was so also before)
> 
> 
> Thanks,
> 
> Marco
> 
>



More information about the Panel-devel mailing list