-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Style settings
Engraving style settings determine how the music is displayed (e.g., page height, bar width, 8va line style, etc.).
If you're working in /src/engraving
, you need to import the style header file:
#include "style/style.h"
Then, as long as the class inherits from EngravingObject
(which it probably does), you can access a specific settings value with:
score()->styleS(Sid idx); // for spatium values as a spatium
score()->styleP(Sid idx); // for spatium values as a qreal
score()->styleSt(Sid idx); // for QString values
score()->styleB(Sid idx); // for boolean values
score()->styleD(Sid idx); // for qreal values
score()->styleI(Sid idx); // for integer values
For instance, to get the staff line width as a qreal, you'd use:
score()->styleP(Sid::staffLineWidth)
You can discover all style settings in /src/engraving/style/styledef.h
.
Settings are declared in /src/engraving/style/styledef.h
and defined in /src/engraving/style/styledef.cpp
.
- Add your new setting to the
Sid
enum in/src/engraving/style/styledef.h
- Add the default value to
/src/engraving/style/styledef.cpp
When these settings are exposed to users, they appear in the Format > Style… menu.
[TODO]
Testing
- Manual testing
- Automatic testing
Translation
Compilation
- Set up developer environment
- Install Qt and Qt Creator
- Get MuseScore's source code
- Install dependencies
- Compile on the command line
- Compile in Qt Creator
Beyond compiling
Misc. development
Architecture general
- Architecture overview
- AppShell
- Modularity
- Interact workflow
- Channels and Notifications
- Settings and Configuration
- Error handling
- Launcher and Interactive
- Keyboard Navigation
Audio
Engraving
- Style settings
- Working with style files
- Style parameter changes for 4.0
- Style parameter changes for 4.1
- Style parameter changes for 4.2
- Style parameter changes for 4.3
- Style parameter changes for 4.4
Extensions
- Extensions overview
- Manifest
- Forms
- Macros
- Api
- Legacy plugin API
Google Summer of Code
References