KAction and doc/view
Ellis Whitehead
kde at ellisw.net
Tue Apr 23 20:28:39 BST 2002
Here're some thoughts on what should be done with actions.
Non-XML-based actions are attached directly to the widget that creates them.
XML-based actions don't get connected until KXMLGUIFactory::addClient() is
called. There are three types:
actions which the main window creates
actions which a document object creates
actions which a view widget creates
Document actions can only be connected via a view widget. A single document
action may be connected to multiple view widgets.
There are two scopes:
program scope -- accessible regardless of focus
widget scope -- only accessible when the given widget has the focus
If an action with widget scope is listed in the program menus or toolbar, it
should only be enabled when its widget has focus.
Each widget that has widget-scope actions with shortcuts will require its own
KAccel object. All other shortcuts go into the appropriate mainwindow's
KAccel. There may be multiple main windows, and they may share a single
document.
-------------
I have a lot of this done locally already, I think, but I want to make sure
that I'm not missing some blatant in the concept before I start committing.
Cheers,
Ellis
More information about the kde-core-devel
mailing list