Shortcuts to toggle Dockwidgets

Milian Wolff mail at
Thu Oct 29 15:15:52 UTC 2009

On Thursday, 29. October 2009 15:32:11 Andreas Pakulat wrote:
> 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.

I still want to automate as much as possible. I think I'll add a getter to the 
ViewsFactory that can return a pointer to a KActionCollection or similar and 
than use that to automatically add the/a toggle action to that collection from 
inside UIController::addToolView - imo no need to let plugins reinvent the 
wheel for that.

Lets see, hope I get to do it later today.

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

Toggle action is already visible in the Views -> Tool Views menu.
> 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

Milian Wolff
mail at
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <>

More information about the KDevelop-devel mailing list