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) > > Marco Martin wrote: > an alternative API may be > PressAndHoldManager { > dragArea: dragAreaItem > MouseArea { > id: dragAreaItem > MouseArea { > id: itemToDrag > } > } > } > > not sure it it would really work
About putting it in workspace, would probably be a better idea, however this may end up being needed in random plasma mobile applications as seems press and hold may end up used a lot looking at the talks about higs - 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 > >
_______________________________________________ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel