KeyBindings & Friends in KDE 4.0

Benjamin Meyer ben at
Sat May 22 04:14:01 BST 2004

Hash: SHA1

Most applications have a one line function in them as follows: 

 * Bring up the key configuration dialog.
void KTron::configureKeys(){
  KKeyDialog::configure(actionCollection(), this);

What if we made this a virtual function in KMainWindow?  Then for the majority 
of applications they would only have to do:

KStdAction::keyBindings(this, SLOT(configureKeys()), actionCollection());
But they could still overload the function and do their own thing.

Same with configuring the toolbars...

KStdAction::configureToolbars(this, SLOT(configuretoolbars() ), 
actionCollection(), "configuretoolbars");
Or even go one step further when createGUI is called if a toolbar is created 
the configure and show actions are automaticly added and handled same with 

Also what about turning  setAutoSaveSettings() on by default rather then 
having every single application have to call it (and some forgetting to)?

I am just thinking about things that almost every application re-implements on 
their own even though it could be handled in one place giving the user a more 
common experience across KDE.

If this sounds like a good idea I'll add it to the kdelibs TODO list for KDE4.

- -Benjamin Meyer

- -- 
Public Key:
Version: GnuPG v1.2.4 (GNU/Linux)


More information about the kde-core-devel mailing list