open tasks, jobs, unmaintained stuff, etc.

Frans Englich frans.englich at telia.com
Sat Mar 6 21:07:31 CET 2004


On Friday 05 March 2004 17:42, Alexander Neundorf wrote:

Hello people :)

Here's something for everyone to keep an eye for:

KDE has an class called KStdGuiItem(kdelibs/kdeui/kstdguiitem.h) which holds 
standardized KGuiItem(kdelibs/kdeui/kguiitem.h) such as "ok, "close", "quit" 
etc.
These are used with KPushButtons among other things, in order to provide 
consistency in user interfaces - it ensures all ok buttons have the same 
icon, no misspellings etc. It also means less work since only one "ok" string 
has to be translated, more flexibility and lesser code.
For example, the following code will result in a push button with the text 
"apply" and a nice green little tick:

KPushButton* btn = new KPushButton( KStdGuiItem::apply(), this );


Now, the problem is that a lot of developers forget to use KStdGuiItems and 
instead use home brewn versions, leaving an inconsistent interface and clumsy 
code.
So, one could search for the various texts the standard gui item has and/or 
keep an eye out for buttons which uses custom code(which usually means they 
have no icon) and then go patching :)

Cheers,

		Frans



More information about the kde-quality mailing list