[OT] plugins and QDockWidget

kitts kitts.mailinglists at gmail.com
Sat Mar 24 22:02:57 UTC 2007


On Sunday 25 Mar 2007 IST, Andreas Pakulat wrote:
> On 25.03.07 01:43:48, kitts wrote:
> > Let me take the example of designer being embedded. Designer uses
> > several toolviews (dockwidgets) for each view. Among them is a widget
> > properties toolview. At the time of the view creation this tool view
> > did not exist. Subsequently when one of the widgets is selected in its
> > view, a new toolview is created for properties.
> >
> > This may not be the perfect example as it is very predictable but i was
> > referring to such a situation where the need for creation of a new
> > toolview for an existing view is raised by view/plugin or maybe another
> > toolview itself.
>
> Well, for the designer example: I don't know yet how this will work out,
> basically because I'm not sure the parts of designer are decoupled
> enough to make this possible.

I am just taking 'a' designer as an example without any reference to the 
current implementation if kdevelop designer. I example is just influenced 
by it. ;-)

> However, in general only a plugin can tell the shell to add a new
> toolview, by providing a factory. So if any toolview wants to
> show/activate another toolview it needs to be connected to the plugin
> for that other toolview (or hopefully its extension interface).

Ah! this is probably the most important part for me. How exactly does the 
plugin tell the shell to add a new or delete an old toolview?

> This is something that works already, lets take the QMake Manager in
> KDevelop4 as example, it already provides a mechanism to run qmake and
> make on a given project. The execution of the commands is encapsulated
> in another plugin, the outputview, which also displays the output of the
> commands. Now this outputview provides a toolview. Currently it shows
> the toolview as soon as the outputview plugin is loaded, but this could
> be deferred until somebody actually runs a command through it (the
> outputview plugin has an API for running an arbitrary command). Then it
> would askt he uicontroller to add a toolview for its outputwidget.

Out of curiosity, in kdev4 with multiple mainwindows and a single instance 
for each plugin, how is the information of "which mainwindow" conveyed from 
one plugin to another?

> Andreas
>
> --
> Your reasoning is excellent -- it's only your basic assumptions that are
> wrong.

Was that automatic or did you add it in? ;-)
-- 
Cheers!
kitts




More information about the KDevelop-devel mailing list