Hello Thorsten,

I'd like to talk a bit about loading / editing / restoring shortcuts.

I will assume will extend the current setup you coded.  Use the model for other 
Windows (eg Matrix Editor, Notation Editor)

Currently we are saving shortcuts in QSettings under "shortcuts"

This works fine for one window, but we need to devise a way to keep each 
windows setting in separate.  

We also need a way to restore the defaults.

There are several ways we could do this, but here is one approach.

* Instead of load / save / edit shortcuts we could have just a single "edit 
shortcuts" item in the Edit pull down menu.

- Save shortcuts could be removed. Pressing OK in the shortcut editor would 
save to the configuration and update the shortcuts.  

Also we could add a restore default button to load the defaults for the window.

- Load Shortcuts could be removed as well.

Any custom shortcuts could be loaded when the window first opens.  We do the 
same kind of thing with Window Geometry.


* Managing shortcuts in QSettings

Create a new configuration group in /src/misc/ConfigGroups.cpp

const char* const ShortcutsConfigGroup = "Shortcuts/"; // as an example

If we load the custom shortcuts when a window is created, we could do this from 
the createGUI() call which typically creates all of the menus, shortcuts, etc.

createGUI() is passed the name of a .rc file (eg "matrix.rc"

Shortcuts for matrix view could be stored as "Shortcuts/matrix.rc"

The default shortcuts could be stored as "Shortcuts/matrix.rc/Defaults"

How we populated the "Shortcuts/matrix.rc/Defaults" is up for debate.  Finding 
an efficient way to do may take some skill.

...

Well, there is my thoughts thus far.

Let me know what you think.

Sincerely,
Julie S.



      

------------------------------------------------------------------------------
_______________________________________________
Rosegarden-devel mailing list
[email protected] - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel

Reply via email to