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

List:       kde-devel
Subject:    using same KAction in MainWindow and View
From:       Andreas Pakulat <apaku () gmx ! de>
Date:       2004-12-31 1:46:54
Message-ID: 20041231014654.GA17715 () morpheus ! matrix ! de
[Download RAW message or body]

Hi,

I got a small problem with a KAction. I'm going to have 4 radiobuttons
to setup a rotation for an image in my app. I'd like to have these 4
radiobuttons both in the view for my document and also in the
mainwindow's menu. Only I could not find a tutorial or howto on how to
do that... 

Currently I'm experimenting with a simple KAction which is setup with
XML-file:

setupActions()
{
	new KAction(i18n("rotation"), 0, this, SLOT(rotate()),
	actioncollection());
	...
}

In the mainwindow-class. As far as I understand it, getting this
action onto the widget of my view should be acomplished by getting the
actionCollection from the mainwindow (how do I get that?) and then
fetching the KAction from it and using it's plug-function to attach it
to my widget or later on to the QButtonGroup.

Is there some tutorial or howto on this out there or can somebody here
explain me how to do this? I probably could work around it with
"hardcoded" radiobuttons and seperate slots in the view-class, but I'd
like to avoid that...

Andreas

-- 
Tonight's the night: Sleep in a eucalyptus tree.
 
>> 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