Shortcuts to toggle Dockwidgets

Andreas Pakulat apaku at gmx.de
Thu Oct 29 14:32:11 UTC 2009


On 29.10.09 15:19:30, Milian Wolff wrote:
> On Thursday, 29. October 2009 10:19:18 Andreas Pakulat wrote:
> > On 29.10.09 02:52:49, Milian Wolff wrote:
> > And as Niko said all plugins are xmlguiclients
> > or are able to provide one (we actually need to create plugin-independent
> > clients to be able to use multiple mainwindows).
> 
> Hmm sorry, but I need more help there. The documentation I find on 
> xmlguiclients doesn't help me at all with plugin based approach of kdevelop.

Well, all kdevelop plugins _are_ xmlguiclients and hence they can do a
setXmlFile("foo.rc") in their constructor and will have the xmlgui
description from that file loaded and stored.

> Lets take the Documentation tool view again. It's added by the 
> DocumentationController. I find nothing related to xmlgui in that file! It's 
> not even an IPlugin, hence will require special treatment, correct?

Right, the controller is no iplugin and no xmlguiclient. But its part of
the shell which has a mainwindow (or two,3,...). Each mainwindow itself is
an xmlguiclient (via KParts::MainWindow->KXmlGuiWindow->KXmlGuiClient).
And the kxmlguiwindow(s) of an application have their own xyzui.rc, in our
case its kdevelopui.rc in kdevelop/app/. So if a class in the shell wants
to have a toolview the action needs to be added to the mainwindows action
collection. IIRC all those actions are somewhere in the mainwindow.cpp file
created. If the action should be visible in a menu you'll need to add it at
the right place in kdevelopui.rc, if not just adding it to the collection
is enough.

xmlgui is there to actually merge all these ui-files. There's
host-application one (kdevelopui.rc) which can define extension points for
plugins (via groups) and all the xmlguiclients that are added to the
mainwindow (this is done by our shell-code) will have their xmlgui files
added to that mainwindows ui.

Andreas

-- 
You have many friends and very few living enemies.




More information about the KDevelop-devel mailing list