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

List:       kde-core-devel
Subject:    Re: KActions...
From:       Sven Radej <sven () lisa ! exp ! univie ! ac ! at>
Date:       2000-03-28 11:00:15
[Download RAW message or body]

On Tue, 28 Mar 2000, Simon Hausmann wrote:
>On Tue, 28 Mar 2000, Sven Radej wrote:
>
>> Hi (Kurt)
>> 
>> I have multiple [KToggle | KRadio]actions (setA, setB, setC), and I donīt want
>> to connect each action to its own slot - I want to connect them all to one
>> common slot which knows which action has been activated, like slotABC(int ID). 
>> 
>> Question 1: How? I guess KActionCollection should also have signal
>> activated(const char *action_name) or activated (KAction *a).
>
>use sender() :-)
Ummm...   shouldnīt there be some other way?

>> Question 2: For KRadioActions; if I select one, others should get unselected.
>> Does KActionCollection do that? If yes, how does it know which are in the same
>> group and which are not - do I have to call myAction->setGroup("groupname");
>> for that? Or do _I_ have to deselect others?
>
>use KToggleAction for all those actions and call
>oneAction->setExclusiveGroup( "a_group" ); for all (and make sure all
>those actions have the same parent object (preferreably a
>KActionCollection ) .
Thanks!
-- 
Sven Radej      radej@kde.org
KDE developer   Visit http://www.kde.org

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

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