KeySig key exposure not working
Although KeySig has its key() and setKey(Key) methods declared as Q_INVOKABLE they don't work from within the plugin framework. Reason is they work with the Key enumeration, which isn't exposed.
My proposed fix is to:
1. Expose the Key enum the same way as done for #96631: Expose text styles to plugins (thus base this new PR onto that one)
2. Expose a Q_PROPERTY named 'key' from KeySig with correct read and write functions.
3. Remove Q_INVOKABLE from key() and setKey() as those are (from the plugin framework pov) replaced by the property from item 2
Comments
https://github.com/musescore/MuseScore/pull/2429
As you can see over at the PR, I've had to manually expand the MS_QML_ENUM macro to make this link correctly, which I don't understand. Nor is it the desired patch now.
If anyone could provide pointer to how to get the preprocessor output (Qt Creator/Win7) I could at least confirm that there's an expansions issue..
Does this recent change to containers help make this easier? https://github.com/musescore/MuseScore/pull/2703
I would also like to be able to access key signatures from within a plugin.
I'm afraid PR2703 doesn't help with this.
Any progress on this?
--From the comments on github it seems this approach didn't work.
Has anyone found any sort of work around?
The problem got merged long ago
The patch from #2 doesn't help here though.
The PR from #1 (https://github.com/musescore/MuseScore/pull/2429) is still very much a WIP
Ah, didn't notice that there were 2 PRs