KAction changes

Simon Hausmann hausmann at kde.org
Tue Dec 5 17:51:33 GMT 2006


On Monday 04 December 2006 08:19, Kevin Ottens wrote:
> Le lundi 4 décembre 2006 01:55, Andreas Hartmetz a écrit :
> > Well, it was planned (by Olivier Goffart and me) to add mouse gesture
> > and voice triggers to KAction. From a user's perspective they probably
> > don't *need* to be handled by KAction, of course. From a programmer's
> > perspective however, this seems to be the only way that makes sense. I
> > have not yet done anything to implement voice gestures (and I don't
> > know if I will be able to pull it off at all) but mouse gestures are
> > actually pretty easy to add to KAction, I tried that. You need a
> > KGestureMap (== event filter for KApplication with gesture recognizer)
> > for each application and some fields in KAction's private data.
>
> I don't think our current changes avoid doing this. We're leaning toward
> having no state stored in KAction itself and use QObject dynamic properties
> instead. KAction will basically provide the necessary convenience to query
> those properties. So basically if the fields you planned to add in KAction
> private data can be stored in QVariant you'll still be able to add the
> features you planned.

Exactly. And the coolest thing is that you don't really need anything in 
KAction, so you should also be able to add mouse gesture support to any 
QAction. Just store your information as dynamic property.

Simon
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20061205/faa8dee8/attachment.sig>


More information about the kde-core-devel mailing list