[OT] plugins and QDockWidget

Alexander Dymo dymo at ukrpost.ua
Sat Mar 24 20:34:48 UTC 2007


On Saturday 24 March 2007 21:27, kitts wrote:
> So the plugin itself cannot initiate the creation of a new dockwidget but
> will list them out when queried by the main app? 
Almost correct. Plugins add the factory. The user can ask for toolview
creation at any time and factory is used to create a widget.
The application does not query the plugins directly. Instead the plugins
add toolview factories to the application.

> The 'scope' of the plugin 
> is set by the main app. I have in mind the situation where perhaps a new
> dockwidget is created/modified by the plugin based on the selection within
> its view. Of course, this could also be achieved by it rising a signal that
> is understood by the main app.

For the situation I described (with embedded designer) we'd need to do this:
- when designer part is opened, the designer plugin adds a toolview 
  factory for this part
- kdevelop immediatelly shows the toolviews because this is how it is
  currently done in UiController (the one in the shell application)
- on part deactivation, the plugin would ask the UiController to hide the
  toolviews
- on part activation, the plugin would ask to show them
- on part destruction the part would remove the toolview (using UiController
  again)

PS: currently UiController in KDevelop does not expose hiding/showing the
toolviews for plugins. But that's easy to implement.




More information about the KDevelop-devel mailing list