[Uml-devel] u2 gui design

Andrew Sutton ansutton at kent.edu
Wed Apr 23 16:48:09 UTC 2003


On Wednesday 23 April 2003 6:31 pm, Sebastian Stein wrote:
> > Do you know about XMLGUI and KAction? They provide useful abstractions
> > for dynamic GUIs. Look at Konqueror's views or KOffice's -- e.g. menubars
> > and toolbars adjust to the current view's capabilities (i.e. their
> > provided actions).

sounds good. i was thinking about that stuff and i've been meaning to check 
out the XMLGUI documentation, but haven't done it yet. i suspect that's 
probably my next step.

> I'm pretty sure that KAction and XMLGUI is the way to go. Here are the
> basic steps:
>
> - define a KAction object for every action in the program like "add class"
> - define the basic menu structure in an XML file
> - let the XMLGUIBuilder build the whole menu for you
>
> It is very easy, but, and now I hope someone can step in, I don't know how
> to handle dynamic menus.

heh. neither do i :) i suppose we'll find out somewhere down the line.

> I mean we have a central XML file for the menu structure. And yes, if the
> user likes he can edit this file to customize the menu structure. But that
> is not what we want. We want a plugin to change the menu structure, add an
> entry when the plugin gets loaded, remove an entry when the plugin gets
> removed.
> The question is hoow do I update the XML file? I think it would be not the
> right solution to parse the XML file, insert the plugin specific stuff,
> save it back (maybe to /tmp) and call the gui builder function again.
> So, the problem are plugins which we don't know during Umbrello's
> compilation. The plugin should decide where to plug into the menu, toolbar.
> It is not Umbrellos task.

i think each plugin should be able to give its own xml file to the application 
when it loads up. this is what i see looking at the karbon14 plugins.

i'm also starting to think that maybe re-writing the plugin stuff in terms of 
kparts might not be a bad idea either. its probably a little better known. 
also, if we write everything as kparts, we can consider possibilities with 
kdevelop later on - or konqi or koffice. maybe.

andy




More information about the umbrello-devel mailing list