[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    KKeyDialog and KAccel
From:       Andreas Beckermann <b_mann () gmx ! de>
Date:       2002-05-02 11:41:27
[Download RAW message or body]

Hi @ll
I may be blind but I cannot find a solution for this:
I want to define several keys for a game and I am using KAccel, so that they 
can be configured on runtime.
Now I want them to be displayed in the "Configure Shortcuts" dialog, but 
KKeyDialog forces me to decide - either to use configure(KAccel*) or 
configure(KActionCollection*) but I want to use both of them!
Sadly I can't easily reimplement KKeyDialog to do so since 
KKeyChooser::insert(KAccel*) is protected.

The only solutions I can found by now:
1. implement all accels as KActions (*really* ugly in a game!)
2. add KKeyDialog::insert(KAccel*) and/or make KKeyChooser::insert(KAccel*) 
public
3. subclass KKeyChooser in my game and insert the KAccel object myself
 (I'm sure other programs could use it as well, that's why I don't want to do 
this)

I could only find workarounds for this in existing code: most games simply use 
KKeyDialog::configure(KAccel*) and ignore configuration of KActionCollection, 
most other programs which use a separate KAccel object don't allow 
configuration in the same dialog, but in a separated one (e.g. kate in 
configure kate->editor->keyboard).

Simply adding KKeyDialog::insert(KAccel*) seems to work, btw.

CU
Andi


 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic