I've not come to a conclusion yet.
Some thoughts on it:
- Use something that could at the end serve as a standard method for
all actions in rosegarden.
- I partly like the idea of an external file for the actions, since
source might look cleaner.
- A simple call that created connections, icons, etc. would be nice.
Something I dislike: Different names for the same action:
slot-name: slotFilterSelection
action-name: filter_selection
icon-name: filter-selection
Why not:
slot-name: slot_filter_selection
action-name: filter_selection
icon-name: filter_selection
Another idea is to introduce something new:
Instead of xml, which is a little complicated to read, we might use JSON.
A json file is human and machine readable (variant values) and looks like this:
// start json file
[
{
"name": "action_one",
"label": "Action One",
"apply_to": "toolbar, mainmenu",
"shortcut": "Qt::CTRL + Qt::Key_O"
},
{
"name": "action_two",
"label": "Action Two",
"apply_to": "toolbar, mainmenu",
"shortcut": "Qt::CTRL + Qt::Key_T"
}
]
// end json file
(like javascript syntax)
more info at http://www.json.org/
2008/10/2 Chris Cannam <[EMAIL PROTECTED]>:
>
> But, please hold off on any more action-related fixes until we've
> decided how to go ahead with actions generally (please do see, and
> reply to, my messages on the devel list this morning).
>
> I'm concerned that making ad-hoc changes from the old KAction
> constructor call (which at least had all the necessary information in
> a single place) to multi-line QAction construction and property setups
> may only be making it harder to carry out a nice uniform transfer to a
> new mechanism, once we've decided what that should actually be. Don't
> forget that all the work of putting actions into menus and making sure
> they appear was carried out by KXMLGUI, not by our code explicitly, so
> simply translating KAction to QAction won't actually make any working
> menus. I'd rather do all this once (it is my current to-do item on
> the wiki) and get it right.
>
> Chris
>
Hm. I've already converted a lot of actions to QAction.
With some luck, making them appear might be as simple as adding these
to the menubar/submenu:
menu->addAction( xyz )
A unified call for creating and connecting those would
of course be better. (But a lot more work to change the existing
actions to use it.)
If we decided for an external file (be it json or xml),
I wonder, when would be the time (or place) to parse it and create the
connections.
Would this happen at the end, in one file only,
or in every file that uses menu-structures?
Emanuel
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Rosegarden-devel mailing list
[email protected] - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel