User actions/toolbars plugin
jens at kdewebdev.org
Wed May 18 11:24:04 UTC 2005
> So should I drop the idea of making this a plugin and integrate into the
> main shell? Anyway this would be a core plugin/functionality. The
> question is which mainwindow implementation should I pick up. ;-)
please do not do this. Let us see how we can find a solution. I am sure there
is a way to do this without touching KDevelop at all.
Looking around in the docs let's me think in this direction:
1. We want to have one toolbar with a tab widget inside
possible solution: create an empty toolbar in the xml file of the plugin and
add the tab widget manually in the plugin.
2. we want to create a toolbar but this should not appear like a normal
toolbar in the mainwindow.
possible solution: since the user toolbar is a KXMLGuiClient it has a method
setClientBuilder(). In theory we can add our own builder here that gets used
when kmainwindow's factory builds the toolbar. In this custom builder you
overwrite the addClient() method like in Quanta's mainwindow.
If you create a tabwidget object that inherits from KXMLGUIBuilder you can
easily add the created toolbar directly to the tab.
If this is well done we might add a configuration switch so that the user can
decide if s/he wants to use the tabwidget or let the toolbars appear like
normal toolbars in the main window. We only have to use our own builder or
the builder from the mainwindow.
Does this sound feasible for you?
More information about the KDevelop-devel