Please review: Virtual keyboard plasmoid - Plasmaboard
Aaron J. Seigo
aseigo at kde.org
Mon Aug 3 01:49:03 CEST 2009
On Sunday 02 August 2009, Björn Ruberg wrote:
> after some final polishment I want you to have a look at plasmaboard in
> kdereview/plasma/applets/plasmaboard
> It's a virtual keyboard plasmoid made for every KDE user with a
> touchscreen.
cool; some initial comments/observations:
* there's a mix of whitespace usage in there; sometimes tabs are used to
indent, sometimes spaces. your goal is kdeplasma-addons, so you aren't
required to follow the kdelibs coding style (though you get extra cookies for
doing so ;) but could you use just one formatting style? throughout the code
* the tab key, when pressed, just keeps pressing tab over and over :)
* lots of "magic numbers"; e.g. FuncKey *funcKeys[14] in the header file and
then this in the implementation:
· · i = 0;
· · while ( i < 14 ) {
· · · delete funcKeys[i];
· · · i++;
· · }
perhaps it makes sense to use a QVector here instead. that way you can replace
the above with:
qDeleteAll(funcKeys);
funcKeys.clear();
no magic numbers :)
* it'd be great if the keyboard modifier state was harmonized; e.g. if i press
CAPS LOCK on my keyboard, it would set this on the virtual keyboard and vice
versa. note that there is a "keystate" DataEngine that makes this all very
easy and cross-platform (it has serviceForSource() which lets you modify the
global state of modifiers)
* in FunkKey::toggleOn there is this:
· Plasma::PushButton::setStyleSheet(oldStyle + "color:red;text-
align:center;"); // sorry, but I need some visual confirmation
that color should really be coming out of the Plasma::Theme::colorScheme so it
works with all themes. in any case, i don't ever see the red color? is it
really needed?
* the biggest challenge i see is that there's no support (that i could see?)
for keyboard layouts. this will make our friends around the world sad. :) i
can think of various ways of accomplishing this but probably the most sane one
is to just follow xkb:
http://hektor.umcs.lublin.pl/~mikosmul/computing/articles/custom-keyboard-
layouts-xkb.html
the upside to this is that we can just use what's already there and follow the
system layout settings
> My last addition was this tooltip, which shows the key you last hit. That's
> probably no optimal solution but I failed finding a better one. If someone
> can give me some hints how I can implement a popup like on the iphone
> virtual keyboard, I'm thankful.
what sort of popup are thinking of or wanting? if you can give me a mockup or
a screenshot, i'm sure we can make it happen ;)
--
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA EE75 D6B7 2EB1 A7F1 DB43
KDE core developer sponsored by Qt Software
-------------- 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/20090802/628d90e5/attachment.sig
More information about the Plasma-devel
mailing list