Working method for focusing widgets in panels and keyboard navigation for Tasks applet
Chani
chanika at gmail.com
Mon Aug 24 19:41:44 CEST 2009
> > > * way for a widget to advertise that it should receive keyboard focus
> > > when clicked and have PanelView grab focus in that case
> >
> > neglecting for a while how actually give focus to the panel, api-wise on
> > plasma side could work as this:
> > Applet::addFocusWidget(QGraphicsWidget *)
> > it's usedto add widgets that are supposed to request focus when clicked,
> > thinking about it maybe we want addFocusWidgets(QList<QGraphicsWidget *>)
ok, so then an applet would call addFocusWidget(this) if it needs kbd focus,
much like it calls setHasConfigurationInterface... and it'd also have the
flexibility to call that on subsets of itself (should it take a graphicswidget
or graphicsitem? would it ever make sense to focus a qgraphicsitem?)
and, I'm assuming it can add >1, does that mean that if it adds a widget
that's part of itself that we sent focus to that widget when that widget is
clicked? or we send focus to it when any part of the applet is clicked?
...probably the former, I suppose.
and then whoever does the actual work will have to read that list of widgets,
and probably keep an eye on them.
>
> i don't think we need to provide an addFocusWidgets that takes a list; the
> user of it can call add multiple times. if there was a method that added a
> list, i'd think it should be called "setFocusWidgets"? removal would be
> achieved by deletion of the widget, i suppose? or would it make sense to
> have a removeFocusWidget as well for symmetry?
probably should have it. extenders? applets that embed other applets? I'm sure
eventually someone will want to remove something without deleting it.
--
This message brought to you by eevil bananas and the number 3.
www.chani3.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/plasma-devel/attachments/20090824/bec5be88/attachment-0001.sig
More information about the Plasma-devel
mailing list