21#define MSC_VERSION "3.02"
22static constexpr int MSCVERSION = 302;
71enum class HairpinType :
signed char;
77inline int staff2track(
int staffIdx) {
return staffIdx << 2; }
78inline int track2staff(
int voice) {
return voice >> 2; }
79inline int track2voice(
int track) {
return track & 3; }
80inline int trackZeroVoice(
int track) {
return track & ~3; }
82static const int MAX_TAGS = 32;
84static const int MAX_HEADERS = 3;
85static const int MAX_FOOTERS = 3;
87static constexpr qreal INCH = 25.4;
88static constexpr qreal PPI = 72.0;
89static constexpr qreal DPI_F = 5;
90static constexpr qreal DPI = 72.0 * DPI_F;
91static constexpr qreal SPATIUM20 = 5.0 * (DPI / 72.0);
92static constexpr qreal DPMM = DPI / INCH;
94static constexpr int MAX_STAVES = 4;
96static const int SHADOW_NOTE_LIGHT = 135;
98static const char mimeSymbolFormat[] =
"application/musescore/symbol";
99static const char mimeSymbolListFormat[] =
"application/musescore/symbollist";
100static const char mimeStaffListFormat[] =
"application/musescore/stafflist";
102static const int VISUAL_STRING_NONE = -100;
104static const int STRING_NONE = -1;
105static const int FRET_NONE = -1;
112enum class BracketType :
signed char {
113 NORMAL, BRACE, SQUARE, LINE, NO_BRACKET = -1
120enum class PlaceText :
char {
128enum class TransposeDirection :
char {
136enum class TransposeMode :
char {
137 TO_KEY, BY_INTERVAL, DIATONICALLY
144enum class SelectType :
char {
152enum class AccidentalVal :
signed char {
168enum class KeySigNatural :
char {
178enum class UpDownMode :
char {
186enum class StaffGroup :
char {
189const int STAFF_GROUP_MAX = int(StaffGroup::TAB) + 1;
195enum class BarLineType {
197 SINGLE = BarLineType::NORMAL,
200 LEFT_REPEAT = BarLineType::START_REPEAT,
202 RIGHT_REPEAT = BarLineType::END_REPEAT,
204 DASHED = BarLineType::BROKEN,
206 FINAL = BarLineType::END,
207 END_START_REPEAT = 0x40,
208 LEFT_RIGHT_REPEAT= BarLineType::END_START_REPEAT,
211 REVERSE_FINALE = BarLineType::REVERSE_END,
213 DOUBLE_HEAVY = 0x400,
216constexpr BarLineType operator| (BarLineType t1, BarLineType t2) {
217 return static_cast<BarLineType
>(
static_cast<int>(t1) |
static_cast<int>(t2));
219constexpr bool operator& (BarLineType t1, BarLineType t2) {
220 return static_cast<int>(t1) &
static_cast<int>(t2);
225enum class IconType :
signed char {
229 SBEAM, MBEAM, NBEAM, BEAM32, BEAM64, AUTOBEAM,
231 VFRAME, HFRAME, TFRAME, FFRAME,
MEASURE,
242 NO_CHORD_REST_SELECTED,
244 NO_NOTE_REST_SELECTED,
245 NO_FLIPPABLE_SELECTED,
247 NO_NOTE_FIGUREDBASS_SELECTED,
248 CANNOT_INSERT_TUPLET,
250 CANNOT_SPLIT_MEASURE_FIRST_BEAT,
251 CANNOT_SPLIT_MEASURE_TUPLET,
255 DEST_LOCAL_TIME_SIGNATURE,
259 CANNOT_CHANGE_LOCAL_TIMESIG,
275class MPaintDevice :
public QPaintDevice {
278 virtual int metric(PaintDeviceMetric m)
const;
281 MPaintDevice() : QPaintDevice() {}
282 virtual QPaintEngine* paintEngine()
const;
283 virtual ~MPaintDevice() {}
293 static MStyle _baseStyle;
294 static MStyle _defaultStyle;
295 static MStyle* _defaultStyleForParts;
297 static QString _globalShare;
298 static int _hRaster, _vRaster;
299 static bool _verticalOrientation;
301 static MPaintDevice* _paintDevice;
309 static MsError _error;
310 static std::vector<MScoreError> errorList;
314 static MStyle& baseStyle() {
return _baseStyle; }
315 static void setBaseStyle(
const MStyle& style) { _baseStyle = style; }
316 static MStyle& defaultStyle() {
return _defaultStyle; }
317 static const MStyle* defaultStyleForParts() {
return _defaultStyleForParts; }
319 static bool readDefaultStyle(QString file);
320 static void setDefaultStyle(
const MStyle& s) { _defaultStyle = s; }
321 static void defaultStyleForPartsHasChanged();
323 static const QString& globalShare() {
return _globalShare; }
324 static qreal hRaster() {
return _hRaster; }
325 static qreal vRaster() {
return _vRaster; }
326 static void setHRaster(
int val) { _hRaster = val; }
327 static void setVRaster(
int val) { _vRaster = val; }
328 static void setNudgeStep(qreal val) { nudgeStep = val; }
329 static void setNudgeStep10(qreal val) { nudgeStep10 = val; }
330 static void setNudgeStep50(qreal val) { nudgeStep50 = val; }
332 static bool verticalOrientation() {
return _verticalOrientation; }
333 static void setVerticalOrientation(
bool val) { _verticalOrientation = val; }
335 static QColor selectColor[VOICES];
336 static QColor defaultColor;
337 static QColor dropColor;
338 static QColor layoutBreakColor;
339 static QColor frameMarginColor;
340 static QColor bgColor;
341 static bool warnPitchRange;
342 static int pedalEventsMinTicks;
344 static bool harmonyPlayDisableCompatibility;
345 static bool harmonyPlayDisableNew;
346 static bool playRepeats;
347 static bool panPlayback;
348 static int playbackSpeedIncrement;
349 static qreal nudgeStep;
350 static qreal nudgeStep10;
351 static qreal nudgeStep50;
352 static int defaultPlayDuration;
353 static QString lastError;
356 static bool noHorizontalStretch;
357 static bool noVerticalStretch;
358 static bool showSegmentShapes;
359 static bool showSkylines;
360 static bool showMeasureShapes;
361 static bool showBoundingRect;
362 static bool showSystemBoundingRect;
363 static bool showCorruptedMeasures;
364 static bool useFallbackFont;
366 static bool debugMode;
367 static bool testMode;
370 static int sampleRate;
372 static Sequencer* seq;
374 static bool saveTemplateMode;
377 static bool noExcerpts;
378 static bool noImages;
380 static bool pdfPrinting;
381 static bool svgPrinting;
382 static double pixelRatio;
384 static qreal verticalPageGap;
385 static qreal horizontalPageGapEven;
386 static qreal horizontalPageGapOdd;
388 static MPaintDevice* paintDevice();
390 static void setError(MsError e) { _error = e; }
391 static const char* errorMessage();
392 static const char* errorGroup();
399inline static qreal center(qreal x1, qreal x2)
401 return (x1 + (x2 - x1) * .5);
408inline static int limit(
int val,
int min,
int max)
418Q_DECLARE_METATYPE(Ms::BarLineType);
DirectionH
Definition mscore.h:304
OrnamentStyle
Definition mscore.h:305