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

List:       kde-devel
Subject:    KToggleActions
From:       Klaus Niederkrueger <kniederk () MI ! Uni-Koeln ! DE>
Date:       2003-09-12 9:35:17
[Download RAW message or body]

Hi,

Over the last days I have been playing with KToggleActions and I would
like to propose a few things:

I think the standard signal for this action should be "toggle" not
"activate". If this was the case, I could just do:

(void) new KToggleAction(..., SLOT(handletoggle(bool)), ...);

but right now one needs to do

KToggleAction tmp = new KToggleAction(...);
connect(tmp, SIGNAL(toggle(bool)), widget, SLOT(handletoggle(bool));

Of course one can also handle this in the activate-slot, but then one
needs to remember the ToggleAction that send the signal.



Also I have found a problem (in my opinion) with the setChecked(bool):

I wanted to implement an Action, which sets all my ToggleActions to true,
but if I do:

toggleaction1->setChecked(true);
toggleaction2->setChecked(true);
toggleaction3->setChecked(true);
...

the toggle-signal is not emitted!!

So I have to do

if(!toggleaction1->checked()) toggleaction->activate();
...

or possibly

toggleaction1->setChecked(true); emit toggleaction1->toggle();
...


What do you think? Is there something I missed? Thanks


Cheers

	Klaus

 
>> 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