21 #define MSC_VERSION "3.01" 22 static constexpr
int MSCVERSION = 301;
69 enum class HairpinType : signed char;
75 inline int staff2track(int staffIdx) {
return staffIdx << 2; }
76 inline int track2staff(
int voice) {
return voice >> 2; }
77 inline int track2voice(
int track) {
return track & 3; }
78 inline int trackZeroVoice(
int track) {
return track & ~3; }
80 static const int MAX_TAGS = 32;
82 static const int MAX_HEADERS = 3;
83 static const int MAX_FOOTERS = 3;
85 static constexpr qreal INCH = 25.4;
86 static constexpr qreal PPI = 72.0;
87 static constexpr qreal DPI_F = 5;
88 static constexpr qreal DPI = 72.0 * DPI_F;
89 static constexpr qreal SPATIUM20 = 5.0 * (DPI / 72.0);
90 static constexpr qreal DPMM = DPI / INCH;
92 static constexpr
int MAX_STAVES = 4;
94 static const int SHADOW_NOTE_LIGHT = 135;
96 static const char mimeSymbolFormat[] =
"application/musescore/symbol";
97 static const char mimeSymbolListFormat[] =
"application/musescore/symbollist";
98 static const char mimeStaffListFormat[] =
"application/musescore/stafflist";
100 static const int VISUAL_STRING_NONE = -100;
102 static const int STRING_NONE = -1;
103 static const int FRET_NONE = -1;
110 enum class BracketType : signed char {
111 NORMAL, BRACE, SQUARE, LINE, NO_BRACKET = -1
118 enum class PlaceText : char {
126 enum class TransposeDirection : char {
134 enum class TransposeMode : char {
135 TO_KEY, BY_INTERVAL, DIATONICALLY
142 enum class SelectType : char {
150 enum class AccidentalVal : signed char {
166 enum class KeySigNatural : char {
176 enum class UpDownMode : char {
184 enum class StaffGroup : char {
187 const int STAFF_GROUP_MAX = int(StaffGroup::TAB) + 1;
198 LEFT_REPEAT = BarLineType::START_REPEAT,
200 RIGHT_REPEAT = BarLineType::END_REPEAT,
202 DASHED = BarLineType::BROKEN,
204 FINAL = BarLineType::END,
205 END_START_REPEAT = 0x40,
206 LEFT_RIGHT_REPEAT= BarLineType::END_START_REPEAT,
209 REVERSE_FINALE = BarLineType::REVERSE_END,
211 DOUBLE_HEAVY = 0x400,
215 return static_cast<BarLineType>(
static_cast<int>(t1) | static_cast<int>(t2));
218 return static_cast<int>(t1) & static_cast<int>(t2);
223 enum class IconType : signed char {
227 SBEAM, MBEAM, NBEAM, BEAM32, BEAM64, AUTOBEAM,
229 VFRAME, HFRAME, TFRAME, FFRAME,
MEASURE,
230 BRACKETS, PARENTHESES, BRACES,
240 NO_CHORD_REST_SELECTED,
242 NO_NOTE_REST_SELECTED,
243 NO_FLIPPABLE_SELECTED,
245 NO_NOTE_FIGUREDBASS_SELECTED,
246 CANNOT_INSERT_TUPLET,
248 CANNOT_SPLIT_MEASURE_FIRST_BEAT,
249 CANNOT_SPLIT_MEASURE_TUPLET,
253 DEST_LOCAL_TIME_SIGNATURE,
257 CANNOT_CHANGE_LOCAL_TIMESIG,
272 class MPaintDevice :
public QPaintDevice {
275 virtual int metric(PaintDeviceMetric m)
const;
278 MPaintDevice() : QPaintDevice() {}
279 virtual QPaintEngine* paintEngine()
const;
280 virtual ~MPaintDevice() {}
290 static MStyle _baseStyle;
291 static MStyle _defaultStyle;
292 static MStyle* _defaultStyleForParts;
294 static QString _globalShare;
295 static int _hRaster, _vRaster;
296 static bool _verticalOrientation;
298 static MPaintDevice* _paintDevice;
306 static MsError _error;
307 static std::vector<MScoreError> errorList;
311 static const MStyle& baseStyle() {
return _baseStyle; }
312 static MStyle& defaultStyle() {
return _defaultStyle; }
313 static const MStyle* defaultStyleForParts() {
return _defaultStyleForParts; }
315 static bool readDefaultStyle(QString file);
316 static void setDefaultStyle(
const MStyle& s) { _defaultStyle = s; }
317 static void defaultStyleForPartsHasChanged();
319 static const QString& globalShare() {
return _globalShare; }
320 static qreal hRaster() {
return _hRaster; }
321 static qreal vRaster() {
return _vRaster; }
322 static void setHRaster(
int val) { _hRaster = val; }
323 static void setVRaster(
int val) { _vRaster = val; }
324 static void setNudgeStep(qreal val) { nudgeStep = val; }
325 static void setNudgeStep10(qreal val) { nudgeStep10 = val; }
326 static void setNudgeStep50(qreal val) { nudgeStep50 = val; }
328 static bool verticalOrientation() {
return _verticalOrientation; }
329 static void setVerticalOrientation(
bool val) { _verticalOrientation = val; }
331 static QColor selectColor[VOICES];
333 static QColor dropColor;
334 static QColor layoutBreakColor;
335 static QColor frameMarginColor;
336 static QColor bgColor;
337 static bool warnPitchRange;
338 static int pedalEventsMinTicks;
340 static bool harmonyPlayDisableCompatibility;
341 static bool harmonyPlayDisableNew;
342 static bool playRepeats;
343 static bool panPlayback;
344 static int playbackSpeedIncrement;
345 static qreal nudgeStep;
346 static qreal nudgeStep10;
347 static qreal nudgeStep50;
348 static int defaultPlayDuration;
349 static QString lastError;
352 static bool noHorizontalStretch;
353 static bool noVerticalStretch;
354 static bool showSegmentShapes;
355 static bool showSkylines;
356 static bool showMeasureShapes;
357 static bool showBoundingRect;
358 static bool showSystemBoundingRect;
359 static bool showCorruptedMeasures;
360 static bool useFallbackFont;
362 static bool debugMode;
363 static bool testMode;
366 static int sampleRate;
368 static Sequencer* seq;
370 static bool saveTemplateMode;
373 static bool noExcerpts;
374 static bool noImages;
376 static bool pdfPrinting;
377 static bool svgPrinting;
378 static double pixelRatio;
380 static qreal verticalPageGap;
381 static qreal horizontalPageGapEven;
382 static qreal horizontalPageGapOdd;
384 static MPaintDevice* paintDevice();
386 static void setError(MsError e) { _error = e; }
387 static const char* errorMessage();
388 static const char* errorGroup();
395 inline static qreal center(qreal x1, qreal x2)
397 return (x1 + (x2 - x1) * .5);
404 inline static int limit(
int val,
int min,
int max)
414 Q_DECLARE_METATYPE(Ms::BarLineType);
Alias for BeginBarLine | StartRepeatBarLine | BarLine | EndBarLine
Definition: cursor.cpp:30
OrnamentStyle
Definition: mscore.h:302
DirectionH
Definition: mscore.h:301