How to get a pointer for mainwindow?

Alexander Dymo dymo at ukrpost.ua
Tue Mar 27 10:47:33 UTC 2007


On Tuesday 27 March 2007 13:30, Andras Mantia wrote:
> This is about the user action's plugin, which means that inside the
> plugin you can define your own actions (so they are created from code,
> not from xmlgui), but those actions can be accessed from any other
> plugin. It is somewhat complicated and when I ported the code from
> Quanta to KDevelop, the sane solution was to add the actions to the
> mainwindow's collection.
The problem is that you can have N mainwindows now. 
If you add actions to one mainwindow others will not know.
You'll need to have a plugin that is added as a gui client to mainwindows
so that they will pick up the action changes.

If you need these actions to be accessed by another plugins,
I'd recommend creating an extension interface like:

class IUserActions {
public:
	KActionCollection *userActions() = 0;
};





More information about the KDevelop-devel mailing list