Review Request 125226: move EventForge from the desktop containment

Marco Martin notmart at gmail.com
Tue Sep 15 09:16:10 UTC 2015



On Sept. 15, 2015, 12:06 a.m., Marco Martin wrote:
> > This class feels like it's just working round Qt bugs?
> > 
> > Other than that if this is long-term useful, we should do sendPress(flags buttons, flags modifiers, x, y) not just whatever AppletAppearance happened to need (or make it part of makeGrab() if that's all it's for )
> 
> Marco Martin wrote:
>     It can be said it work around Qt bugs, so yeah, not too happy it's needed.
>     maybe to commit to it slightly less it could be put into the plasma-workspace imports (as to say it can be used only in containments)
>     But works around the very way how events are managed in Qt. once a child accepted a press (and maybe some moves) it can't really be interrupted as two items can't accept the same event. So this fakes it by sending fake events to cancel the management cycle initiated by the child on mouyse press. don't think there is really a way about it as is how Qt event management work (and not only in qtquick)

an alternative API may be
PressAndHoldManager {
    dragArea: dragAreaItem
    MouseArea {
        id: dragAreaItem
        MouseArea {
            id: itemToDrag
        }
    }
}

not sure it it would really work


- Marco


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/125226/#review85410
-----------------------------------------------------------


On Sept. 14, 2015, 5:17 p.m., Marco Martin wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/125226/
> -----------------------------------------------------------
> 
> (Updated Sept. 14, 2015, 5:17 p.m.)
> 
> 
> Review request for KDE Frameworks, Plasma and Eike Hein.
> 
> 
> Repository: kdeclarative
> 
> 
> Description
> -------
> 
> EventForge can cancel the half-managed events of child items
> in order to implement the move of them with press and hold,
> not having the parent and the children battling for the same
> press-move-release event sequence.
> 
> API-wise I think it's fine, apart perhaps the EventForge class name
> (perhaps MouseEventGrabber is less technically correct, but still more clear?)
> 
> 
> Diffs
> -----
> 
>   src/qmlcontrols/kquickcontrolsaddons/CMakeLists.txt 5b711e1 
>   src/qmlcontrols/kquickcontrolsaddons/eventforge.h PRE-CREATION 
>   src/qmlcontrols/kquickcontrolsaddons/eventforge.cpp PRE-CREATION 
>   src/qmlcontrols/kquickcontrolsaddons/kquickcontrolsaddonsplugin.cpp a33e03f 
> 
> Diff: https://git.reviewboard.kde.org/r/125226/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Marco Martin
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20150915/d6ae2391/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list