[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 12:50:41
[Download RAW message or body]
On Tue, 28 Mar 2000, Simon Hausmann wrote:
>On Tue, 28 Mar 2000, Simon Hausmann wrote:
>
>> I don't know, but perhaps the solution here is to use the
>> getToolButtonId() method in kaction.cpp for both cases, when plugging an
>> action into a QPopupMenu and when plugging into a KToolBar.
>
>Sorry for replying to my on posting, but I just realized that it doesn't
>work. We can only specify ids >=0 for menu items (<0 will result in a
>get_seq_id() call) . And ids >=0 are likely to become duplicate when
>people mix "manual" insertItem calls and plug()'s on a popupmenu.
Why not use names instead of IDīs? When you want to do something with kaction
you have to do (from KTMainWindow):
actionCollection()->action("name_of_action")->setEnabled(bla);
So KAction could emit signal internalActivated(KAction *k):
void KAction::slotActivated()
{
emit activated();
+ emit internalActivated(this);
}
KActionCollection is connected to internalActivated and emits
"signal activated (const *char name)"
slotInternalActivated(KAction *ka)
{
emit activated(ka->name())
}
Same for signals checked, enabled...
--
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