Resolves: https://musescore.org/en/node/294542.
Up until now, notehead scheme has only been a StaffType property. If a Note is going to have its own notehead scheme, it seems fitting to do a bit of reorganization. Here is a summary of the changes made:
- Moved enum class NoteHeadScheme to NoteHead::Scheme, alongside NoteHead::Group and NoteHead::Type.
- Added HEAD_AUTO as a possible value for NoteHead::Scheme.
- Moved scheme2userName(), scheme2name(), and name2scheme() from class StaffType to class NoteHead.
- Renamed Pid::STAFF_NOTEHEAD_SCHEME to Pid::HEAD_SCHEME. This change is reflected in the Plugin API, with Element property staffNoteheadScheme being renamed to headScheme. This should not break too many existing plugins, because the NoteHeadScheme enum values have never been exposed until now. Speaking of which,
- Exposed the NoteHead::Scheme enum values to the Plugin API as NoteHeadScheme.HEAD_AUTO, etc. And finally, (and the main point of all of this):
- Added a property of type NoteHead::Scheme to class Note, and exposed it via the Inspector. If set to HEAD_AUTO (the default), the StaffType’s noteHeadScheme will be used. Otherwise, this will override the StaffType’s noteHeadScheme.
- Move Qml plugin engine out of libmscore
- Add Pid::TICK handling to Element class
- Make tick QML property correspond to absolute tick in all contexts
That is a temporary solution though, a proper solution would
require revising Pid::TICK handling
- Move plugins API to api directory
- Rename ElementW -> Element (PluginAPI namespace)
- Remove Qt meta-object macros from Score in libmscore
- Remove string-based access to properties from QML
- Remove unused functions from Note
- Rename QML properties names to camel case
Two reasons:
- They were named so in MuseScore 2.X.
- Using underscored_names is less consistent with MuseScore
coding style.
- replace properties "BOLD ITALIC UNDERLINE" by one property FONT_STYLE
- if text is custom fomatted (has size/fontface changes, contains parts in bold/italic etc.
then the appropriate property values are set to "unstyled". This enables the reset button
in the inspector.
- pressing reset for some text properties strips changes of this property in the text
Example: text contains a part in italic: pressing reset removes the italic formatting
- the "remove custom formatting" button is only enabled if there is some custom formatting