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

List:       kde-devel
Subject:    Re: Small feature request about KAccel
From:       Toivo Pedaste <toivo () ucs ! uwa ! edu ! au>
Date:       1999-05-25 2:17:15
[Download RAW message or body]

Have a look at KAccelMenu which is in Kdelibs in the CVS, it
has exactly this functionality.

>KAccel is very very heavy to use when used in conjunction with
>menu items.
>It features
> void changeMenuAccel ( QPopupMenu *menu, int id, const QString& action );
>but it has to be called twice in the code : once in the constructor, no 
problem,
>but also once (for each item!) after calling KKeyDialog::configureKeys -
>which means that each id has to be stored. It works, but I find it rather 
heavy.

>Why not store the QPopupMenu * and the id together with the action, in order 
to
>update the menu item when the action key is updated ?

>For heaviness reduction, insertItem and connectItem could even be merged IMHO.
>(or connectItem could stay, but connect to the slot AND to the popupmenu).



-- 
 Toivo Pedaste                        Email:  toivo@ucs.uwa.edu.au
 University Computing Services,       Phone:  +61 8 9 380 2605
 University of Western Australia      Fax:    +61 8 9 380 1109
"The time has come", the Walrus said, "to talk of many things"...

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

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