Shortcuts to toggle Dockwidgets

Andreas Pakulat apaku at gmx.de
Thu Oct 29 15:04:32 UTC 2009


On 29.10.09 16:15:52, Milian Wolff wrote:
> 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.

See my other mail, there's no xmlgui needed at all - IMHO. Please post a
patch using that approach so I can have a look at the weekend or so.

Andreas

-- 
Everything that you know is wrong, but you can be straightened out.




More information about the KDevelop-devel mailing list