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

List:       kde-devel
Subject:    Re: KStdActions. How to  add to...
From:       Kurt Granroth <granroth () suse ! com>
Date:       2001-10-11 19:34:05
[Download RAW message or body]

On Thursday 11 October 2001 12:18 pm, John Gluck wrote:
> I am using KDevelop 2.0 (from KDE2.2.1) to generate an application
> framwork.
> The menu bar is hooked into KStdActions.
>
> How does one add his own menu entries to this??
> You can't use a KStdAction because your action isn't known.
> You can't add a KAction because that isn't a KStdAction.

I'm not 100% sure what you mean by "hooked into KStdActions".. but here
goes.

KStdActions *are* KActions.  They came about after we realized that there
are certain actions that are used a lot and are standardized in the KDE
Style Guide.  So instead of everybody declaring the same thing over and
over, we made them into KStdActions.

That means that the menubar (and anything else XML-GUI related) is in
no way tied to just KStdActions... all containers are tied to KActions.

So if you want your own custom actions, just use them.  Make sure that
you use 'actionCollection()' as the parent and you put your <Action/>
tag in the apps' XML-GUI rc file.

You might want to check out the application that kapptemplate generates.
It has an example "custom" KAction.
-- 
Kurt Granroth            | http://www.granroth.org
KDE Developer/Evangelist | SuSE Labs Open Source Developer
granroth@kde.org         | granroth@suse.com
            KDE -- Conquer Your Desktop

 
>> 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