[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: KKeyDialog and KAccel
From: Ellis Whitehead <kde () ellisw ! net>
Date: 2002-05-02 16:47:35
[Download RAW message or body]
On Thursday 02 May 2002 11:38, Andreas Beckermann wrote:
> Slots are in games often very unhandy. For example I have a hack in kpoker
> which I'd like to get rid of:
> slotExchangeCard1();
> slotExchangeCard2();
> slotExchangeCard3();
> slotExchangeCard4();
> slotExchangeCard5();
> They all simply call setHeld(n); , where n is the number of the slot... All
> of this in a single keyPressEvent() would be nicer.
Hmm... I see your point. Global shortcuts _are_ able to pass integers back
to a slot based on the action's name. I.e., "Switch to Desktop 1" sends 1,
and "Switch to Desktop 2" sends 2.
I could try to do something similar for program shortcuts:
new KAction( i18n("Exchange Card 1"), CTRL+Key_1,
this, SLOT(slotHeld(int)),
pCollection, "exchange {1}" );
If this would work or if you think of a better way, let me know and I'll see
about implementing it. Supporting dynamic actions would be a good thing.
Cheers,
Ellis
>> 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