[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: KActions...
From: Simon Hausmann <shaus () helios ! med ! Uni-Magdeburg ! DE>
Date: 2000-03-28 10:52:38
[Download RAW message or body]
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() :-)
> 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 ) .
Ciao,
Simon
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic