2012-05-26 14:26:10 +02:00
|
|
|
//=============================================================================
|
|
|
|
// MuseScore
|
|
|
|
// Music Composition & Notation
|
|
|
|
//
|
|
|
|
// Copyright (C) 2002-2011 Werner Schweer
|
|
|
|
//
|
|
|
|
// This program is free software; you can redistribute it and/or modify
|
|
|
|
// it under the terms of the GNU General Public License version 2
|
|
|
|
// as published by the Free Software Foundation and appearing in
|
|
|
|
// the file LICENCE.GPL
|
|
|
|
//=============================================================================
|
|
|
|
|
|
|
|
#include "mscore.h"
|
|
|
|
#include "style.h"
|
|
|
|
#include "xml.h"
|
|
|
|
#include "score.h"
|
|
|
|
#include "articulation.h"
|
|
|
|
#include "harmony.h"
|
|
|
|
#include "chordlist.h"
|
|
|
|
#include "page.h"
|
|
|
|
#include "mscore.h"
|
2013-09-05 16:37:49 +02:00
|
|
|
#include "clef.h"
|
2016-07-08 16:48:04 +02:00
|
|
|
#include "tuplet.h"
|
2016-08-22 12:08:21 +02:00
|
|
|
#include "layout.h"
|
2017-01-16 20:51:12 +01:00
|
|
|
#include "property.h"
|
2017-01-25 15:54:46 +01:00
|
|
|
#include "elementlayout.h"
|
2012-05-26 14:26:10 +02:00
|
|
|
|
2013-05-13 18:49:17 +02:00
|
|
|
namespace Ms {
|
|
|
|
|
2012-05-26 14:26:10 +02:00
|
|
|
// 20 points font design size
|
|
|
|
// 72 points/inch point size
|
|
|
|
// 120 dpi screen resolution
|
|
|
|
// spatium = 20/4 points
|
|
|
|
|
2016-11-18 14:28:53 +01:00
|
|
|
//---------------------------------------------------------
|
2017-01-05 11:23:47 +01:00
|
|
|
// StyleType
|
2016-11-18 14:28:53 +01:00
|
|
|
//---------------------------------------------------------
|
|
|
|
|
2017-01-05 11:23:47 +01:00
|
|
|
struct StyleType {
|
|
|
|
StyleIdx _idx;
|
|
|
|
const char* _name; // xml name for read()/write()
|
|
|
|
QVariant _defaultValue;
|
|
|
|
|
|
|
|
public:
|
|
|
|
StyleIdx styleIdx() const { return _idx; }
|
|
|
|
int idx() const { return int(_idx); }
|
|
|
|
const char* valueType() const { return _defaultValue.typeName(); }
|
|
|
|
const char* name() const { return _name; }
|
|
|
|
const QVariant& defaultValue() const { return _defaultValue; }
|
|
|
|
};
|
|
|
|
|
2017-01-16 20:51:12 +01:00
|
|
|
#define MM(x) ((x)/INCH)
|
|
|
|
|
2016-03-02 13:20:19 +01:00
|
|
|
static const StyleType styleTypes[] {
|
2017-01-23 21:53:51 +01:00
|
|
|
{ StyleIdx::pageWidth, "pageWidth", 210.0/INCH },
|
|
|
|
{ StyleIdx::pageHeight, "pageHeight", 297.0/INCH }, // A4
|
|
|
|
{ StyleIdx::pagePrintableWidth, "pagePrintableWidth", 190.0/INCH },
|
|
|
|
{ StyleIdx::pageEvenLeftMargin, "pageEvenLeftMargin", 10.0/INCH },
|
|
|
|
{ StyleIdx::pageOddLeftMargin, "pageOddLeftMargin", 10.0/INCH },
|
|
|
|
{ StyleIdx::pageEvenTopMargin, "pageEvenTopMargin", 10.0/INCH },
|
|
|
|
{ StyleIdx::pageEvenBottomMargin, "pageEvenBottomMargin", 20.0/INCH },
|
|
|
|
{ StyleIdx::pageOddTopMargin, "pageOddTopMargin", 10.0/INCH },
|
|
|
|
{ StyleIdx::pageOddBottomMargin, "pageOddBottomMargin", 20.0/INCH },
|
|
|
|
{ StyleIdx::pageTwosided, "pageTwosided", true },
|
|
|
|
|
2016-03-02 13:20:19 +01:00
|
|
|
{ StyleIdx::staffUpperBorder, "staffUpperBorder", Spatium(7.0) },
|
|
|
|
{ StyleIdx::staffLowerBorder, "staffLowerBorder", Spatium(7.0) },
|
|
|
|
{ StyleIdx::staffDistance, "staffDistance", Spatium(6.5) },
|
|
|
|
{ StyleIdx::akkoladeDistance, "akkoladeDistance", Spatium(6.5) },
|
|
|
|
{ StyleIdx::minSystemDistance, "minSystemDistance", Spatium(8.5) },
|
|
|
|
{ StyleIdx::maxSystemDistance, "maxSystemDistance", Spatium(15.0) },
|
2016-08-26 12:43:43 +02:00
|
|
|
|
|
|
|
{ StyleIdx::lyricsPlacement, "lyricsPlacement", int(Element::Placement::BELOW) },
|
|
|
|
{ StyleIdx::lyricsPosAbove, "lyricsPosAbove", Spatium(-2.0) },
|
|
|
|
{ StyleIdx::lyricsPosBelow, "lyricsPosBelow", Spatium(2.0) },
|
2016-08-18 10:22:07 +02:00
|
|
|
{ StyleIdx::lyricsMinTopDistance, "lyricsMinTopDistance", Spatium(1.0) },
|
2017-03-17 11:51:03 +01:00
|
|
|
{ StyleIdx::lyricsMinBottomDistance, "lyricsMinBottomDistance", Spatium(2.0) },
|
2016-03-02 13:20:19 +01:00
|
|
|
{ StyleIdx::lyricsLineHeight, "lyricsLineHeight", 1.0 },
|
2016-08-26 12:43:43 +02:00
|
|
|
{ StyleIdx::lyricsDashMinLength, "lyricsDashMinLength", Spatium(0.4) },
|
|
|
|
{ StyleIdx::lyricsDashMaxLength, "lyricsDashMaxLegth", Spatium(0.8) },
|
|
|
|
{ StyleIdx::lyricsDashMaxDistance, "lyricsDashMaxDistance", Spatium(16.0) },
|
|
|
|
{ StyleIdx::lyricsDashForce, "lyricsDashForce", QVariant(true) },
|
2016-08-26 13:42:59 +02:00
|
|
|
{ StyleIdx::lyricsAlignVerseNumber, "lyricsAlignVerseNumber", true },
|
2016-10-10 23:05:51 +02:00
|
|
|
{ StyleIdx::lyricsLineThickness, "lyricsLineThickness", Spatium(0.1) },
|
2016-08-26 12:43:43 +02:00
|
|
|
|
2016-03-02 13:20:19 +01:00
|
|
|
{ StyleIdx::figuredBassFontFamily, "figuredBassFontFamily", QString("MScoreBC") },
|
|
|
|
|
2017-01-16 20:51:12 +01:00
|
|
|
// { StyleIdx::figuredBassFontSize, "figuredBassFontSize", QVariant(8.0) },
|
2016-03-02 13:20:19 +01:00
|
|
|
{ StyleIdx::figuredBassYOffset, "figuredBassYOffset", QVariant(6.0) },
|
|
|
|
{ StyleIdx::figuredBassLineHeight, "figuredBassLineHeight", QVariant(1.0) },
|
|
|
|
{ StyleIdx::figuredBassAlignment, "figuredBassAlignment", QVariant(0) },
|
|
|
|
{ StyleIdx::figuredBassStyle, "figuredBassStyle" , QVariant(0) },
|
|
|
|
{ StyleIdx::systemFrameDistance, "systemFrameDistance", Spatium(7.0) },
|
|
|
|
{ StyleIdx::frameSystemDistance, "frameSystemDistance", Spatium(7.0) },
|
|
|
|
{ StyleIdx::minMeasureWidth, "minMeasureWidth", Spatium(5.0) },
|
|
|
|
{ StyleIdx::barWidth, "barWidth", Spatium(0.16) }, // 0.1875
|
|
|
|
{ StyleIdx::doubleBarWidth, "doubleBarWidth", Spatium(0.16) },
|
|
|
|
|
|
|
|
{ StyleIdx::endBarWidth, "endBarWidth", Spatium(0.5) }, // 0.5
|
|
|
|
{ StyleIdx::doubleBarDistance, "doubleBarDistance", Spatium(0.30) },
|
|
|
|
{ StyleIdx::endBarDistance, "endBarDistance", Spatium(0.40) }, // 0.3
|
2016-10-10 23:05:51 +02:00
|
|
|
{ StyleIdx::repeatBarlineDotSeparation, "repeatBarlineDotSeparation", Spatium(0.40) },
|
2016-03-02 13:20:19 +01:00
|
|
|
{ StyleIdx::repeatBarTips, "repeatBarTips", QVariant(false) },
|
|
|
|
{ StyleIdx::startBarlineSingle, "startBarlineSingle", QVariant(false) },
|
|
|
|
{ StyleIdx::startBarlineMultiple, "startBarlineMultiple", QVariant(true) },
|
|
|
|
{ StyleIdx::bracketWidth, "bracketWidth", Spatium(0.45) },
|
|
|
|
{ StyleIdx::bracketDistance, "bracketDistance", Spatium(0.1) },
|
|
|
|
{ StyleIdx::akkoladeWidth, "akkoladeWidth", Spatium(1.6) },
|
|
|
|
{ StyleIdx::akkoladeBarDistance, "akkoladeBarDistance", Spatium(.4) },
|
|
|
|
|
|
|
|
{ StyleIdx::dividerLeft, "dividerLeft", QVariant(false) },
|
|
|
|
{ StyleIdx::dividerLeftSym, "dividerLeftSym", QVariant(QString("systemDivider")) },
|
|
|
|
{ StyleIdx::dividerLeftX, "dividerLeftX", QVariant(0.0) },
|
|
|
|
{ StyleIdx::dividerLeftY, "dividerLeftY", QVariant(0.0) },
|
|
|
|
{ StyleIdx::dividerRight, "dividerRight", QVariant(false) },
|
|
|
|
{ StyleIdx::dividerRightSym, "dividerRightSym", QVariant(QString("systemDivider")) },
|
|
|
|
{ StyleIdx::dividerRightX, "dividerRightX", QVariant(0.0) },
|
|
|
|
{ StyleIdx::dividerRightY, "dividerRightY", QVariant(0.0) },
|
2016-05-25 12:10:52 +02:00
|
|
|
|
2016-03-02 13:20:19 +01:00
|
|
|
{ StyleIdx::clefLeftMargin, "clefLeftMargin", Spatium(0.8) }, // 0.64 (gould: <= 1)
|
|
|
|
{ StyleIdx::keysigLeftMargin, "keysigLeftMargin", Spatium(0.5) },
|
2016-05-25 12:10:52 +02:00
|
|
|
{ StyleIdx::ambitusMargin, "ambitusMargin", Spatium(0.5) },
|
2016-03-02 13:20:19 +01:00
|
|
|
|
|
|
|
{ StyleIdx::timesigLeftMargin, "timesigLeftMargin", Spatium(0.5) },
|
2017-03-09 13:37:40 +01:00
|
|
|
{ StyleIdx::timesigScale, "timesigScale", QVariant(QSizeF(1.0, 1.0)) },
|
2016-03-02 13:20:19 +01:00
|
|
|
{ StyleIdx::clefKeyRightMargin, "clefKeyRightMargin", Spatium(0.8) },
|
|
|
|
{ StyleIdx::clefKeyDistance, "clefKeyDistance", Spatium(1.0) }, // gould: 1 - 1.25
|
|
|
|
{ StyleIdx::clefTimesigDistance, "clefTimesigDistance", Spatium(1.0) },
|
|
|
|
{ StyleIdx::keyTimesigDistance, "keyTimesigDistance", Spatium(1.0) }, // gould: 1 - 1.5
|
2016-03-05 19:50:55 +01:00
|
|
|
{ StyleIdx::keyBarlineDistance, "keyTimesigDistance", Spatium(1.0) },
|
2016-04-20 18:56:08 +02:00
|
|
|
{ StyleIdx::systemHeaderDistance, "systemHeaderDistance", Spatium(2.5) }, // gould: 2.5
|
|
|
|
{ StyleIdx::systemHeaderTimeSigDistance, "systemHeaderTimeSigDistance", Spatium(2.0) }, // gould: 2.0
|
2016-03-02 13:20:19 +01:00
|
|
|
|
|
|
|
{ StyleIdx::clefBarlineDistance, "clefBarlineDistance", Spatium(0.18) }, // was 0.5
|
2016-05-04 10:27:40 +02:00
|
|
|
{ StyleIdx::timesigBarlineDistance, "timesigBarlineDistance", Spatium(0.5) },
|
2016-03-02 13:20:19 +01:00
|
|
|
{ StyleIdx::stemWidth, "stemWidth", Spatium(0.13) }, // 0.09375
|
|
|
|
{ StyleIdx::shortenStem, "shortenStem", QVariant(true) },
|
|
|
|
{ StyleIdx::shortStemProgression, "shortStemProgression", Spatium(0.25) },
|
|
|
|
{ StyleIdx::shortestStem, "shortestStem", Spatium(2.25) },
|
|
|
|
{ StyleIdx::beginRepeatLeftMargin, "beginRepeatLeftMargin", Spatium(1.0) },
|
|
|
|
{ StyleIdx::minNoteDistance, "minNoteDistance", Spatium(0.25) }, // 0.4
|
|
|
|
{ StyleIdx::barNoteDistance, "barNoteDistance", Spatium(1.2) },
|
|
|
|
|
|
|
|
{ StyleIdx::barAccidentalDistance, "barAccidentalDistance", Spatium(.3) },
|
|
|
|
{ StyleIdx::multiMeasureRestMargin, "multiMeasureRestMargin", Spatium(1.2) },
|
|
|
|
{ StyleIdx::noteBarDistance, "noteBarDistance", Spatium(1.0) },
|
|
|
|
{ StyleIdx::measureSpacing, "measureSpacing", QVariant(1.2) },
|
|
|
|
{ StyleIdx::staffLineWidth, "staffLineWidth", Spatium(0.08) }, // 0.09375
|
|
|
|
{ StyleIdx::ledgerLineWidth, "ledgerLineWidth", Spatium(0.16) }, // 0.1875
|
2016-05-03 01:21:42 +02:00
|
|
|
{ StyleIdx::ledgerLineLength, "ledgerLineLength", Spatium(.6) }, // notehead width + this value
|
2016-03-02 13:20:19 +01:00
|
|
|
{ StyleIdx::accidentalDistance, "accidentalDistance", Spatium(0.22) },
|
|
|
|
{ StyleIdx::accidentalNoteDistance, "accidentalNoteDistance", Spatium(0.22) },
|
|
|
|
{ StyleIdx::beamWidth, "beamWidth", Spatium(0.5) }, // was 0.48
|
|
|
|
|
|
|
|
{ StyleIdx::beamDistance, "beamDistance", QVariant(0.5) }, // 0.25sp units
|
2016-05-03 01:21:42 +02:00
|
|
|
{ StyleIdx::beamMinLen, "beamMinLen", Spatium(1.32) }, // 1.316178 exactly notehead widthen beams
|
2016-03-02 13:20:19 +01:00
|
|
|
{ StyleIdx::beamNoSlope, "beamNoSlope", QVariant(false) },
|
|
|
|
{ StyleIdx::dotMag, "dotMag", QVariant(1.0) },
|
|
|
|
{ StyleIdx::dotNoteDistance, "dotNoteDistance", Spatium(0.35) },
|
|
|
|
{ StyleIdx::dotRestDistance, "dotRestDistance", Spatium(0.25) },
|
|
|
|
{ StyleIdx::dotDotDistance, "dotDotDistance", Spatium(0.5) },
|
|
|
|
{ StyleIdx::propertyDistanceHead, "propertyDistanceHead", Spatium(1.0) },
|
|
|
|
{ StyleIdx::propertyDistanceStem, "propertyDistanceStem", Spatium(1.8) },
|
|
|
|
{ StyleIdx::propertyDistance, "propertyDistance", Spatium(1.0) },
|
|
|
|
|
|
|
|
{ StyleIdx::articulationMag, "articulationMag", QVariant(1.0) },
|
|
|
|
{ StyleIdx::lastSystemFillLimit, "lastSystemFillLimit", QVariant(0.3) },
|
2016-11-18 14:28:53 +01:00
|
|
|
|
|
|
|
{ StyleIdx::hairpinPlacement, "hairpinPlacement", int(Element::Placement::BELOW) },
|
|
|
|
{ StyleIdx::hairpinPosAbove, "hairpinPosAbove", Spatium(-3.5) },
|
|
|
|
{ StyleIdx::hairpinPosBelow, "hairpinPosBelow", Spatium(3.5) },
|
2016-03-02 13:20:19 +01:00
|
|
|
{ StyleIdx::hairpinHeight, "hairpinHeight", Spatium(1.2) },
|
|
|
|
{ StyleIdx::hairpinContHeight, "hairpinContHeight", Spatium(0.5) },
|
|
|
|
{ StyleIdx::hairpinLineWidth, "hairpinWidth", Spatium(0.13) },
|
2016-11-18 14:28:53 +01:00
|
|
|
|
|
|
|
{ StyleIdx::pedalPlacement, "pedalPlacement", int(Element::Placement::BELOW) },
|
|
|
|
{ StyleIdx::pedalPosAbove, "pedalPosAbove", Spatium(-4) },
|
|
|
|
{ StyleIdx::pedalPosBelow, "pedalPosBelow", Spatium(4) },
|
2016-03-02 13:20:19 +01:00
|
|
|
{ StyleIdx::pedalLineWidth, "pedalLineWidth", Spatium(.15) },
|
|
|
|
{ StyleIdx::pedalLineStyle, "pedalListStyle", QVariant(int(Qt::SolidLine)) },
|
2017-02-07 18:48:23 +01:00
|
|
|
{ StyleIdx::pedalBeginTextOffset, "pedalBeginTextOffset", QPointF(0.0, 0.15) },
|
2016-11-18 14:28:53 +01:00
|
|
|
|
|
|
|
{ StyleIdx::trillPlacement, "trillPlacement", int(Element::Placement::ABOVE) },
|
|
|
|
{ StyleIdx::trillPosAbove, "trillPosAbove", Spatium(-1) },
|
|
|
|
{ StyleIdx::trillPosBelow, "trillPosBelow", Spatium(1) },
|
2016-03-02 13:20:19 +01:00
|
|
|
|
|
|
|
{ StyleIdx::harmonyY, "harmonyY", Spatium(2.5) },
|
|
|
|
{ StyleIdx::harmonyFretDist, "harmonyFretDist", Spatium(0.5) },
|
|
|
|
{ StyleIdx::minHarmonyDistance, "minHarmonyDistance", Spatium(0.5) },
|
|
|
|
{ StyleIdx::maxHarmonyBarDistance, "maxHarmonyBarDistance", Spatium(3.0) },
|
|
|
|
{ StyleIdx::capoPosition, "capoPosition", QVariant(0) },
|
|
|
|
{ StyleIdx::fretNumMag, "fretNumMag", QVariant(2.0) },
|
|
|
|
{ StyleIdx::fretNumPos, "fretNumPos", QVariant(0) },
|
|
|
|
{ StyleIdx::fretY, "fretY", Spatium(2.0) },
|
|
|
|
{ StyleIdx::showPageNumber, "showPageNumber", QVariant(true) },
|
|
|
|
{ StyleIdx::showPageNumberOne, "showPageNumberOne", QVariant(false) },
|
|
|
|
|
|
|
|
{ StyleIdx::pageNumberOddEven, "pageNumberOddEven", QVariant(true) },
|
|
|
|
{ StyleIdx::showMeasureNumber, "showMeasureNumber", QVariant(true) },
|
|
|
|
{ StyleIdx::showMeasureNumberOne, "showMeasureNumberOne", QVariant(false) },
|
|
|
|
{ StyleIdx::measureNumberInterval, "measureNumberInterval", QVariant(5) },
|
|
|
|
{ StyleIdx::measureNumberSystem, "measureNumberSystem", QVariant(true) },
|
|
|
|
{ StyleIdx::measureNumberAllStaffs, "measureNumberAllStaffs", QVariant(false) },
|
|
|
|
{ StyleIdx::smallNoteMag, "smallNoteMag", QVariant(.7) },
|
|
|
|
{ StyleIdx::graceNoteMag, "graceNoteMag", QVariant(0.7) },
|
|
|
|
{ StyleIdx::smallStaffMag, "smallStaffMag", QVariant(0.7) },
|
|
|
|
{ StyleIdx::smallClefMag, "smallClefMag", QVariant(0.8) },
|
|
|
|
|
|
|
|
{ StyleIdx::genClef, "genClef", QVariant(true) },
|
|
|
|
{ StyleIdx::genKeysig, "genKeysig", QVariant(true) },
|
|
|
|
{ StyleIdx::genCourtesyTimesig, "genCourtesyTimesig", QVariant(true) },
|
|
|
|
{ StyleIdx::genCourtesyKeysig, "genCourtesyKeysig", QVariant(true) },
|
|
|
|
{ StyleIdx::genCourtesyClef, "genCourtesyClef", QVariant(true) },
|
|
|
|
{ StyleIdx::swingRatio, "swingRatio", QVariant(60) },
|
|
|
|
{ StyleIdx::swingUnit, "swingUnit", QVariant(QString("")) },
|
|
|
|
{ StyleIdx::useStandardNoteNames, "useStandardNoteNames", QVariant(true) },
|
|
|
|
{ StyleIdx::useGermanNoteNames, "useGermanNoteNames", QVariant(false) },
|
|
|
|
{ StyleIdx::useFullGermanNoteNames, "useFullGermanNoteNames", QVariant(false) },
|
|
|
|
|
|
|
|
{ StyleIdx::useSolfeggioNoteNames, "useSolfeggioNoteNames", QVariant(false) },
|
|
|
|
{ StyleIdx::useFrenchNoteNames, "useFrenchNoteNames", QVariant(false) },
|
|
|
|
{ StyleIdx::automaticCapitalization, "automaticCapitalization", QVariant(true) },
|
|
|
|
{ StyleIdx::lowerCaseMinorChords, "lowerCaseMinorChords", QVariant(false) },
|
|
|
|
{ StyleIdx::lowerCaseBassNotes, "lowerCaseBassNotes", QVariant(false) },
|
|
|
|
{ StyleIdx::allCapsNoteNames, "allCapsNoteNames", QVariant(false) },
|
|
|
|
{ StyleIdx::chordStyle, "chordStyle", QVariant(QString("std")) },
|
|
|
|
{ StyleIdx::chordsXmlFile, "chordsXmlFile", QVariant(false) },
|
|
|
|
{ StyleIdx::chordDescriptionFile, "chordDescriptionFile", QVariant(QString("chords_std.xml")) },
|
|
|
|
{ StyleIdx::concertPitch, "concertPitch", QVariant(false) },
|
|
|
|
|
|
|
|
{ StyleIdx::createMultiMeasureRests, "createMultiMeasureRests", QVariant(false) },
|
|
|
|
{ StyleIdx::minEmptyMeasures, "minEmptyMeasures", QVariant(2) },
|
|
|
|
{ StyleIdx::minMMRestWidth, "minMMRestWidth", Spatium(4) },
|
|
|
|
{ StyleIdx::hideEmptyStaves, "hideEmptyStaves", QVariant(false) },
|
|
|
|
{ StyleIdx::dontHideStavesInFirstSystem,
|
|
|
|
"dontHidStavesInFirstSystm", QVariant(true) },
|
|
|
|
{ StyleIdx::hideInstrumentNameIfOneInstrument,
|
|
|
|
"hideInstrumentNameIfOneInstrument", QVariant(true) },
|
|
|
|
{ StyleIdx::gateTime, "gateTime", QVariant(100) },
|
|
|
|
{ StyleIdx::tenutoGateTime, "tenutoGateTime", QVariant(100) },
|
|
|
|
{ StyleIdx::staccatoGateTime, "staccatoGateTime", QVariant(50) },
|
|
|
|
{ StyleIdx::slurGateTime, "slurGateTime", QVariant(100) },
|
|
|
|
|
|
|
|
{ StyleIdx::ArpeggioNoteDistance, "ArpeggioNoteDistance", Spatium(.5) },
|
|
|
|
{ StyleIdx::ArpeggioLineWidth, "ArpeggioLineWidth", Spatium(.18) },
|
|
|
|
{ StyleIdx::ArpeggioHookLen, "ArpeggioHookLen", Spatium(.8) },
|
|
|
|
{ StyleIdx::SlurEndWidth, "slurEndWidth", Spatium(.07) },
|
|
|
|
{ StyleIdx::SlurMidWidth, "slurMidWidth", Spatium(.15) },
|
|
|
|
{ StyleIdx::SlurDottedWidth, "slurDottedWidth", Spatium(.1) },
|
|
|
|
{ StyleIdx::MinTieLength, "minTieLength", Spatium(1.0) },
|
|
|
|
{ StyleIdx::SectionPause, "sectionPause", QVariant(qreal(3.0)) },
|
|
|
|
{ StyleIdx::MusicalSymbolFont, "musicalSymbolFont", QVariant(QString("Emmentaler")) },
|
|
|
|
{ StyleIdx::MusicalTextFont, "musicalTextFont", QVariant(QString("MScore Text")) },
|
|
|
|
|
|
|
|
{ StyleIdx::showHeader, "showHeader", QVariant(false) },
|
|
|
|
{ StyleIdx::headerFirstPage, "headerFirstPage", QVariant(false) },
|
|
|
|
{ StyleIdx::headerOddEven, "headerOddEven", QVariant(true) },
|
|
|
|
{ StyleIdx::evenHeaderL, "evenHeaderL", QVariant(QString()) },
|
|
|
|
{ StyleIdx::evenHeaderC, "evenHeaderC", QVariant(QString()) },
|
|
|
|
{ StyleIdx::evenHeaderR, "evenHeaderR", QVariant(QString()) },
|
|
|
|
{ StyleIdx::oddHeaderL, "oddHeaderL", QVariant(QString()) },
|
|
|
|
{ StyleIdx::oddHeaderC, "oddHeaderC", QVariant(QString()) },
|
|
|
|
{ StyleIdx::oddHeaderR, "oddHeaderR", QVariant(QString()) },
|
|
|
|
{ StyleIdx::showFooter, "showFooter", QVariant(true) },
|
|
|
|
|
|
|
|
{ StyleIdx::footerFirstPage, "footerFirstPage", QVariant(true) },
|
|
|
|
{ StyleIdx::footerOddEven, "footerOddEven", QVariant(true) },
|
|
|
|
{ StyleIdx::evenFooterL, "evenFooterL", QVariant(QString("$p")) },
|
|
|
|
{ StyleIdx::evenFooterC, "evenFooterC", QVariant(QString("$:copyright:")) },
|
|
|
|
{ StyleIdx::evenFooterR, "evenFooterR", QVariant(QString()) },
|
|
|
|
{ StyleIdx::oddFooterL, "oddFooterL", QVariant(QString()) },
|
|
|
|
{ StyleIdx::oddFooterC, "oddFooterC", QVariant(QString("$:copyright:")) },
|
|
|
|
{ StyleIdx::oddFooterR, "oddFooterR", QVariant(QString("$p")) },
|
|
|
|
{ StyleIdx::voltaY, "voltaY", Spatium(-3.0) },
|
|
|
|
{ StyleIdx::voltaHook, "voltaHook", Spatium(1.9) },
|
|
|
|
|
|
|
|
{ StyleIdx::voltaLineWidth, "voltaLineWidth", Spatium(.1) },
|
|
|
|
{ StyleIdx::voltaLineStyle, "voltaLineStyle", QVariant(int(Qt::SolidLine)) },
|
2016-11-18 14:28:53 +01:00
|
|
|
|
|
|
|
{ StyleIdx::ottavaPlacement, "ottavaPlacement", int(Element::Placement::ABOVE) },
|
|
|
|
{ StyleIdx::ottavaPosAbove, "ottavaPosAbove", Spatium(-3.0) },
|
|
|
|
{ StyleIdx::ottavaPosBelow, "ottavaPosBelow", Spatium(3.0) },
|
2016-03-02 13:20:19 +01:00
|
|
|
{ StyleIdx::ottavaHook, "ottavaHook", Spatium(1.9) },
|
|
|
|
{ StyleIdx::ottavaLineWidth, "ottavaLineWidth", Spatium(.1) },
|
|
|
|
{ StyleIdx::ottavaLineStyle, "ottavaLineStyle", QVariant(int(Qt::DashLine)) },
|
|
|
|
{ StyleIdx::ottavaNumbersOnly, "ottavaNumbersOnly", true },
|
2016-11-18 14:28:53 +01:00
|
|
|
|
2016-03-02 13:20:19 +01:00
|
|
|
{ StyleIdx::tabClef, "tabClef", QVariant(int(ClefType::TAB)) },
|
2016-05-03 01:21:42 +02:00
|
|
|
{ StyleIdx::tremoloWidth, "tremoloWidth", Spatium(1.2) }, // tremolo stroke width: notehead width
|
2016-03-02 13:20:19 +01:00
|
|
|
{ StyleIdx::tremoloBoxHeight, "tremoloBoxHeight", Spatium(0.65) },
|
|
|
|
|
|
|
|
{ StyleIdx::tremoloStrokeWidth, "tremoloLineWidth", Spatium(0.5) }, // was 0.35
|
|
|
|
{ StyleIdx::tremoloDistance, "tremoloDistance", Spatium(0.8) },
|
|
|
|
{ StyleIdx::linearStretch, "linearStretch", QVariant(qreal(1.5)) },
|
|
|
|
{ StyleIdx::crossMeasureValues, "crossMeasureValues", QVariant(false) },
|
|
|
|
{ StyleIdx::keySigNaturals, "keySigNaturals", QVariant(int(KeySigNatural::NONE)) },
|
2016-07-08 16:48:04 +02:00
|
|
|
|
2016-03-02 13:20:19 +01:00
|
|
|
{ StyleIdx::tupletMaxSlope, "tupletMaxSlope", QVariant(qreal(0.5)) },
|
|
|
|
{ StyleIdx::tupletOufOfStaff, "tupletOufOfStaff", QVariant(true) },
|
|
|
|
{ StyleIdx::tupletVHeadDistance, "tupletVHeadDistance", Spatium(.5) },
|
|
|
|
{ StyleIdx::tupletVStemDistance, "tupletVStemDistance", Spatium(.25) },
|
|
|
|
{ StyleIdx::tupletStemLeftDistance, "tupletStemLeftDistance", Spatium(.5) },
|
|
|
|
{ StyleIdx::tupletStemRightDistance, "tupletStemRightDistance", Spatium(.5) },
|
|
|
|
{ StyleIdx::tupletNoteLeftDistance, "tupletNoteLeftDistance", Spatium(0.0) },
|
|
|
|
{ StyleIdx::tupletNoteRightDistance, "tupletNoteRightDistance", Spatium(0.0) },
|
|
|
|
{ StyleIdx::tupletBracketWidth, "tupletBracketWidth", Spatium(0.1) },
|
2016-07-08 16:48:04 +02:00
|
|
|
{ StyleIdx::tupletDirection, "tupletDirection", Direction(Direction::AUTO) },
|
|
|
|
{ StyleIdx::tupletNumberType, "tupletNumberType", int(Tuplet::NumberType::SHOW_NUMBER) },
|
|
|
|
{ StyleIdx::tupletBracketType, "tupletBracketType", int(Tuplet::BracketType::AUTO_BRACKET) },
|
|
|
|
|
2016-03-02 13:20:19 +01:00
|
|
|
{ StyleIdx::barreLineWidth, "barreLineWidth", QVariant(1.0) },
|
|
|
|
{ StyleIdx::fretMag, "fretMag", QVariant(1.0) },
|
|
|
|
{ StyleIdx::scaleBarlines, "scaleBarlines", QVariant(true) },
|
|
|
|
{ StyleIdx::barGraceDistance, "barGraceDistance", Spatium(.6) },
|
|
|
|
{ StyleIdx::minVerticalDistance, "minVerticalDistance", Spatium(0.5) },
|
|
|
|
{ StyleIdx::ornamentStyle, "ornamentStyle", int(MScore::OrnamentStyle::DEFAULT) },
|
2016-03-08 09:46:33 +01:00
|
|
|
{ StyleIdx::spatium, "Spatium", SPATIUM20 },
|
2016-03-03 17:10:50 +01:00
|
|
|
|
2016-08-02 17:00:49 +02:00
|
|
|
{ StyleIdx::autoplaceHairpinDynamicsDistance, "autoplaceHairpinDynamicsDistance", Spatium(0.5) },
|
2016-11-18 14:28:53 +01:00
|
|
|
|
|
|
|
{ StyleIdx::dynamicsPlacement, "dynamicsPlacement", int(Element::Placement::BELOW) },
|
2016-11-18 16:23:28 +01:00
|
|
|
{ StyleIdx::dynamicsPosAbove, "dynamicsPosAbove", Spatium(-2.0) },
|
|
|
|
{ StyleIdx::dynamicsPosBelow, "dynamicsPosBelow", Spatium(1.0) },
|
2016-11-18 14:28:53 +01:00
|
|
|
|
2016-11-18 16:23:28 +01:00
|
|
|
{ StyleIdx::dynamicsMinDistance, "dynamicsMinDistance", Spatium(0.5) },
|
|
|
|
{ StyleIdx::autoplaceVerticalAlignRange, "autoplaceVerticalAlignRange", int(VerticalAlignRange::SYSTEM) },
|
2016-08-30 14:03:26 +02:00
|
|
|
|
|
|
|
{ StyleIdx::textLinePlacement, "textLinePlacement", int(Element::Placement::ABOVE) },
|
|
|
|
{ StyleIdx::textLinePosAbove, "textLinePosAbove", Spatium(-3.5) },
|
|
|
|
{ StyleIdx::textLinePosBelow, "textLinePosBelow", Spatium(3.5) },
|
2016-09-20 17:13:54 +02:00
|
|
|
|
2016-10-06 12:21:28 +02:00
|
|
|
{ StyleIdx::tremoloBarLineWidth, "tremoloBarLineWidth", Spatium(0.1) },
|
2017-02-10 15:13:23 +01:00
|
|
|
{ StyleIdx::jumpPosAbove, "jumpPosAbove", Spatium(-2.0) },
|
|
|
|
{ StyleIdx::markerPosAbove, "markerPosAbove", Spatium(-2.0) },
|
2017-01-16 20:51:12 +01:00
|
|
|
|
|
|
|
//====
|
|
|
|
|
|
|
|
{ StyleIdx::defaultFontFace, "defaultFontFace", "FreeSerif" },
|
|
|
|
{ StyleIdx::defaultFontSize, "defaultFontSize", 10.0 },
|
|
|
|
{ StyleIdx::defaultFontSpatiumDependent, "defaultFontSpatiumDependent", true },
|
|
|
|
{ StyleIdx::defaultFontBold, "defaultFontBold", false },
|
|
|
|
{ StyleIdx::defaultFontItalic, "defaultFontItalic", false },
|
|
|
|
{ StyleIdx::defaultFontUnderline, "defaultFontUnderline", false },
|
2017-01-25 15:54:46 +01:00
|
|
|
{ StyleIdx::defaultAlign, "defaultAlign", QVariant::fromValue(Align::LEFT) },
|
2017-01-16 20:51:12 +01:00
|
|
|
{ StyleIdx::defaultFrame, "defaultFrame", false },
|
|
|
|
{ StyleIdx::defaultFrameSquare, "defaultFrameSquare", false },
|
|
|
|
{ StyleIdx::defaultFrameCircle, "defaultFrameCircle", false },
|
2017-02-08 11:12:43 +01:00
|
|
|
{ StyleIdx::defaultFramePadding, "defaultFramePadding", 0.2 },
|
|
|
|
{ StyleIdx::defaultFrameWidth, "defaultFrameWidth", 0.1 },
|
2017-01-16 20:51:12 +01:00
|
|
|
{ StyleIdx::defaultFrameRound, "defaultFrameRound", 0 },
|
|
|
|
{ StyleIdx::defaultFrameFgColor, "defaultFrameFgColor", QColor(0, 0, 0, 255) },
|
|
|
|
{ StyleIdx::defaultFrameBgColor, "defaultFrameBgColor", QColor(255, 255, 255, 0) },
|
|
|
|
{ StyleIdx::defaultOffset, "defaultOffset", QPointF() },
|
|
|
|
{ StyleIdx::defaultOffsetType, "defaultOffsetType", int(OffsetType::SPATIUM) },
|
|
|
|
{ StyleIdx::defaultSystemFlag, "defaultSystemFlag", false },
|
|
|
|
|
|
|
|
{ StyleIdx::titleFontFace, "titleFontFace", "FreeSerif" },
|
|
|
|
{ StyleIdx::titleFontSize, "titleFontSize", 24.0 },
|
|
|
|
{ StyleIdx::titleFontSpatiumDependent, "titleFontSpatiumDependent", false },
|
|
|
|
{ StyleIdx::titleFontBold, "titleFontBold", false },
|
|
|
|
{ StyleIdx::titleFontItalic, "titleFontItalic", false },
|
|
|
|
{ StyleIdx::titleFontUnderline, "titleFontUnderline", false },
|
2017-01-25 15:54:46 +01:00
|
|
|
{ StyleIdx::titleAlign, "titleAlign", QVariant::fromValue(Align::HCENTER | Align::TOP) },
|
2017-01-16 20:51:12 +01:00
|
|
|
{ StyleIdx::titleOffset, "titleOffset", QPointF() },
|
|
|
|
{ StyleIdx::titleOffsetType, "titleOffsetType", int(OffsetType::ABS) },
|
|
|
|
|
|
|
|
{ StyleIdx::subTitleFontFace, "subTitleFontFace", "FreeSerif" },
|
|
|
|
{ StyleIdx::subTitleFontSize, "subTitleFontSize", 14.0 },
|
|
|
|
{ StyleIdx::subTitleFontSpatiumDependent, "subTitleFontSpatiumDependent", false },
|
|
|
|
{ StyleIdx::subTitleFontBold, "subTitleFontBold", false },
|
|
|
|
{ StyleIdx::subTitleFontItalic, "subTtitleFontItalic", false },
|
|
|
|
{ StyleIdx::subTitleFontUnderline, "subTitleFontUnderline", false },
|
2017-01-25 15:54:46 +01:00
|
|
|
{ StyleIdx::subTitleAlign, "subTitleAlign", QVariant::fromValue(Align::HCENTER | Align::TOP) },
|
2017-01-16 20:51:12 +01:00
|
|
|
{ StyleIdx::subTitleOffset, "subTitleOffset", QPointF(0.0, MM(10.0)) },
|
|
|
|
{ StyleIdx::subTitleOffsetType, "subTitleOffsetType", int(OffsetType::ABS) },
|
|
|
|
|
|
|
|
{ StyleIdx::composerFontFace, "composerFontFace", "FreeSerif" },
|
|
|
|
{ StyleIdx::composerFontSize, "composerFontSize", 12.0 },
|
|
|
|
{ StyleIdx::composerFontSpatiumDependent, "composerFontSpatiumDependent", false },
|
|
|
|
{ StyleIdx::composerFontBold, "composerFontBold", false },
|
|
|
|
{ StyleIdx::composerFontItalic, "composerFontItalic", false },
|
|
|
|
{ StyleIdx::composerFontUnderline, "composerFontUnderline", false },
|
2017-01-25 15:54:46 +01:00
|
|
|
{ StyleIdx::composerAlign, "composerAlign", QVariant::fromValue(Align::RIGHT | Align::BOTTOM) },
|
2017-01-16 20:51:12 +01:00
|
|
|
{ StyleIdx::composerOffset, "composerOffset", QPointF() },
|
|
|
|
{ StyleIdx::composerOffsetType, "composerOffsetType", int(OffsetType::ABS) },
|
|
|
|
|
|
|
|
{ StyleIdx::lyricistFontFace, "lyricistFontFace", "FreeSerif" },
|
|
|
|
{ StyleIdx::lyricistFontSize, "lyricistFontSize", 12.0 },
|
|
|
|
{ StyleIdx::lyricistFontSpatiumDependent, "lyricistFontSpatiumDependent", false },
|
|
|
|
{ StyleIdx::lyricistFontBold, "lyricistFontBold", false },
|
|
|
|
{ StyleIdx::lyricistFontItalic, "lyricistFontItalic", false },
|
|
|
|
{ StyleIdx::lyricistFontUnderline, "lyricistFontUnderline", false },
|
2017-01-25 15:54:46 +01:00
|
|
|
{ StyleIdx::lyricistAlign, "lyricistAlign", QVariant::fromValue(Align::LEFT | Align::BOTTOM) },
|
2017-01-16 20:51:12 +01:00
|
|
|
{ StyleIdx::lyricistOffset, "lyricistOffset", QPointF() },
|
|
|
|
{ StyleIdx::lyricistOffsetType, "lyricistOffsetType", int(OffsetType::ABS) },
|
|
|
|
|
|
|
|
{ StyleIdx::lyricsOddFontFace, "lyricsOddFontFace", "FreeSerif" },
|
|
|
|
{ StyleIdx::lyricsOddFontSize, "lyricsOddFontSize", 11.0 },
|
|
|
|
{ StyleIdx::lyricsOddFontBold, "lyricsOddFontBold", false },
|
|
|
|
{ StyleIdx::lyricsOddFontItalic, "lyricsOddFontItalic", false },
|
|
|
|
{ StyleIdx::lyricsOddFontUnderline, "lyricsOddFontUnderline", false },
|
2017-01-25 15:54:46 +01:00
|
|
|
{ StyleIdx::lyricsOddAlign, "lyricistOddAlign", QVariant::fromValue(Align::HCENTER | Align::BASELINE) },
|
2017-01-16 20:51:12 +01:00
|
|
|
{ StyleIdx::lyricsOddOffset, "lyricistOddOffset", QPointF(0.0, 6.0) },
|
|
|
|
|
|
|
|
{ StyleIdx::lyricsEvenFontFace, "lyricsEvenFontFace", "FreeSerif" },
|
|
|
|
{ StyleIdx::lyricsEvenFontSize, "lyricsEvenFontSize", 11.0 },
|
|
|
|
{ StyleIdx::lyricsEvenFontBold, "lyricsEvenFontBold", false },
|
|
|
|
{ StyleIdx::lyricsEvenFontItalic, "lyricsEvenFontItalic", false },
|
|
|
|
{ StyleIdx::lyricsEvenFontUnderline, "lyricsEventFontUnderline", false },
|
2017-01-25 15:54:46 +01:00
|
|
|
{ StyleIdx::lyricsEvenAlign, "lyricistEvenAlign", QVariant::fromValue(Align::HCENTER | Align::BASELINE) },
|
2017-01-16 20:51:12 +01:00
|
|
|
{ StyleIdx::lyricsEvenOffset, "lyricistEvenOffset", QPointF(0.0, 6.0) },
|
|
|
|
|
|
|
|
{ StyleIdx::fingeringFontFace, "fingeringFontFace", "FreeSerif" },
|
|
|
|
{ StyleIdx::fingeringFontSize, "fingeringFontSize", 8.0 },
|
|
|
|
{ StyleIdx::fingeringFontBold, "fingeringFontBold", false },
|
|
|
|
{ StyleIdx::fingeringFontItalic, "fingeringFontItalic", false },
|
|
|
|
{ StyleIdx::fingeringFontUnderline, "fingeringFontUnderline", false },
|
2017-01-25 15:54:46 +01:00
|
|
|
{ StyleIdx::fingeringAlign, "fingeringAlign", QVariant::fromValue(Align::CENTER) },
|
2017-01-16 20:51:12 +01:00
|
|
|
{ StyleIdx::fingeringFrame, "fingeringFrame", false },
|
|
|
|
{ StyleIdx::fingeringFrameSquare, "fingeringFrameSquare", false },
|
|
|
|
{ StyleIdx::fingeringFrameCircle, "fingeringFrameCircle", false },
|
2017-02-08 11:12:43 +01:00
|
|
|
{ StyleIdx::fingeringFramePadding, "fingeringFramePadding", 0.2 },
|
|
|
|
{ StyleIdx::fingeringFrameWidth, "fingeringFrameWidth", 0.1 },
|
2017-01-16 20:51:12 +01:00
|
|
|
{ StyleIdx::fingeringFrameRound, "fingeringFrameRound", 0 },
|
|
|
|
{ StyleIdx::fingeringFrameFgColor, "fingeringFrameFgColor", QColor(0, 0, 0, 255) },
|
|
|
|
{ StyleIdx::fingeringFrameBgColor, "fingeringFrameBgColor", QColor(255, 255, 255, 0) },
|
2017-01-17 17:52:17 +01:00
|
|
|
{ StyleIdx::fingeringOffset, "fingeringOffset", QPointF() },
|
2017-01-16 20:51:12 +01:00
|
|
|
|
|
|
|
{ StyleIdx::lhGuitarFingeringFontFace, "lhGuitarFingeringFontFace", "FreeSerif" },
|
|
|
|
{ StyleIdx::lhGuitarFingeringFontSize, "lhGuitarFingeringFontSize", 8.0 },
|
|
|
|
{ StyleIdx::lhGuitarFingeringFontBold, "lhGuitarFingeringFontBold", false },
|
|
|
|
{ StyleIdx::lhGuitarFingeringFontItalic, "lhGuitarFingeringFontItalic", false },
|
|
|
|
{ StyleIdx::lhGuitarFingeringFontUnderline,"lhGuitarFingeringFontUnderline",false },
|
2017-01-25 15:54:46 +01:00
|
|
|
{ StyleIdx::lhGuitarFingeringAlign, "lhGuitarFingeringAlign", QVariant::fromValue(Align::RIGHT | Align::VCENTER) },
|
2017-01-16 20:51:12 +01:00
|
|
|
{ StyleIdx::lhGuitarFingeringFrame, "lhGuitarFingeringFrame", false },
|
|
|
|
{ StyleIdx::lhGuitarFingeringFrameSquare, "lhGuitarFingeringFrameSquare", false },
|
|
|
|
{ StyleIdx::lhGuitarFingeringFrameCircle, "lhGuitarFingeringFrameCircle", false },
|
2017-02-08 11:12:43 +01:00
|
|
|
{ StyleIdx::lhGuitarFingeringFramePadding, "lhGuitarFingeringFramePadding", 0.2 },
|
|
|
|
{ StyleIdx::lhGuitarFingeringFrameWidth, "lhGuitarFingeringFrameWidth", 0.1 },
|
2017-01-16 20:51:12 +01:00
|
|
|
{ StyleIdx::lhGuitarFingeringFrameRound, "lhGuitarFingeringFrameRound", 0 },
|
|
|
|
{ StyleIdx::lhGuitarFingeringFrameFgColor, "lhGuitarFingeringFrameFgColor", QColor(0, 0, 0, 255) },
|
|
|
|
{ StyleIdx::lhGuitarFingeringFrameBgColor, "lhGuitarFingeringFrameBgColor", QColor(255, 255, 255, 0) },
|
|
|
|
{ StyleIdx::lhGuitarFingeringOffset, "lhGuitarFingeringOffset", QPointF(-0.5, 0.0) },
|
|
|
|
|
|
|
|
{ StyleIdx::rhGuitarFingeringFontFace, "rhGuitarFingeringFontFace", "FreeSerif" },
|
|
|
|
{ StyleIdx::rhGuitarFingeringFontSize, "rhGuitarFingeringFontSize", 8.0 },
|
|
|
|
{ StyleIdx::rhGuitarFingeringFontBold, "rhGuitarFingeringFontBold", false },
|
|
|
|
{ StyleIdx::rhGuitarFingeringFontItalic, "rhGuitarFingeringFontItalic", false },
|
|
|
|
{ StyleIdx::rhGuitarFingeringFontUnderline,"rhGuitarFingeringFontUnderline",false },
|
2017-01-25 15:54:46 +01:00
|
|
|
{ StyleIdx::rhGuitarFingeringAlign, "rhGuitarFingeringAlign", QVariant::fromValue(Align::CENTER) },
|
2017-01-16 20:51:12 +01:00
|
|
|
{ StyleIdx::rhGuitarFingeringFrame, "rhGuitarFingeringFrame", false },
|
|
|
|
{ StyleIdx::rhGuitarFingeringFrameSquare, "rhGuitarFingeringFrameSquare", false },
|
|
|
|
{ StyleIdx::rhGuitarFingeringFrameCircle, "rhGuitarFingeringFrameCircle", false },
|
2017-02-08 11:12:43 +01:00
|
|
|
{ StyleIdx::rhGuitarFingeringFramePadding, "rhGuitarFingeringFramePadding", 0.2 },
|
|
|
|
{ StyleIdx::rhGuitarFingeringFrameWidth, "rhGuitarFingeringFrameWidth", 0.1 },
|
2017-01-16 20:51:12 +01:00
|
|
|
{ StyleIdx::rhGuitarFingeringFrameRound, "rhGuitarFingeringFrameRound", 0 },
|
|
|
|
{ StyleIdx::rhGuitarFingeringFrameFgColor, "rhGuitarFingeringFrameFgColor", QColor(0, 0, 0, 255) },
|
|
|
|
{ StyleIdx::rhGuitarFingeringFrameBgColor, "rhGuitarFingeringFrameBgColor", QColor(255, 255, 255, 0) },
|
|
|
|
{ StyleIdx::rhGuitarFingeringOffset, "rhGuitarFingeringOffset", QPointF() },
|
|
|
|
|
|
|
|
{ StyleIdx::stringNumberFontFace, "stringNumberFontFace", "FreeSerif" },
|
|
|
|
{ StyleIdx::stringNumberFontSize, "stringNumberFontSize", 8.0 },
|
|
|
|
{ StyleIdx::stringNumberFontBold, "stringNumberFontBold", false },
|
|
|
|
{ StyleIdx::stringNumberFontItalic, "stringNumberFontItalic", false },
|
|
|
|
{ StyleIdx::stringNumberFontUnderline, "stringNumberFontUnderline", false },
|
2017-01-25 15:54:46 +01:00
|
|
|
{ StyleIdx::stringNumberAlign, "stringNumberAlign", QVariant::fromValue(Align::CENTER) },
|
2017-01-16 20:51:12 +01:00
|
|
|
{ StyleIdx::stringNumberFrame, "stringNumberFrame", true },
|
|
|
|
{ StyleIdx::stringNumberFrameSquare, "stringNumberFrameSquare", false },
|
|
|
|
{ StyleIdx::stringNumberFrameCircle, "stringNumberFrameCircle", true },
|
|
|
|
{ StyleIdx::stringNumberFramePadding, "stringNumberFramePadding", 0.2 },
|
|
|
|
{ StyleIdx::stringNumberFrameWidth, "stringNumberFrameWidth", 0.1 },
|
|
|
|
{ StyleIdx::stringNumberFrameRound, "stringNumberFrameRound", 0 },
|
|
|
|
{ StyleIdx::stringNumberFrameFgColor, "stringNumberFrameFgColor", QColor(0, 0, 0, 255) },
|
|
|
|
{ StyleIdx::stringNumberFrameBgColor, "stringNumberFrameBgColor", QColor(255, 255, 255, 0) },
|
|
|
|
{ StyleIdx::stringNumberOffset, "stringNumberOffset", QPointF(0.0, -2.0) },
|
|
|
|
|
|
|
|
{ StyleIdx::longInstrumentFontFace, "longInstrumentFontFace", "FreeSerif" },
|
|
|
|
{ StyleIdx::longInstrumentFontSize, "longInstrumentFontSize", 12.0 },
|
|
|
|
{ StyleIdx::longInstrumentFontBold, "longInstrumentFontBold", false },
|
|
|
|
{ StyleIdx::longInstrumentFontItalic, "longInstrumentFontItalic", false },
|
|
|
|
{ StyleIdx::longInstrumentFontUnderline, "longInstrumentFontUnderline", false },
|
2017-02-27 13:58:17 +01:00
|
|
|
{ StyleIdx::longInstrumentAlign, "longInstrumentAlign", QVariant::fromValue(Align::RIGHT | Align::VCENTER) },
|
2017-01-16 20:51:12 +01:00
|
|
|
|
|
|
|
{ StyleIdx::shortInstrumentFontFace, "shortInstrumentFontFace", "FreeSerif" },
|
|
|
|
{ StyleIdx::shortInstrumentFontSize, "shortInstrumentFontSize", 12.0 },
|
|
|
|
{ StyleIdx::shortInstrumentFontBold, "shortInstrumentFontBold", false },
|
|
|
|
{ StyleIdx::shortInstrumentFontItalic, "shortInstrumentFontItalic", false },
|
|
|
|
{ StyleIdx::shortInstrumentFontUnderline, "shortInstrumentFontUnderline", false },
|
2017-02-27 13:58:17 +01:00
|
|
|
{ StyleIdx::shortInstrumentAlign, "shortInstrumentAlign", QVariant::fromValue(Align::RIGHT | Align::VCENTER) },
|
2017-01-16 20:51:12 +01:00
|
|
|
|
|
|
|
{ StyleIdx::partInstrumentFontFace, "partInstrumentFontFace", "FreeSerif" },
|
|
|
|
{ StyleIdx::partInstrumentFontSize, "partInstrumentFontSize", 18.0 },
|
|
|
|
{ StyleIdx::partInstrumentFontBold, "partInstrumentFontBold", false },
|
|
|
|
{ StyleIdx::partInstrumentFontItalic, "partInstrumentFontItalic", false },
|
|
|
|
{ StyleIdx::partInstrumentFontUnderline, "partInstrumentFontUnderline", false },
|
|
|
|
|
|
|
|
{ StyleIdx::dynamicsFontFace, "dynamicsFontFace", "FreeSerif" },
|
|
|
|
{ StyleIdx::dynamicsFontSize, "dynamicsFontSize", 12.0 },
|
|
|
|
{ StyleIdx::dynamicsFontBold, "dynamicsFontBold", false },
|
|
|
|
{ StyleIdx::dynamicsFontItalic, "dynamicsFontItalic", true },
|
|
|
|
{ StyleIdx::dynamicsFontUnderline, "dynamicsFontUnderline", false },
|
2017-01-25 15:54:46 +01:00
|
|
|
{ StyleIdx::dynamicsAlign, "dynamicsAlign", QVariant::fromValue(Align::HCENTER | Align::BASELINE) },
|
2017-01-16 20:51:12 +01:00
|
|
|
|
|
|
|
{ StyleIdx::expressionFontFace, "expressionFontFace", "FreeSerif" },
|
|
|
|
{ StyleIdx::expressionFontSize, "expressionFontSize", 11.0 },
|
|
|
|
{ StyleIdx::expressionFontBold, "expressionFontBold", false },
|
|
|
|
{ StyleIdx::expressionFontItalic, "expressionFontItalic", true },
|
|
|
|
{ StyleIdx::expressionFontUnderline, "expressionFontUnderline", false },
|
2017-01-25 15:54:46 +01:00
|
|
|
{ StyleIdx::expressionAlign, "expressionAlign", QVariant::fromValue(Align::LEFT | Align::BASELINE) },
|
2017-01-16 20:51:12 +01:00
|
|
|
|
|
|
|
{ StyleIdx::tempoFontFace, "tempoFontFace", "FreeSerif" },
|
|
|
|
{ StyleIdx::tempoFontSize, "tempoFontSize", 12.0 },
|
|
|
|
{ StyleIdx::tempoFontBold, "tempoFontBold", true },
|
|
|
|
{ StyleIdx::tempoFontItalic, "tempoFontItalic", false },
|
|
|
|
{ StyleIdx::tempoFontUnderline, "tempoFontUnderline", false },
|
2017-01-25 15:54:46 +01:00
|
|
|
{ StyleIdx::tempoAlign, "tempoAlign", QVariant::fromValue(Align::LEFT | Align::BASELINE) },
|
2017-01-16 20:51:12 +01:00
|
|
|
{ StyleIdx::tempoOffset, "tempoOffset", QPointF(0.0, -4.0) },
|
|
|
|
{ StyleIdx::tempoSystemFlag, "tempoSystemFlag", true },
|
2017-02-08 13:27:35 +01:00
|
|
|
{ StyleIdx::tempoPlacement, "tempoPlacement", int(Element::Placement::ABOVE) },
|
|
|
|
{ StyleIdx::tempoPosAbove, "tempoPosAbove", Spatium(-2.0) },
|
|
|
|
{ StyleIdx::tempoPosBelow, "tempoPosBelow", Spatium(1.0) },
|
|
|
|
{ StyleIdx::tempoMinDistance, "tempoMinDistance", Spatium(.5) },
|
2017-01-16 20:51:12 +01:00
|
|
|
|
|
|
|
{ StyleIdx::metronomeFontFace, "metronomeFontFace", "FreeSerif" },
|
|
|
|
{ StyleIdx::metronomeFontSize, "metronomeFontSize", 12.0 },
|
|
|
|
{ StyleIdx::metronomeFontBold, "metronomeFontBold", true },
|
|
|
|
{ StyleIdx::metronomeFontItalic, "metronomeFontItalic", false },
|
|
|
|
{ StyleIdx::metronomeFontUnderline, "metronomeFontUnderline", false },
|
|
|
|
|
|
|
|
{ StyleIdx::measureNumberFontFace, "measureNumberFontFace", "FreeSerif" },
|
|
|
|
{ StyleIdx::measureNumberFontSize, "measureNumberFontSize", 8.0 },
|
|
|
|
{ StyleIdx::measureNumberFontBold, "measureNumberFontBold", false },
|
|
|
|
{ StyleIdx::measureNumberFontItalic, "measureNumberFontItalic", false },
|
|
|
|
{ StyleIdx::measureNumberFontUnderline, "measureNumberFontUnderline", false },
|
|
|
|
{ StyleIdx::measureNumberOffset, "measureNumberOffset", QPointF(0.0, -2.0) },
|
|
|
|
{ StyleIdx::measureNumberOffsetType, "measureNumberOffsetType", int(OffsetType::SPATIUM) },
|
|
|
|
|
|
|
|
{ StyleIdx::translatorFontFace, "translatorFontFace", "FreeSerif" },
|
|
|
|
{ StyleIdx::translatorFontSize, "translatorFontSize", 11.0 },
|
|
|
|
{ StyleIdx::translatorFontBold, "translatorFontBold", false },
|
|
|
|
{ StyleIdx::translatorFontItalic, "translatorFontItalic", false },
|
|
|
|
{ StyleIdx::translatorFontUnderline, "translatorFontUnderline", false },
|
|
|
|
|
|
|
|
{ StyleIdx::tupletFontFace, "tupletFontFace", "FreeSerif" },
|
|
|
|
{ StyleIdx::tupletFontSize, "tupletFontSize", 10.0 },
|
|
|
|
{ StyleIdx::tupletFontBold, "tupletFontBold", false },
|
|
|
|
{ StyleIdx::tupletFontItalic, "tupletFontItalic", true },
|
|
|
|
{ StyleIdx::tupletFontUnderline, "tupletFontUnderline", false },
|
2017-02-18 11:23:47 +01:00
|
|
|
{ StyleIdx::tupletAlign, "tupletAlign", QVariant::fromValue(Align::CENTER) },
|
2017-01-16 20:51:12 +01:00
|
|
|
|
|
|
|
{ StyleIdx::systemFontFace, "systemFontFace", "FreeSerif" },
|
|
|
|
{ StyleIdx::systemFontSize, "systemFontSize", 10.0 },
|
|
|
|
{ StyleIdx::systemFontBold, "systemFontBold", false },
|
|
|
|
{ StyleIdx::systemFontItalic, "systemFontItalic", false },
|
|
|
|
{ StyleIdx::systemFontUnderline, "systemFontUnderline", false },
|
|
|
|
{ StyleIdx::systemOffset, "systemOffset", QPointF(0.0, -4.0) },
|
2017-01-23 10:54:57 +01:00
|
|
|
{ StyleIdx::systemOffsetType, "defaultOffsetType", int(OffsetType::SPATIUM) },
|
2017-01-20 11:05:52 +01:00
|
|
|
// { StyleIdx::systemSystemFlag, "systemSystemFlag", true },
|
2017-01-16 20:51:12 +01:00
|
|
|
|
|
|
|
{ StyleIdx::staffFontFace, "staffFontFace", "FreeSerif" },
|
|
|
|
{ StyleIdx::staffFontSize, "staffFontSize", 10.0 },
|
|
|
|
{ StyleIdx::staffFontBold, "staffFontBold", false },
|
|
|
|
{ StyleIdx::staffFontItalic, "staffFontItalic", false },
|
|
|
|
{ StyleIdx::staffFontUnderline, "staffFontUnderline", false },
|
|
|
|
{ StyleIdx::staffOffset, "staffOffset", QPointF(0.0, -4.0) },
|
2017-01-23 10:54:57 +01:00
|
|
|
{ StyleIdx::staffOffsetType, "defaultOffsetType", int(OffsetType::SPATIUM) },
|
|
|
|
// { StyleIdx::staffSystemFlag, "staffSystemFlag", false },
|
2017-01-16 20:51:12 +01:00
|
|
|
|
|
|
|
{ StyleIdx::chordSymbolFontFace, "chordSymbolFontFace", "FreeSerif" },
|
|
|
|
{ StyleIdx::chordSymbolFontSize, "chordSymbolFontSize", 12.0 },
|
|
|
|
{ StyleIdx::chordSymbolFontBold, "chordSymbolFontBold", false },
|
|
|
|
{ StyleIdx::chordSymbolFontItalic, "chordSymbolFontItalic", false },
|
|
|
|
{ StyleIdx::chordSymbolFontUnderline, "chordSymbolFontUnderline", false },
|
|
|
|
|
|
|
|
{ StyleIdx::rehearsalMarkFontFace, "rehearsalMarkFontFace", "FreeSerif" },
|
|
|
|
{ StyleIdx::rehearsalMarkFontSize, "rehearsalMarkFontSize", 14.0 },
|
|
|
|
{ StyleIdx::rehearsalMarkFontBold, "rehearsalMarkFontBold", true },
|
|
|
|
{ StyleIdx::rehearsalMarkFontItalic, "rehearsalMarkFontItalic", false },
|
|
|
|
{ StyleIdx::rehearsalMarkFontUnderline, "rehearsalMarkFontUnderline", false },
|
2017-02-08 18:11:51 +01:00
|
|
|
{ StyleIdx::rehearsalMarkFrame, "rehearsalMarkFrame", true },
|
2017-01-16 20:51:12 +01:00
|
|
|
{ StyleIdx::rehearsalMarkFrameSquare, "rehearsalMarkFrameSquare", false },
|
|
|
|
{ StyleIdx::rehearsalMarkFrameCircle, "rehearsalMarkFrameCircle", false },
|
2017-02-08 18:11:51 +01:00
|
|
|
{ StyleIdx::rehearsalMarkFramePadding, "rehearsalMarkFramePadding", 0.5 },
|
|
|
|
{ StyleIdx::rehearsalMarkFrameWidth, "rehearsalMarkFrameWidth", 0.2 },
|
|
|
|
{ StyleIdx::rehearsalMarkFrameRound, "rehearsalMarkFrameRound", 20 },
|
2017-01-16 20:51:12 +01:00
|
|
|
{ StyleIdx::rehearsalMarkFrameFgColor, "rehearsalMarkFrameFgColor", QColor(0, 0, 0, 255) },
|
|
|
|
{ StyleIdx::rehearsalMarkFrameBgColor, "rehearsalMarkFrameBgColor", QColor(255, 255, 255, 0) },
|
2017-02-08 18:11:51 +01:00
|
|
|
{ StyleIdx::rehearsalMarkPlacement, "rehearsalMarkPlacement", int(Element::Placement::ABOVE) },
|
|
|
|
{ StyleIdx::rehearsalMarkPosAbove, "rehearsalMarkPosAbove", Spatium(-2.0) },
|
|
|
|
{ StyleIdx::rehearsalMarkPosBelow, "rehearsalMarkPosBelow", Spatium(1.0) },
|
|
|
|
{ StyleIdx::rehearsalMarkMinDistance, "rehearsalMarkMinDistance", Spatium(0.5) },
|
2017-01-16 20:51:12 +01:00
|
|
|
|
|
|
|
{ StyleIdx::repeatLeftFontFace, "repeatLeftFontFace", "FreeSerif" },
|
|
|
|
{ StyleIdx::repeatLeftFontSize, "repeatLeftFontSize", 20.0 },
|
|
|
|
{ StyleIdx::repeatLeftFontBold, "repeatLeftFontBold", false },
|
|
|
|
{ StyleIdx::repeatLeftFontItalic, "repeatLeftFontItalic", false },
|
|
|
|
{ StyleIdx::repeatLeftFontUnderline, "repeatLeftFontUnderline", false },
|
2017-02-10 15:13:23 +01:00
|
|
|
{ StyleIdx::repeatLeftAlign, "repeatLeftAlign", QVariant::fromValue(Align::LEFT | Align::BASELINE) },
|
2017-01-16 20:51:12 +01:00
|
|
|
|
|
|
|
{ StyleIdx::repeatRightFontFace, "repeatRightFontFace", "FreeSerif" },
|
|
|
|
{ StyleIdx::repeatRightFontSize, "repeatRightFontSize", 12.0 },
|
|
|
|
{ StyleIdx::repeatRightFontBold, "repeatRightFontBold", false },
|
|
|
|
{ StyleIdx::repeatRightFontItalic, "repeatRightFontItalic", false },
|
|
|
|
{ StyleIdx::repeatRightFontUnderline, "repeatRightFontUnderline", false },
|
2017-02-10 15:13:23 +01:00
|
|
|
{ StyleIdx::repeatRightAlign, "repeatRightAlign", QVariant::fromValue(Align::RIGHT | Align::BASELINE) },
|
2017-01-16 20:51:12 +01:00
|
|
|
|
|
|
|
{ StyleIdx::voltaFontFace, "voltaFontFace", "FreeSerif" },
|
|
|
|
{ StyleIdx::voltaFontSize, "voltaFontSize", 11.0 },
|
|
|
|
{ StyleIdx::voltaFontBold, "voltaFontBold", true },
|
|
|
|
{ StyleIdx::voltaFontItalic, "voltaFontItalic", false },
|
|
|
|
{ StyleIdx::voltaFontUnderline, "voltaFontUnderline", false },
|
2017-01-25 15:54:46 +01:00
|
|
|
{ StyleIdx::voltaAlign, "voltaAlign", QVariant::fromValue(Align::LEFT | Align::BASELINE) },
|
2017-01-16 20:51:12 +01:00
|
|
|
{ StyleIdx::voltaOffset, "voltaOffset", QPointF(0.5, 1.9) },
|
|
|
|
|
|
|
|
{ StyleIdx::frameFontFace, "frameFontFace", "FreeSerif" },
|
|
|
|
{ StyleIdx::frameFontSize, "frameFontSize", 12.0 },
|
|
|
|
{ StyleIdx::frameFontBold, "frameFontBold", false },
|
|
|
|
{ StyleIdx::frameFontItalic, "frameFontItalic", false },
|
|
|
|
{ StyleIdx::frameFontUnderline, "frameFontUnderline", false },
|
2017-01-25 15:54:46 +01:00
|
|
|
{ StyleIdx::frameAlign, "frameAlign", QVariant::fromValue(Align::LEFT) },
|
2017-01-16 20:51:12 +01:00
|
|
|
|
|
|
|
{ StyleIdx::textLineFontFace, "textLineFontFace", "FreeSerif" },
|
|
|
|
{ StyleIdx::textLineFontSize, "textLineFontSize", 12.0 },
|
|
|
|
{ StyleIdx::textLineFontBold, "textLineFontBold", false },
|
|
|
|
{ StyleIdx::textLineFontItalic, "textLineFontItalic", false },
|
|
|
|
{ StyleIdx::textLineFontUnderline, "textLineFontUnderline", false },
|
|
|
|
|
|
|
|
{ StyleIdx::glissandoFontFace, "glissandoFontFace", "FreeSerif" },
|
|
|
|
{ StyleIdx::glissandoFontSize, "glissandoFontSize", 8.0 },
|
|
|
|
{ StyleIdx::glissandoFontBold, "glissandoFontBold", false },
|
|
|
|
{ StyleIdx::glissandoFontItalic, "glissandoFontItalic", true },
|
|
|
|
{ StyleIdx::glissandoFontUnderline, "glissandoFontUnderline", false },
|
|
|
|
|
|
|
|
{ StyleIdx::ottavaFontFace, "ottavaFontFace", "FreeSerif" },
|
|
|
|
{ StyleIdx::ottavaFontSize, "ottavaFontSize", 12.0 },
|
|
|
|
{ StyleIdx::ottavaFontBold, "ottavaFontBold", false },
|
|
|
|
{ StyleIdx::ottavaFontItalic, "ottavaFontItalic", false },
|
|
|
|
{ StyleIdx::ottavaFontUnderline, "ottavaFontUnderline", false },
|
|
|
|
|
|
|
|
{ StyleIdx::pedalFontFace, "pedalFontFace", "FreeSerif" },
|
|
|
|
{ StyleIdx::pedalFontSize, "pedalFontSize", 12.0 },
|
|
|
|
{ StyleIdx::pedalFontBold, "pedalFontBold", false },
|
|
|
|
{ StyleIdx::pedalFontItalic, "pedalFontItalic", false },
|
|
|
|
{ StyleIdx::pedalFontUnderline, "pedalFontUnderline", false },
|
|
|
|
|
|
|
|
{ StyleIdx::hairpinFontFace, "hairpinFontFace", "FreeSerif" },
|
|
|
|
{ StyleIdx::hairpinFontSize, "hairpinFontSize", 12.0 },
|
|
|
|
{ StyleIdx::hairpinFontBold, "hairpinFontBold", false },
|
|
|
|
{ StyleIdx::hairpinFontItalic, "hairpinFontItalic", true },
|
|
|
|
{ StyleIdx::hairpinFontUnderline, "hairpinFontUnderline", false },
|
2017-03-16 12:13:19 +01:00
|
|
|
{ StyleIdx::hairpinTextAlign, "hairpinTextAlign", QVariant::fromValue(Align::LEFT | Align::BASELINE) },
|
2017-01-16 20:51:12 +01:00
|
|
|
|
|
|
|
{ StyleIdx::bendFontFace, "bendFontFace", "FreeSerif" },
|
|
|
|
{ StyleIdx::bendFontSize, "bendFontSize", 8.0 },
|
|
|
|
{ StyleIdx::bendFontBold, "bendFontBold", false },
|
|
|
|
{ StyleIdx::bendFontItalic, "bendFontItalic", false },
|
|
|
|
{ StyleIdx::bendFontUnderline, "bendFontUnderline", false },
|
|
|
|
|
|
|
|
{ StyleIdx::headerFontFace, "headerFontFace", "FreeSerif" },
|
|
|
|
{ StyleIdx::headerFontSize, "headerFontSize", 8.0 },
|
|
|
|
{ StyleIdx::headerFontBold, "headerFontBold", false },
|
|
|
|
{ StyleIdx::headerFontItalic, "headerFontItalic", false },
|
|
|
|
{ StyleIdx::headerFontUnderline, "headerFontUnderline", false },
|
|
|
|
|
|
|
|
{ StyleIdx::footerFontFace, "footerFontFace", "FreeSerif" },
|
|
|
|
{ StyleIdx::footerFontSize, "footerFontSize", 8.0 },
|
|
|
|
{ StyleIdx::footerFontBold, "footerFontBold", false },
|
|
|
|
{ StyleIdx::footerFontItalic, "footerFontItalic", false },
|
|
|
|
{ StyleIdx::footerFontUnderline, "footerFontUnderline", false },
|
|
|
|
|
|
|
|
{ StyleIdx::instrumentChangeFontFace, "instrumentChangeFontFace", "FreeSerif" },
|
|
|
|
{ StyleIdx::instrumentChangeFontSize, "instrumentChangeFontSize", 12.0 },
|
|
|
|
{ StyleIdx::instrumentChangeFontBold, "instrumentChangeFontBold", true },
|
|
|
|
{ StyleIdx::instrumentChangeFontItalic, "instrumentChangeFontItalic", false },
|
|
|
|
{ StyleIdx::instrumentChangeFontUnderline, "instrumentChangeFontUnderline",false },
|
|
|
|
{ StyleIdx::instrumentChangeOffset, "instrumentChangeOffset", QPointF(0, -3.0) },
|
|
|
|
|
|
|
|
{ StyleIdx::figuredBassFontFace, "figuredBassFontFace", "MScoreBC" },
|
|
|
|
{ StyleIdx::figuredBassFontSize, "figuredBassFontSize", 8.0 },
|
|
|
|
{ StyleIdx::figuredBassFontBold, "figuredBassFontBold", false },
|
|
|
|
{ StyleIdx::figuredBassFontItalic, "figuredBassFontItalic", false },
|
|
|
|
{ StyleIdx::figuredBassFontUnderline, "figuredBassFontUnderline", false },
|
2017-01-25 15:54:46 +01:00
|
|
|
|
|
|
|
{ StyleIdx::user1FontFace, "user1FontFace", "FreeSerif" },
|
|
|
|
{ StyleIdx::user1FontSize, "user1FontSize", 10.0 },
|
|
|
|
{ StyleIdx::user1FontBold, "user1FontBold", false },
|
|
|
|
{ StyleIdx::user1FontItalic, "user1FontItalic", false },
|
|
|
|
{ StyleIdx::user1FontUnderline, "user1FontUnderline", false },
|
|
|
|
|
|
|
|
{ StyleIdx::user2FontFace, "user2FontFace", "FreeSerif" },
|
|
|
|
{ StyleIdx::user2FontSize, "user2FontSize", 10.0 },
|
|
|
|
{ StyleIdx::user2FontBold, "user2FontBold", false },
|
|
|
|
{ StyleIdx::user2FontItalic, "user2FontItalic", false },
|
|
|
|
{ StyleIdx::user2FontUnderline, "user2FontUnderline", false },
|
|
|
|
|
2016-03-02 13:20:19 +01:00
|
|
|
};
|
2017-01-16 20:51:12 +01:00
|
|
|
#undef MM
|
|
|
|
|
2017-03-09 18:41:13 +01:00
|
|
|
MStyle MScore::_baseStyle;
|
|
|
|
MStyle MScore::_defaultStyle;
|
|
|
|
|
2017-01-16 20:51:12 +01:00
|
|
|
//---------------------------------------------------------
|
|
|
|
// sets of styled properties
|
|
|
|
//---------------------------------------------------------
|
|
|
|
|
|
|
|
const std::vector<StyledProperty> defaultStyle {
|
|
|
|
{ StyleIdx::defaultFontFace, P_ID::FONT_FACE },
|
|
|
|
{ StyleIdx::defaultFontSize, P_ID::FONT_SIZE },
|
|
|
|
{ StyleIdx::defaultFontSpatiumDependent, P_ID::FONT_SPATIUM_DEPENDENT },
|
|
|
|
{ StyleIdx::defaultFontBold, P_ID::FONT_BOLD },
|
|
|
|
{ StyleIdx::defaultFontItalic, P_ID::FONT_ITALIC },
|
|
|
|
{ StyleIdx::defaultFontUnderline, P_ID::FONT_UNDERLINE },
|
|
|
|
{ StyleIdx::defaultAlign, P_ID::ALIGN },
|
|
|
|
{ StyleIdx::defaultFrame, P_ID::FRAME },
|
|
|
|
{ StyleIdx::defaultFrameSquare, P_ID::FRAME_SQUARE },
|
|
|
|
{ StyleIdx::defaultFrameCircle, P_ID::FRAME_CIRCLE },
|
|
|
|
{ StyleIdx::defaultFramePadding, P_ID::FRAME_PADDING },
|
|
|
|
{ StyleIdx::defaultFrameWidth, P_ID::FRAME_WIDTH },
|
|
|
|
{ StyleIdx::defaultFrameRound, P_ID::FRAME_ROUND },
|
|
|
|
{ StyleIdx::defaultFrameFgColor, P_ID::FRAME_FG_COLOR },
|
|
|
|
{ StyleIdx::defaultFrameBgColor, P_ID::FRAME_BG_COLOR },
|
|
|
|
{ StyleIdx::defaultOffset, P_ID::OFFSET },
|
|
|
|
{ StyleIdx::defaultOffsetType, P_ID::OFFSET_TYPE },
|
|
|
|
{ StyleIdx::defaultSystemFlag, P_ID::SYSTEM_FLAG },
|
|
|
|
};
|
|
|
|
|
|
|
|
const std::vector<StyledProperty> titleStyle {
|
|
|
|
{ StyleIdx::titleFontFace, P_ID::FONT_FACE },
|
|
|
|
{ StyleIdx::titleFontSize, P_ID::FONT_SIZE },
|
|
|
|
{ StyleIdx::titleFontSpatiumDependent, P_ID::FONT_SPATIUM_DEPENDENT },
|
|
|
|
{ StyleIdx::titleFontBold, P_ID::FONT_BOLD },
|
|
|
|
{ StyleIdx::titleFontItalic, P_ID::FONT_ITALIC },
|
|
|
|
{ StyleIdx::titleFontUnderline, P_ID::FONT_UNDERLINE },
|
|
|
|
{ StyleIdx::titleAlign, P_ID::ALIGN },
|
|
|
|
{ StyleIdx::titleOffset, P_ID::OFFSET },
|
|
|
|
{ StyleIdx::titleOffsetType, P_ID::OFFSET_TYPE },
|
|
|
|
};
|
|
|
|
|
|
|
|
const std::vector<StyledProperty> subTitleStyle {
|
|
|
|
{ StyleIdx::subTitleFontFace, P_ID::FONT_FACE },
|
|
|
|
{ StyleIdx::subTitleFontSize, P_ID::FONT_SIZE },
|
|
|
|
{ StyleIdx::subTitleFontSpatiumDependent, P_ID::FONT_SPATIUM_DEPENDENT },
|
|
|
|
{ StyleIdx::subTitleFontBold, P_ID::FONT_BOLD },
|
|
|
|
{ StyleIdx::subTitleFontItalic, P_ID::FONT_ITALIC },
|
|
|
|
{ StyleIdx::subTitleFontUnderline, P_ID::FONT_UNDERLINE },
|
|
|
|
{ StyleIdx::subTitleAlign, P_ID::ALIGN },
|
|
|
|
{ StyleIdx::subTitleOffset, P_ID::OFFSET },
|
|
|
|
{ StyleIdx::subTitleOffsetType, P_ID::OFFSET_TYPE },
|
|
|
|
{ StyleIdx::subTitleOffset, P_ID::OFFSET },
|
|
|
|
{ StyleIdx::subTitleOffsetType, P_ID::OFFSET_TYPE },
|
|
|
|
};
|
|
|
|
|
|
|
|
const std::vector<StyledProperty> composerStyle {
|
|
|
|
{ StyleIdx::composerFontFace, P_ID::FONT_FACE },
|
|
|
|
{ StyleIdx::composerFontSize, P_ID::FONT_SIZE },
|
|
|
|
{ StyleIdx::composerFontSpatiumDependent, P_ID::FONT_SPATIUM_DEPENDENT },
|
|
|
|
{ StyleIdx::composerFontBold, P_ID::FONT_BOLD },
|
|
|
|
{ StyleIdx::composerFontItalic, P_ID::FONT_ITALIC },
|
|
|
|
{ StyleIdx::composerFontUnderline, P_ID::FONT_UNDERLINE },
|
|
|
|
{ StyleIdx::composerAlign, P_ID::ALIGN },
|
|
|
|
{ StyleIdx::composerOffset, P_ID::OFFSET },
|
|
|
|
{ StyleIdx::composerOffsetType, P_ID::OFFSET_TYPE },
|
|
|
|
};
|
|
|
|
|
|
|
|
const std::vector<StyledProperty> lyricistStyle {
|
|
|
|
{ StyleIdx::lyricistFontFace, P_ID::FONT_FACE },
|
|
|
|
{ StyleIdx::lyricistFontSize, P_ID::FONT_SIZE },
|
|
|
|
{ StyleIdx::lyricistFontBold, P_ID::FONT_BOLD },
|
|
|
|
{ StyleIdx::lyricistFontItalic, P_ID::FONT_ITALIC },
|
|
|
|
{ StyleIdx::lyricistFontUnderline, P_ID::FONT_UNDERLINE },
|
|
|
|
{ StyleIdx::lyricistAlign, P_ID::ALIGN },
|
|
|
|
{ StyleIdx::lyricistOffset, P_ID::OFFSET },
|
|
|
|
{ StyleIdx::lyricistOffsetType, P_ID::OFFSET_TYPE },
|
|
|
|
};
|
|
|
|
|
|
|
|
const std::vector<StyledProperty> lyricsOddStyle {
|
|
|
|
{ StyleIdx::lyricsOddFontFace, P_ID::FONT_FACE },
|
|
|
|
{ StyleIdx::lyricsOddFontSize, P_ID::FONT_SIZE },
|
|
|
|
{ StyleIdx::lyricsOddFontBold, P_ID::FONT_BOLD },
|
|
|
|
{ StyleIdx::lyricsOddFontItalic, P_ID::FONT_ITALIC },
|
|
|
|
{ StyleIdx::lyricsOddFontUnderline, P_ID::FONT_UNDERLINE },
|
|
|
|
{ StyleIdx::lyricsOddAlign, P_ID::ALIGN },
|
|
|
|
};
|
|
|
|
|
|
|
|
const std::vector<StyledProperty> lyricsEvenStyle {
|
|
|
|
{ StyleIdx::lyricsEvenFontFace, P_ID::FONT_FACE },
|
|
|
|
{ StyleIdx::lyricsEvenFontSize, P_ID::FONT_SIZE },
|
|
|
|
{ StyleIdx::lyricsEvenFontBold, P_ID::FONT_BOLD },
|
|
|
|
{ StyleIdx::lyricsEvenFontItalic, P_ID::FONT_ITALIC },
|
|
|
|
{ StyleIdx::lyricsEvenFontUnderline, P_ID::FONT_UNDERLINE },
|
|
|
|
{ StyleIdx::lyricsEvenAlign, P_ID::ALIGN },
|
|
|
|
};
|
|
|
|
|
|
|
|
const std::vector<StyledProperty> fingeringStyle {
|
|
|
|
{ StyleIdx::fingeringFontFace, P_ID::FONT_FACE },
|
|
|
|
{ StyleIdx::fingeringFontSize, P_ID::FONT_SIZE },
|
|
|
|
{ StyleIdx::fingeringFontBold, P_ID::FONT_BOLD },
|
|
|
|
{ StyleIdx::fingeringFontItalic, P_ID::FONT_ITALIC },
|
|
|
|
{ StyleIdx::fingeringFontUnderline, P_ID::FONT_UNDERLINE },
|
|
|
|
{ StyleIdx::fingeringAlign, P_ID::ALIGN },
|
|
|
|
{ StyleIdx::fingeringFrame, P_ID::FRAME },
|
|
|
|
{ StyleIdx::fingeringFrameSquare, P_ID::FRAME_SQUARE },
|
|
|
|
{ StyleIdx::fingeringFrameCircle, P_ID::FRAME_CIRCLE },
|
|
|
|
{ StyleIdx::fingeringFramePadding, P_ID::FRAME_PADDING },
|
|
|
|
{ StyleIdx::fingeringFrameWidth, P_ID::FRAME_WIDTH },
|
|
|
|
{ StyleIdx::fingeringFrameRound, P_ID::FRAME_ROUND },
|
|
|
|
{ StyleIdx::fingeringFrameFgColor, P_ID::FRAME_FG_COLOR },
|
|
|
|
{ StyleIdx::fingeringFrameBgColor, P_ID::FRAME_BG_COLOR },
|
2017-01-17 17:52:17 +01:00
|
|
|
{ StyleIdx::fingeringOffset, P_ID::OFFSET },
|
2017-01-16 20:51:12 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
const std::vector<StyledProperty> lhGuitarFingeringStyle {
|
|
|
|
{ StyleIdx::lhGuitarFingeringFontFace, P_ID::FONT_FACE },
|
|
|
|
{ StyleIdx::lhGuitarFingeringFontSize, P_ID::FONT_SIZE },
|
|
|
|
{ StyleIdx::lhGuitarFingeringFontBold, P_ID::FONT_BOLD },
|
|
|
|
{ StyleIdx::lhGuitarFingeringFontItalic, P_ID::FONT_ITALIC },
|
|
|
|
{ StyleIdx::lhGuitarFingeringFontUnderline, P_ID::FONT_UNDERLINE },
|
|
|
|
{ StyleIdx::lhGuitarFingeringAlign, P_ID::ALIGN },
|
|
|
|
{ StyleIdx::lhGuitarFingeringFrame, P_ID::FRAME },
|
|
|
|
{ StyleIdx::lhGuitarFingeringFrameSquare, P_ID::FRAME_SQUARE },
|
|
|
|
{ StyleIdx::lhGuitarFingeringFrameCircle, P_ID::FRAME_CIRCLE },
|
|
|
|
{ StyleIdx::lhGuitarFingeringFramePadding, P_ID::FRAME_PADDING },
|
|
|
|
{ StyleIdx::lhGuitarFingeringFrameWidth, P_ID::FRAME_WIDTH },
|
|
|
|
{ StyleIdx::lhGuitarFingeringFrameRound, P_ID::FRAME_ROUND },
|
|
|
|
{ StyleIdx::lhGuitarFingeringFrameFgColor, P_ID::FRAME_FG_COLOR },
|
|
|
|
{ StyleIdx::lhGuitarFingeringFrameBgColor, P_ID::FRAME_BG_COLOR },
|
2017-01-17 17:52:17 +01:00
|
|
|
{ StyleIdx::lhGuitarFingeringOffset, P_ID::OFFSET },
|
2017-01-16 20:51:12 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
const std::vector<StyledProperty> rhGuitarFingeringStyle {
|
|
|
|
{ StyleIdx::rhGuitarFingeringFontFace, P_ID::FONT_FACE },
|
|
|
|
{ StyleIdx::rhGuitarFingeringFontSize, P_ID::FONT_SIZE },
|
|
|
|
{ StyleIdx::rhGuitarFingeringFontBold, P_ID::FONT_BOLD },
|
|
|
|
{ StyleIdx::rhGuitarFingeringFontItalic, P_ID::FONT_ITALIC },
|
|
|
|
{ StyleIdx::rhGuitarFingeringFontUnderline, P_ID::FONT_UNDERLINE },
|
|
|
|
{ StyleIdx::rhGuitarFingeringAlign, P_ID::ALIGN },
|
|
|
|
{ StyleIdx::rhGuitarFingeringFrame, P_ID::FRAME },
|
|
|
|
{ StyleIdx::rhGuitarFingeringFrameSquare, P_ID::FRAME_SQUARE },
|
|
|
|
{ StyleIdx::rhGuitarFingeringFrameCircle, P_ID::FRAME_CIRCLE },
|
|
|
|
{ StyleIdx::rhGuitarFingeringFramePadding, P_ID::FRAME_PADDING },
|
|
|
|
{ StyleIdx::rhGuitarFingeringFrameWidth, P_ID::FRAME_WIDTH },
|
|
|
|
{ StyleIdx::rhGuitarFingeringFrameRound, P_ID::FRAME_ROUND },
|
|
|
|
{ StyleIdx::rhGuitarFingeringFrameFgColor, P_ID::FRAME_FG_COLOR },
|
|
|
|
{ StyleIdx::rhGuitarFingeringFrameBgColor, P_ID::FRAME_BG_COLOR },
|
2017-01-17 17:52:17 +01:00
|
|
|
{ StyleIdx::rhGuitarFingeringOffset, P_ID::OFFSET },
|
2017-01-16 20:51:12 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
const std::vector<StyledProperty> stringNumberStyle {
|
|
|
|
{ StyleIdx::stringNumberFontFace, P_ID::FONT_FACE },
|
|
|
|
{ StyleIdx::stringNumberFontSize, P_ID::FONT_SIZE },
|
|
|
|
{ StyleIdx::stringNumberFontBold, P_ID::FONT_BOLD },
|
|
|
|
{ StyleIdx::stringNumberFontItalic, P_ID::FONT_ITALIC },
|
|
|
|
{ StyleIdx::stringNumberFontUnderline, P_ID::FONT_UNDERLINE },
|
|
|
|
{ StyleIdx::stringNumberAlign, P_ID::ALIGN },
|
|
|
|
{ StyleIdx::stringNumberFrame, P_ID::FRAME },
|
|
|
|
{ StyleIdx::stringNumberFrameSquare, P_ID::FRAME_SQUARE },
|
|
|
|
{ StyleIdx::stringNumberFrameCircle, P_ID::FRAME_CIRCLE },
|
|
|
|
{ StyleIdx::stringNumberFramePadding, P_ID::FRAME_PADDING },
|
|
|
|
{ StyleIdx::stringNumberFrameWidth, P_ID::FRAME_WIDTH },
|
|
|
|
{ StyleIdx::stringNumberFrameRound, P_ID::FRAME_ROUND },
|
|
|
|
{ StyleIdx::stringNumberFrameFgColor, P_ID::FRAME_FG_COLOR },
|
|
|
|
{ StyleIdx::stringNumberFrameBgColor, P_ID::FRAME_BG_COLOR },
|
2017-01-17 17:52:17 +01:00
|
|
|
{ StyleIdx::stringNumberOffset, P_ID::OFFSET },
|
2017-01-16 20:51:12 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
const std::vector<StyledProperty> longInstrumentStyle {
|
|
|
|
{ StyleIdx::longInstrumentFontFace, P_ID::FONT_FACE },
|
|
|
|
{ StyleIdx::longInstrumentFontSize, P_ID::FONT_SIZE },
|
|
|
|
{ StyleIdx::longInstrumentFontBold, P_ID::FONT_BOLD },
|
|
|
|
{ StyleIdx::longInstrumentFontItalic, P_ID::FONT_ITALIC },
|
|
|
|
{ StyleIdx::longInstrumentFontUnderline, P_ID::FONT_UNDERLINE },
|
2017-02-27 13:58:17 +01:00
|
|
|
{ StyleIdx::longInstrumentAlign, P_ID::ALIGN },
|
2017-01-16 20:51:12 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
const std::vector<StyledProperty> shortInstrumentStyle {
|
|
|
|
{ StyleIdx::shortInstrumentFontFace, P_ID::FONT_FACE },
|
|
|
|
{ StyleIdx::shortInstrumentFontSize, P_ID::FONT_SIZE },
|
|
|
|
{ StyleIdx::shortInstrumentFontBold, P_ID::FONT_BOLD },
|
|
|
|
{ StyleIdx::shortInstrumentFontItalic, P_ID::FONT_ITALIC },
|
|
|
|
{ StyleIdx::shortInstrumentFontUnderline, P_ID::FONT_UNDERLINE },
|
2017-02-27 13:58:17 +01:00
|
|
|
{ StyleIdx::shortInstrumentAlign, P_ID::ALIGN },
|
2017-01-16 20:51:12 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
const std::vector<StyledProperty> partInstrumentStyle {
|
|
|
|
{ StyleIdx::partInstrumentFontFace, P_ID::FONT_FACE },
|
|
|
|
{ StyleIdx::partInstrumentFontSize, P_ID::FONT_SIZE },
|
|
|
|
{ StyleIdx::partInstrumentFontBold, P_ID::FONT_BOLD },
|
|
|
|
{ StyleIdx::partInstrumentFontItalic, P_ID::FONT_ITALIC },
|
|
|
|
{ StyleIdx::partInstrumentFontUnderline, P_ID::FONT_UNDERLINE },
|
|
|
|
};
|
|
|
|
|
|
|
|
const std::vector<StyledProperty> dynamicsStyle {
|
|
|
|
{ StyleIdx::dynamicsFontFace, P_ID::FONT_FACE },
|
|
|
|
{ StyleIdx::dynamicsFontSize, P_ID::FONT_SIZE },
|
|
|
|
{ StyleIdx::dynamicsFontBold, P_ID::FONT_BOLD },
|
|
|
|
{ StyleIdx::dynamicsFontItalic, P_ID::FONT_ITALIC },
|
|
|
|
{ StyleIdx::dynamicsFontUnderline, P_ID::FONT_UNDERLINE },
|
|
|
|
};
|
|
|
|
|
|
|
|
const std::vector<StyledProperty> expressionStyle {
|
|
|
|
{ StyleIdx::expressionFontFace, P_ID::FONT_FACE },
|
|
|
|
{ StyleIdx::expressionFontSize, P_ID::FONT_SIZE },
|
|
|
|
{ StyleIdx::expressionFontBold, P_ID::FONT_BOLD },
|
|
|
|
{ StyleIdx::expressionFontItalic, P_ID::FONT_ITALIC },
|
|
|
|
{ StyleIdx::expressionFontUnderline, P_ID::FONT_UNDERLINE },
|
|
|
|
};
|
|
|
|
|
|
|
|
const std::vector<StyledProperty> tempoStyle {
|
|
|
|
{ StyleIdx::tempoFontFace, P_ID::FONT_FACE },
|
|
|
|
{ StyleIdx::tempoFontSize, P_ID::FONT_SIZE },
|
|
|
|
{ StyleIdx::tempoFontBold, P_ID::FONT_BOLD },
|
|
|
|
{ StyleIdx::tempoFontItalic, P_ID::FONT_ITALIC },
|
|
|
|
{ StyleIdx::tempoFontUnderline, P_ID::FONT_UNDERLINE },
|
|
|
|
{ StyleIdx::tempoOffset, P_ID::OFFSET },
|
|
|
|
{ StyleIdx::tempoSystemFlag, P_ID::SYSTEM_FLAG },
|
|
|
|
};
|
|
|
|
|
|
|
|
const std::vector<StyledProperty> metronomeStyle {
|
|
|
|
{ StyleIdx::metronomeFontFace, P_ID::FONT_FACE },
|
|
|
|
{ StyleIdx::metronomeFontSize, P_ID::FONT_SIZE },
|
|
|
|
{ StyleIdx::metronomeFontBold, P_ID::FONT_BOLD },
|
|
|
|
{ StyleIdx::metronomeFontItalic, P_ID::FONT_ITALIC },
|
|
|
|
{ StyleIdx::metronomeFontUnderline, P_ID::FONT_UNDERLINE },
|
|
|
|
};
|
|
|
|
|
|
|
|
const std::vector<StyledProperty> measureNumberStyle {
|
|
|
|
{ StyleIdx::measureNumberFontFace, P_ID::FONT_FACE },
|
|
|
|
{ StyleIdx::measureNumberFontSize, P_ID::FONT_SIZE },
|
|
|
|
{ StyleIdx::measureNumberFontBold, P_ID::FONT_BOLD },
|
|
|
|
{ StyleIdx::measureNumberFontItalic, P_ID::FONT_ITALIC },
|
|
|
|
{ StyleIdx::measureNumberFontUnderline, P_ID::FONT_UNDERLINE },
|
|
|
|
{ StyleIdx::measureNumberOffset, P_ID::OFFSET },
|
|
|
|
{ StyleIdx::measureNumberOffsetType, P_ID::OFFSET_TYPE },
|
|
|
|
};
|
|
|
|
|
|
|
|
const std::vector<StyledProperty> translatorStyle {
|
|
|
|
{ StyleIdx::translatorFontFace, P_ID::FONT_FACE },
|
|
|
|
{ StyleIdx::translatorFontSize, P_ID::FONT_SIZE },
|
|
|
|
{ StyleIdx::translatorFontBold, P_ID::FONT_BOLD },
|
|
|
|
{ StyleIdx::translatorFontItalic, P_ID::FONT_ITALIC },
|
|
|
|
{ StyleIdx::translatorFontUnderline, P_ID::FONT_UNDERLINE },
|
|
|
|
};
|
|
|
|
|
|
|
|
const std::vector<StyledProperty> tupletStyle {
|
|
|
|
{ StyleIdx::tupletFontFace, P_ID::FONT_FACE },
|
|
|
|
{ StyleIdx::tupletFontSize, P_ID::FONT_SIZE },
|
|
|
|
{ StyleIdx::tupletFontBold, P_ID::FONT_BOLD },
|
|
|
|
{ StyleIdx::tupletFontItalic, P_ID::FONT_ITALIC },
|
|
|
|
{ StyleIdx::tupletFontUnderline, P_ID::FONT_UNDERLINE },
|
2017-02-18 11:23:47 +01:00
|
|
|
{ StyleIdx::tupletAlign, P_ID::ALIGN },
|
2017-01-16 20:51:12 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
const std::vector<StyledProperty> systemStyle {
|
|
|
|
{ StyleIdx::systemFontFace, P_ID::FONT_FACE },
|
|
|
|
{ StyleIdx::systemFontSize, P_ID::FONT_SIZE },
|
|
|
|
{ StyleIdx::systemFontBold, P_ID::FONT_BOLD },
|
|
|
|
{ StyleIdx::systemFontItalic, P_ID::FONT_ITALIC },
|
|
|
|
{ StyleIdx::systemFontUnderline, P_ID::FONT_UNDERLINE },
|
|
|
|
{ StyleIdx::systemOffset, P_ID::OFFSET },
|
2017-01-23 10:54:57 +01:00
|
|
|
{ StyleIdx::systemOffsetType, P_ID::OFFSET_TYPE },
|
2017-01-20 11:05:52 +01:00
|
|
|
// { StyleIdx::systemSystemFlag, P_ID::SYSTEM_FLAG },
|
2017-01-16 20:51:12 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
const std::vector<StyledProperty> staffStyle {
|
|
|
|
{ StyleIdx::staffFontFace, P_ID::FONT_FACE },
|
|
|
|
{ StyleIdx::staffFontSize, P_ID::FONT_SIZE },
|
|
|
|
{ StyleIdx::staffFontBold, P_ID::FONT_BOLD },
|
|
|
|
{ StyleIdx::staffFontItalic, P_ID::FONT_ITALIC },
|
|
|
|
{ StyleIdx::staffFontUnderline, P_ID::FONT_UNDERLINE },
|
|
|
|
{ StyleIdx::staffOffset, P_ID::OFFSET },
|
2017-01-23 10:54:57 +01:00
|
|
|
{ StyleIdx::staffOffsetType, P_ID::OFFSET_TYPE },
|
2017-01-20 11:05:52 +01:00
|
|
|
// { StyleIdx::staffSystemFlag, P_ID::SYSTEM_FLAG },
|
2017-01-16 20:51:12 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
const std::vector<StyledProperty> chordSymbolStyle {
|
|
|
|
{ StyleIdx::chordSymbolFontFace, P_ID::FONT_FACE },
|
|
|
|
{ StyleIdx::chordSymbolFontSize, P_ID::FONT_SIZE },
|
|
|
|
{ StyleIdx::chordSymbolFontBold, P_ID::FONT_BOLD },
|
|
|
|
{ StyleIdx::chordSymbolFontItalic, P_ID::FONT_ITALIC },
|
|
|
|
{ StyleIdx::chordSymbolFontUnderline, P_ID::FONT_UNDERLINE },
|
|
|
|
};
|
|
|
|
|
|
|
|
const std::vector<StyledProperty> rehearsalMarkStyle {
|
|
|
|
{ StyleIdx::rehearsalMarkFontFace, P_ID::FONT_FACE },
|
|
|
|
{ StyleIdx::rehearsalMarkFontSize, P_ID::FONT_SIZE },
|
|
|
|
{ StyleIdx::rehearsalMarkFontBold, P_ID::FONT_BOLD },
|
|
|
|
{ StyleIdx::rehearsalMarkFontItalic, P_ID::FONT_ITALIC },
|
|
|
|
{ StyleIdx::rehearsalMarkFontUnderline, P_ID::FONT_UNDERLINE },
|
|
|
|
{ StyleIdx::rehearsalMarkFrame, P_ID::FRAME },
|
|
|
|
{ StyleIdx::rehearsalMarkFrameSquare, P_ID::FRAME_SQUARE },
|
|
|
|
{ StyleIdx::rehearsalMarkFrameCircle, P_ID::FRAME_CIRCLE },
|
|
|
|
{ StyleIdx::rehearsalMarkFramePadding, P_ID::FRAME_PADDING },
|
|
|
|
{ StyleIdx::rehearsalMarkFrameWidth, P_ID::FRAME_WIDTH },
|
|
|
|
{ StyleIdx::rehearsalMarkFrameRound, P_ID::FRAME_ROUND },
|
|
|
|
{ StyleIdx::rehearsalMarkFrameFgColor, P_ID::FRAME_FG_COLOR },
|
|
|
|
{ StyleIdx::rehearsalMarkFrameBgColor, P_ID::FRAME_BG_COLOR },
|
|
|
|
};
|
|
|
|
|
|
|
|
const std::vector<StyledProperty> repeatLeftStyle {
|
|
|
|
{ StyleIdx::repeatLeftFontFace, P_ID::FONT_FACE },
|
|
|
|
{ StyleIdx::repeatLeftFontSize, P_ID::FONT_SIZE },
|
|
|
|
{ StyleIdx::repeatLeftFontBold, P_ID::FONT_BOLD },
|
|
|
|
{ StyleIdx::repeatLeftFontItalic, P_ID::FONT_ITALIC },
|
|
|
|
{ StyleIdx::repeatLeftFontUnderline, P_ID::FONT_UNDERLINE },
|
2017-02-10 15:13:23 +01:00
|
|
|
{ StyleIdx::repeatLeftAlign, P_ID::ALIGN },
|
2017-01-16 20:51:12 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
const std::vector<StyledProperty> repeatRightStyle {
|
|
|
|
{ StyleIdx::repeatRightFontFace, P_ID::FONT_FACE },
|
|
|
|
{ StyleIdx::repeatRightFontSize, P_ID::FONT_SIZE },
|
|
|
|
{ StyleIdx::repeatRightFontBold, P_ID::FONT_BOLD },
|
|
|
|
{ StyleIdx::repeatRightFontItalic, P_ID::FONT_ITALIC },
|
|
|
|
{ StyleIdx::repeatRightFontUnderline, P_ID::FONT_UNDERLINE },
|
2017-02-10 15:13:23 +01:00
|
|
|
{ StyleIdx::repeatRightAlign, P_ID::ALIGN },
|
2017-01-16 20:51:12 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
const std::vector<StyledProperty> frameStyle {
|
|
|
|
{ StyleIdx::frameFontFace, P_ID::FONT_FACE },
|
|
|
|
{ StyleIdx::frameFontSize, P_ID::FONT_SIZE },
|
|
|
|
{ StyleIdx::frameFontBold, P_ID::FONT_BOLD },
|
|
|
|
{ StyleIdx::frameFontItalic, P_ID::FONT_ITALIC },
|
|
|
|
{ StyleIdx::frameFontUnderline, P_ID::FONT_UNDERLINE },
|
2017-01-25 15:54:46 +01:00
|
|
|
{ StyleIdx::frameAlign, P_ID::ALIGN },
|
2017-01-16 20:51:12 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
const std::vector<StyledProperty> textLineStyle {
|
|
|
|
{ StyleIdx::textLineFontFace, P_ID::FONT_FACE },
|
|
|
|
{ StyleIdx::textLineFontSize, P_ID::FONT_SIZE },
|
|
|
|
{ StyleIdx::textLineFontBold, P_ID::FONT_BOLD },
|
|
|
|
{ StyleIdx::textLineFontItalic, P_ID::FONT_ITALIC },
|
|
|
|
{ StyleIdx::textLineFontUnderline, P_ID::FONT_UNDERLINE },
|
|
|
|
};
|
|
|
|
|
|
|
|
const std::vector<StyledProperty> glissandoStyle {
|
|
|
|
{ StyleIdx::glissandoFontFace, P_ID::FONT_FACE },
|
|
|
|
{ StyleIdx::glissandoFontSize, P_ID::FONT_SIZE },
|
|
|
|
{ StyleIdx::glissandoFontBold, P_ID::FONT_BOLD },
|
|
|
|
{ StyleIdx::glissandoFontItalic, P_ID::FONT_ITALIC },
|
|
|
|
{ StyleIdx::glissandoFontUnderline, P_ID::FONT_UNDERLINE },
|
|
|
|
};
|
|
|
|
|
|
|
|
const std::vector<StyledProperty> ottavaStyle {
|
|
|
|
{ StyleIdx::ottavaFontFace, P_ID::FONT_FACE },
|
|
|
|
{ StyleIdx::ottavaFontSize, P_ID::FONT_SIZE },
|
|
|
|
{ StyleIdx::ottavaFontBold, P_ID::FONT_BOLD },
|
|
|
|
{ StyleIdx::ottavaFontItalic, P_ID::FONT_ITALIC },
|
|
|
|
{ StyleIdx::ottavaFontUnderline, P_ID::FONT_UNDERLINE },
|
|
|
|
};
|
|
|
|
|
|
|
|
const std::vector<StyledProperty> pedalStyle {
|
|
|
|
{ StyleIdx::pedalFontFace, P_ID::FONT_FACE },
|
|
|
|
{ StyleIdx::pedalFontSize, P_ID::FONT_SIZE },
|
|
|
|
{ StyleIdx::pedalFontBold, P_ID::FONT_BOLD },
|
|
|
|
{ StyleIdx::pedalFontItalic, P_ID::FONT_ITALIC },
|
|
|
|
{ StyleIdx::pedalFontUnderline, P_ID::FONT_UNDERLINE },
|
|
|
|
};
|
|
|
|
|
|
|
|
const std::vector<StyledProperty> hairpinStyle {
|
2017-03-16 12:13:19 +01:00
|
|
|
{ StyleIdx::hairpinFontFace, P_ID::BEGIN_FONT_FACE },
|
|
|
|
{ StyleIdx::hairpinFontSize, P_ID::BEGIN_FONT_SIZE },
|
|
|
|
{ StyleIdx::hairpinFontBold, P_ID::BEGIN_FONT_BOLD },
|
|
|
|
{ StyleIdx::hairpinFontItalic, P_ID::BEGIN_FONT_ITALIC },
|
|
|
|
{ StyleIdx::hairpinFontUnderline, P_ID::BEGIN_FONT_UNDERLINE },
|
|
|
|
{ StyleIdx::hairpinTextAlign, P_ID::BEGIN_TEXT_ALIGN },
|
|
|
|
{ StyleIdx::hairpinFontFace, P_ID::CONTINUE_FONT_FACE },
|
|
|
|
{ StyleIdx::hairpinFontSize, P_ID::CONTINUE_FONT_SIZE },
|
|
|
|
{ StyleIdx::hairpinFontBold, P_ID::CONTINUE_FONT_BOLD },
|
|
|
|
{ StyleIdx::hairpinFontItalic, P_ID::CONTINUE_FONT_ITALIC },
|
|
|
|
{ StyleIdx::hairpinFontUnderline, P_ID::CONTINUE_FONT_UNDERLINE },
|
|
|
|
{ StyleIdx::hairpinTextAlign, P_ID::CONTINUE_TEXT_ALIGN },
|
|
|
|
{ StyleIdx::hairpinFontFace, P_ID::END_FONT_FACE },
|
|
|
|
{ StyleIdx::hairpinFontSize, P_ID::END_FONT_SIZE },
|
|
|
|
{ StyleIdx::hairpinFontBold, P_ID::END_FONT_BOLD },
|
|
|
|
{ StyleIdx::hairpinFontItalic, P_ID::END_FONT_ITALIC },
|
|
|
|
{ StyleIdx::hairpinFontUnderline, P_ID::END_FONT_UNDERLINE },
|
|
|
|
{ StyleIdx::hairpinTextAlign, P_ID::END_TEXT_ALIGN },
|
2017-01-16 20:51:12 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
const std::vector<StyledProperty> bendStyle {
|
|
|
|
{ StyleIdx::bendFontFace, P_ID::FONT_FACE },
|
|
|
|
{ StyleIdx::bendFontSize, P_ID::FONT_SIZE },
|
|
|
|
{ StyleIdx::bendFontBold, P_ID::FONT_BOLD },
|
|
|
|
{ StyleIdx::bendFontItalic, P_ID::FONT_ITALIC },
|
|
|
|
{ StyleIdx::bendFontUnderline, P_ID::FONT_UNDERLINE },
|
|
|
|
};
|
|
|
|
|
|
|
|
const std::vector<StyledProperty> headerStyle {
|
|
|
|
{ StyleIdx::headerFontFace, P_ID::FONT_FACE },
|
|
|
|
{ StyleIdx::headerFontSize, P_ID::FONT_SIZE },
|
|
|
|
{ StyleIdx::headerFontBold, P_ID::FONT_BOLD },
|
|
|
|
{ StyleIdx::headerFontItalic, P_ID::FONT_ITALIC },
|
|
|
|
{ StyleIdx::headerFontUnderline, P_ID::FONT_UNDERLINE },
|
|
|
|
};
|
|
|
|
|
|
|
|
const std::vector<StyledProperty> footerStyle {
|
|
|
|
{ StyleIdx::footerFontFace, P_ID::FONT_FACE },
|
|
|
|
{ StyleIdx::footerFontSize, P_ID::FONT_SIZE },
|
|
|
|
{ StyleIdx::footerFontBold, P_ID::FONT_BOLD },
|
|
|
|
{ StyleIdx::footerFontItalic, P_ID::FONT_ITALIC },
|
|
|
|
{ StyleIdx::footerFontUnderline, P_ID::FONT_UNDERLINE },
|
|
|
|
};
|
|
|
|
|
|
|
|
const std::vector<StyledProperty> instrumentChangeStyle {
|
|
|
|
{ StyleIdx::instrumentChangeFontFace, P_ID::FONT_FACE },
|
|
|
|
{ StyleIdx::instrumentChangeFontSize, P_ID::FONT_SIZE },
|
|
|
|
{ StyleIdx::instrumentChangeFontBold, P_ID::FONT_BOLD },
|
|
|
|
{ StyleIdx::instrumentChangeFontItalic, P_ID::FONT_ITALIC },
|
|
|
|
{ StyleIdx::instrumentChangeFontUnderline, P_ID::FONT_UNDERLINE },
|
|
|
|
{ StyleIdx::instrumentChangeOffset, P_ID::OFFSET },
|
|
|
|
};
|
|
|
|
|
|
|
|
const std::vector<StyledProperty> figuredBassStyle {
|
|
|
|
{ StyleIdx::figuredBassFontFace, P_ID::FONT_FACE },
|
|
|
|
{ StyleIdx::figuredBassFontSize, P_ID::FONT_SIZE },
|
|
|
|
{ StyleIdx::figuredBassFontBold, P_ID::FONT_BOLD },
|
|
|
|
{ StyleIdx::figuredBassFontItalic, P_ID::FONT_ITALIC },
|
|
|
|
{ StyleIdx::figuredBassFontUnderline, P_ID::FONT_UNDERLINE },
|
|
|
|
};
|
|
|
|
|
2017-01-18 14:16:33 +01:00
|
|
|
const std::vector<StyledProperty> user1Style {
|
|
|
|
{ StyleIdx::user1FontFace, P_ID::FONT_FACE },
|
|
|
|
{ StyleIdx::user1FontSize, P_ID::FONT_SIZE },
|
|
|
|
{ StyleIdx::user1FontBold, P_ID::FONT_BOLD },
|
|
|
|
{ StyleIdx::user1FontItalic, P_ID::FONT_ITALIC },
|
|
|
|
{ StyleIdx::user1FontUnderline, P_ID::FONT_UNDERLINE },
|
|
|
|
};
|
|
|
|
|
|
|
|
const std::vector<StyledProperty> user2Style {
|
|
|
|
{ StyleIdx::user2FontFace, P_ID::FONT_FACE },
|
|
|
|
{ StyleIdx::user2FontSize, P_ID::FONT_SIZE },
|
|
|
|
{ StyleIdx::user2FontBold, P_ID::FONT_BOLD },
|
|
|
|
{ StyleIdx::user2FontItalic, P_ID::FONT_ITALIC },
|
|
|
|
{ StyleIdx::user2FontUnderline, P_ID::FONT_UNDERLINE },
|
|
|
|
};
|
|
|
|
|
2017-01-16 20:51:12 +01:00
|
|
|
//---------------------------------------------------------
|
|
|
|
// StyledPropertyListName
|
|
|
|
//---------------------------------------------------------
|
|
|
|
|
|
|
|
struct StyledPropertyListName {
|
|
|
|
const char* name;
|
|
|
|
const std::vector<StyledProperty>* spl;
|
|
|
|
SubStyle ss;
|
|
|
|
};
|
|
|
|
|
|
|
|
//---------------------------------------------------------
|
|
|
|
// namedStyles
|
|
|
|
// must be in sync with SubStyle enumeration
|
|
|
|
//---------------------------------------------------------
|
|
|
|
|
2017-01-16 22:16:10 +01:00
|
|
|
static const std::array<StyledPropertyListName, int(SubStyle::SUBSTYLES)> namedStyles { {
|
2017-01-18 20:25:35 +01:00
|
|
|
{ QT_TRANSLATE_NOOP("TextStyle", "default"), &defaultStyle, SubStyle::DEFAULT },
|
|
|
|
{ QT_TRANSLATE_NOOP("TextStyle", "Title"), &titleStyle, SubStyle::TITLE },
|
|
|
|
{ QT_TRANSLATE_NOOP("TextStyle", "Subtitle"), &subTitleStyle, SubStyle::SUBTITLE },
|
|
|
|
{ QT_TRANSLATE_NOOP("TextStyle", "Composer"), &composerStyle, SubStyle::COMPOSER },
|
|
|
|
{ QT_TRANSLATE_NOOP("TextStyle", "Lyricist"), &lyricistStyle, SubStyle::POET },
|
|
|
|
{ QT_TRANSLATE_NOOP("TextStyle", "Lyrics Odd Lines"), &lyricsOddStyle, SubStyle::LYRIC1 },
|
|
|
|
{ QT_TRANSLATE_NOOP("TextStyle", "Lyrics Even Lines"), &lyricsEvenStyle, SubStyle::LYRIC2 },
|
|
|
|
{ QT_TRANSLATE_NOOP("TextStyle", "Fingering"), &fingeringStyle, SubStyle::FINGERING },
|
|
|
|
{ QT_TRANSLATE_NOOP("TextStyle", "LH Guitar Fingering"), &lhGuitarFingeringStyle, SubStyle::LH_GUITAR_FINGERING },
|
|
|
|
{ QT_TRANSLATE_NOOP("TextStyle", "RH Guitar Fingering"), &rhGuitarFingeringStyle, SubStyle::RH_GUITAR_FINGERING },
|
|
|
|
{ QT_TRANSLATE_NOOP("TextStyle", "String Number"), &stringNumberStyle, SubStyle::STRING_NUMBER },
|
|
|
|
{ QT_TRANSLATE_NOOP("TextStyle", "Instrument Name (Long)"), &longInstrumentStyle, SubStyle::INSTRUMENT_LONG },
|
|
|
|
{ QT_TRANSLATE_NOOP("TextStyle", "Instrument Name (Short)"), &shortInstrumentStyle, SubStyle::INSTRUMENT_SHORT },
|
|
|
|
{ QT_TRANSLATE_NOOP("TextStyle", "Instrument Name (Part)"), &partInstrumentStyle, SubStyle::INSTRUMENT_EXCERPT },
|
|
|
|
{ QT_TRANSLATE_NOOP("TextStyle", "Dynamics"), &dynamicsStyle, SubStyle::DYNAMICS },
|
|
|
|
{ QT_TRANSLATE_NOOP("TextStyle", "Expression"), &expressionStyle, SubStyle::EXPRESSION },
|
|
|
|
{ QT_TRANSLATE_NOOP("TextStyle", "Tempo"), &tempoStyle, SubStyle::TEMPO },
|
|
|
|
{ QT_TRANSLATE_NOOP("TextStyle", "Metronome"), &metronomeStyle, SubStyle::METRONOME },
|
|
|
|
{ QT_TRANSLATE_NOOP("TextStyle", "Measure Number"), &measureNumberStyle, SubStyle::MEASURE_NUMBER },
|
|
|
|
{ QT_TRANSLATE_NOOP("TextStyle", "Translator"), &translatorStyle, SubStyle::TRANSLATOR },
|
|
|
|
{ QT_TRANSLATE_NOOP("TextStyle", "Tuplet"), &tupletStyle, SubStyle::TUPLET },
|
|
|
|
{ QT_TRANSLATE_NOOP("TextStyle", "System"), &systemStyle, SubStyle::SYSTEM },
|
|
|
|
{ QT_TRANSLATE_NOOP("TextStyle", "Staff"), &staffStyle, SubStyle::STAFF },
|
|
|
|
{ QT_TRANSLATE_NOOP("TextStyle", "Chord Symbol"), &chordSymbolStyle, SubStyle::HARMONY },
|
|
|
|
{ QT_TRANSLATE_NOOP("TextStyle", "Rehearsal Mark"), &rehearsalMarkStyle, SubStyle::REHEARSAL_MARK },
|
|
|
|
{ QT_TRANSLATE_NOOP("TextStyle", "Repeat Text Left"), &repeatLeftStyle, SubStyle::REPEAT_LEFT },
|
|
|
|
{ QT_TRANSLATE_NOOP("TextStyle", "Repeat Text Right"), &repeatRightStyle, SubStyle::REPEAT_RIGHT },
|
|
|
|
{ QT_TRANSLATE_NOOP("TextStyle", "Frame"), &frameStyle, SubStyle::FRAME },
|
|
|
|
{ QT_TRANSLATE_NOOP("TextStyle", "Text Line"), &textLineStyle, SubStyle::TEXTLINE },
|
|
|
|
{ QT_TRANSLATE_NOOP("TextStyle", "Glissando"), &glissandoStyle, SubStyle::GLISSANDO },
|
|
|
|
{ QT_TRANSLATE_NOOP("TextStyle", "Ottava"), &ottavaStyle, SubStyle::OTTAVA },
|
|
|
|
{ QT_TRANSLATE_NOOP("TextStyle", "Pedal"), &pedalStyle, SubStyle::PEDAL },
|
|
|
|
{ QT_TRANSLATE_NOOP("TextStyle", "Hairpin"), &hairpinStyle, SubStyle::HAIRPIN },
|
|
|
|
{ QT_TRANSLATE_NOOP("TextStyle", "Bend"), &bendStyle, SubStyle::BEND },
|
|
|
|
{ QT_TRANSLATE_NOOP("TextStyle", "Header"), &headerStyle, SubStyle::HEADER },
|
|
|
|
{ QT_TRANSLATE_NOOP("TextStyle", "Footer"), &footerStyle, SubStyle::FOOTER },
|
|
|
|
{ QT_TRANSLATE_NOOP("TextStyle", "Instrument Change"), &instrumentChangeStyle, SubStyle::INSTRUMENT_CHANGE },
|
|
|
|
{ QT_TRANSLATE_NOOP("TextStyle", "Figured Bass"), &figuredBassStyle, SubStyle::FIGURED_BASS },
|
|
|
|
{ QT_TRANSLATE_NOOP("TextStyle", "User-1"), &user1Style, SubStyle::USER1 },
|
|
|
|
{ QT_TRANSLATE_NOOP("TextStyle", "User-2"), &user2Style, SubStyle::USER2 },
|
2017-01-16 22:16:10 +01:00
|
|
|
} };
|
2017-01-16 20:51:12 +01:00
|
|
|
|
|
|
|
//---------------------------------------------------------
|
|
|
|
// subStyle
|
|
|
|
//---------------------------------------------------------
|
|
|
|
|
|
|
|
const std::vector<StyledProperty>& subStyle(const char* name)
|
|
|
|
{
|
|
|
|
for (const StyledPropertyListName& s : namedStyles) {
|
|
|
|
if (strcmp(s.name, name) == 0)
|
|
|
|
return *s.spl;
|
|
|
|
}
|
|
|
|
qDebug("substyle <%s> not known", name);
|
|
|
|
return *namedStyles[0].spl;
|
|
|
|
}
|
|
|
|
|
|
|
|
const std::vector<StyledProperty>& subStyle(SubStyle idx)
|
|
|
|
{
|
|
|
|
return *namedStyles[int(idx)].spl;
|
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------
|
|
|
|
// subStyleFromName
|
|
|
|
//---------------------------------------------------------
|
|
|
|
|
|
|
|
SubStyle subStyleFromName(const QString& name)
|
|
|
|
{
|
|
|
|
for (const StyledPropertyListName& s : namedStyles) {
|
|
|
|
if (s.name == name)
|
|
|
|
return SubStyle(s.ss);
|
|
|
|
}
|
|
|
|
qDebug("substyle <%s> not known", qPrintable(name));
|
|
|
|
return SubStyle::DEFAULT;
|
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------
|
|
|
|
// subStyleName
|
|
|
|
//---------------------------------------------------------
|
|
|
|
|
|
|
|
const char* subStyleName(SubStyle idx)
|
|
|
|
{
|
|
|
|
return namedStyles[int(idx)].name;
|
|
|
|
}
|
2013-07-23 16:43:56 +02:00
|
|
|
|
2017-01-18 20:25:35 +01:00
|
|
|
//---------------------------------------------------------
|
|
|
|
// subStyleUserName
|
|
|
|
//---------------------------------------------------------
|
|
|
|
|
|
|
|
QString subStyleUserName(SubStyle idx)
|
|
|
|
{
|
|
|
|
return qApp->translate("TextStyle", subStyleName(idx));
|
|
|
|
}
|
|
|
|
|
2015-01-22 16:27:16 +01:00
|
|
|
//---------------------------------------------------------
|
|
|
|
// valueType
|
|
|
|
//---------------------------------------------------------
|
|
|
|
|
2016-03-02 13:20:19 +01:00
|
|
|
const char* MStyle::valueType(const StyleIdx i)
|
|
|
|
{
|
|
|
|
return styleTypes[int(i)].valueType();
|
|
|
|
}
|
|
|
|
|
2017-02-27 11:46:58 +01:00
|
|
|
//---------------------------------------------------------
|
|
|
|
// value
|
|
|
|
//---------------------------------------------------------
|
|
|
|
|
|
|
|
QVariant MStyle::value(StyleIdx idx) const
|
|
|
|
{
|
|
|
|
return _values[int(idx)];
|
|
|
|
}
|
|
|
|
|
2016-03-02 13:20:19 +01:00
|
|
|
//---------------------------------------------------------
|
|
|
|
// valueName
|
|
|
|
//---------------------------------------------------------
|
|
|
|
|
|
|
|
const char* MStyle::valueName(const StyleIdx i)
|
2015-01-22 16:27:16 +01:00
|
|
|
{
|
2016-03-02 13:20:19 +01:00
|
|
|
return styleTypes[int(i)].name();
|
2015-01-22 16:27:16 +01:00
|
|
|
}
|
|
|
|
|
2016-09-19 22:57:36 +02:00
|
|
|
//---------------------------------------------------------
|
|
|
|
// styleIdx
|
|
|
|
//---------------------------------------------------------
|
|
|
|
|
|
|
|
StyleIdx MStyle::styleIdx(const QString &name)
|
|
|
|
{
|
|
|
|
for (StyleType st : styleTypes) {
|
|
|
|
if (st.name() == name)
|
|
|
|
return st.styleIdx();
|
|
|
|
}
|
|
|
|
return StyleIdx::NOSTYLE;
|
|
|
|
}
|
|
|
|
|
2012-05-26 14:26:10 +02:00
|
|
|
//---------------------------------------------------------
|
|
|
|
// Style
|
|
|
|
//---------------------------------------------------------
|
|
|
|
|
2016-03-02 13:20:19 +01:00
|
|
|
MStyle::MStyle()
|
2012-05-26 14:26:10 +02:00
|
|
|
{
|
|
|
|
_customChordList = false;
|
2016-03-02 13:20:19 +01:00
|
|
|
for (const StyleType& t : styleTypes)
|
|
|
|
_values[t.idx()] = t.defaultValue();
|
2012-05-26 14:26:10 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
//---------------------------------------------------------
|
2016-03-02 13:20:19 +01:00
|
|
|
// precomputeValues
|
2012-05-26 14:26:10 +02:00
|
|
|
//---------------------------------------------------------
|
|
|
|
|
2016-03-02 13:20:19 +01:00
|
|
|
void MStyle::precomputeValues()
|
2012-05-26 14:26:10 +02:00
|
|
|
{
|
2016-03-02 13:20:19 +01:00
|
|
|
qreal _spatium = value(StyleIdx::spatium).toDouble();
|
|
|
|
for (const StyleType& t : styleTypes) {
|
|
|
|
if (!strcmp(t.valueType(), "Ms::Spatium"))
|
|
|
|
_precomputedValues[t.idx()] = _values[t.idx()].value<Spatium>().val() * _spatium;
|
|
|
|
}
|
2012-05-26 14:26:10 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------
|
2016-03-02 13:20:19 +01:00
|
|
|
// isDefault
|
|
|
|
// caution: custom types need to register comparison operator
|
|
|
|
// to make this work
|
2012-05-26 14:26:10 +02:00
|
|
|
//---------------------------------------------------------
|
|
|
|
|
2016-03-02 13:20:19 +01:00
|
|
|
bool MStyle::isDefault(StyleIdx idx) const
|
2012-05-26 14:26:10 +02:00
|
|
|
{
|
2017-01-25 15:54:46 +01:00
|
|
|
return value(idx) == MScore::baseStyle().value(idx);
|
2012-05-26 14:26:10 +02:00
|
|
|
}
|
|
|
|
|
2016-03-02 13:20:19 +01:00
|
|
|
//---------------------------------------------------------
|
|
|
|
// chordDescription
|
|
|
|
//---------------------------------------------------------
|
2012-05-26 14:26:10 +02:00
|
|
|
|
2016-03-02 13:20:19 +01:00
|
|
|
const ChordDescription* MStyle::chordDescription(int id) const
|
2012-05-26 14:26:10 +02:00
|
|
|
{
|
2016-03-02 13:20:19 +01:00
|
|
|
if (!_chordList.contains(id))
|
|
|
|
return 0;
|
|
|
|
return &*_chordList.find(id);
|
2012-05-26 14:26:10 +02:00
|
|
|
}
|
2012-09-10 09:57:35 +02:00
|
|
|
|
|
|
|
//---------------------------------------------------------
|
2016-03-02 13:20:19 +01:00
|
|
|
// setChordList
|
2012-09-10 09:57:35 +02:00
|
|
|
//---------------------------------------------------------
|
|
|
|
|
2016-03-02 13:20:19 +01:00
|
|
|
void MStyle::setChordList(ChordList* cl, bool custom)
|
2012-05-26 14:26:10 +02:00
|
|
|
{
|
2016-03-02 13:20:19 +01:00
|
|
|
_chordList = *cl;
|
|
|
|
_customChordList = custom;
|
2012-05-26 14:26:10 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------
|
2016-03-02 13:20:19 +01:00
|
|
|
// set
|
2012-05-26 14:26:10 +02:00
|
|
|
//---------------------------------------------------------
|
|
|
|
|
2016-03-02 13:20:19 +01:00
|
|
|
void MStyle::set(const StyleIdx t, const QVariant& val)
|
2012-05-26 14:26:10 +02:00
|
|
|
{
|
2016-03-02 13:20:19 +01:00
|
|
|
const int idx = int(t);
|
|
|
|
_values[idx] = val;
|
2016-05-26 11:32:03 +02:00
|
|
|
if (t == StyleIdx::spatium)
|
|
|
|
precomputeValues();
|
|
|
|
else {
|
2016-09-28 10:01:20 +02:00
|
|
|
if (!strcmp(styleTypes[idx].valueType(), "Ms::Spatium")) {
|
|
|
|
qreal _spatium = value(StyleIdx::spatium).toDouble();
|
2016-05-26 11:32:03 +02:00
|
|
|
_precomputedValues[idx] = _values[idx].value<Spatium>().val() * _spatium;
|
2016-09-28 10:01:20 +02:00
|
|
|
}
|
2016-05-26 11:32:03 +02:00
|
|
|
}
|
2012-05-26 14:26:10 +02:00
|
|
|
}
|
|
|
|
|
2016-09-19 22:57:36 +02:00
|
|
|
//---------------------------------------------------------
|
2017-01-16 20:51:12 +01:00
|
|
|
// readProperties
|
2016-09-19 22:57:36 +02:00
|
|
|
//---------------------------------------------------------
|
|
|
|
|
2017-01-16 20:51:12 +01:00
|
|
|
bool MStyle::readProperties(XmlReader& e)
|
2016-09-19 22:57:36 +02:00
|
|
|
{
|
2017-01-16 20:51:12 +01:00
|
|
|
const QStringRef& tag(e.name());
|
|
|
|
QString val(e.readElementText());
|
|
|
|
|
2016-09-19 22:57:36 +02:00
|
|
|
for (const StyleType& t : styleTypes) {
|
|
|
|
StyleIdx idx = t.styleIdx();
|
|
|
|
if (t.name() == tag) {
|
|
|
|
const char* type = t.valueType();
|
|
|
|
if (!strcmp("Ms::Spatium", type))
|
|
|
|
set(idx, Spatium(val.toDouble()));
|
|
|
|
else if (!strcmp("double", type))
|
|
|
|
set(idx, QVariant(val.toDouble()));
|
|
|
|
else if (!strcmp("bool", type))
|
|
|
|
set(idx, QVariant(bool(val.toInt())));
|
|
|
|
else if (!strcmp("int", type))
|
|
|
|
set(idx, QVariant(val.toInt()));
|
|
|
|
else if (!strcmp("Ms::Direction", type))
|
|
|
|
set(idx, QVariant::fromValue(Direction(val.toInt())));
|
|
|
|
else if (!strcmp("QString", type))
|
|
|
|
set(idx, QVariant(val));
|
2017-01-25 15:54:46 +01:00
|
|
|
else if (!strcmp("Ms::Align", type)) {
|
|
|
|
QStringList sl = val.split(',');
|
|
|
|
if (sl.size() != 2) {
|
|
|
|
qDebug("bad align text <%s>", qPrintable(val));
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
Align align = Align::LEFT;
|
|
|
|
if (sl[0] == "center")
|
|
|
|
align = align | Align::HCENTER;
|
|
|
|
else if (sl[0] == "right")
|
|
|
|
align = align | Align::RIGHT;
|
|
|
|
else if (sl[0] == "left")
|
|
|
|
;
|
|
|
|
else {
|
|
|
|
qDebug("bad align text <%s>", qPrintable(sl[0]));
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
if (sl[1] == "center")
|
|
|
|
align = align | Align::VCENTER;
|
|
|
|
else if (sl[1] == "bottom")
|
|
|
|
align = align | Align::BOTTOM;
|
|
|
|
else if (sl[1] == "baseline")
|
|
|
|
align = align | Align::BASELINE;
|
|
|
|
else if (sl[1] == "top")
|
|
|
|
;
|
|
|
|
else {
|
|
|
|
qDebug("bad align text <%s>", qPrintable(sl[1]));
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
set(idx, QVariant::fromValue(align));
|
|
|
|
}
|
2017-03-15 10:42:17 +01:00
|
|
|
else if (!strcmp("QPointF", type)) {
|
|
|
|
qreal x = e.doubleAttribute("x", 0.0);
|
|
|
|
qreal y = e.doubleAttribute("y", 0.0);
|
|
|
|
set(idx, QPointF(x, y));
|
|
|
|
}
|
2017-03-15 13:35:27 +01:00
|
|
|
else if (!strcmp("QSizeF", type)) {
|
|
|
|
qreal x = e.doubleAttribute("w", 0.0);
|
|
|
|
qreal y = e.doubleAttribute("h", 0.0);
|
|
|
|
set(idx, QPointF(x, y));
|
|
|
|
}
|
|
|
|
else if (!strcmp("QColor", type)) {
|
|
|
|
QColor c;
|
|
|
|
c.setRed(e.intAttribute("r"));
|
|
|
|
c.setGreen(e.intAttribute("g"));
|
|
|
|
c.setBlue(e.intAttribute("b"));
|
|
|
|
c.setAlpha(e.intAttribute("a", 255));
|
|
|
|
set(idx, c);
|
|
|
|
}
|
2017-01-16 20:51:12 +01:00
|
|
|
else {
|
2017-01-25 15:54:46 +01:00
|
|
|
qFatal("unhandled type %s", type);
|
2017-01-16 20:51:12 +01:00
|
|
|
}
|
|
|
|
return true;
|
2016-09-19 22:57:36 +02:00
|
|
|
}
|
|
|
|
}
|
2017-01-16 20:51:12 +01:00
|
|
|
return false;
|
2016-09-19 22:57:36 +02:00
|
|
|
}
|
|
|
|
|
2012-05-26 14:26:10 +02:00
|
|
|
//---------------------------------------------------------
|
2016-03-02 13:20:19 +01:00
|
|
|
// load
|
2012-05-26 14:26:10 +02:00
|
|
|
//---------------------------------------------------------
|
|
|
|
|
2016-03-02 13:20:19 +01:00
|
|
|
bool MStyle::load(QFile* qf)
|
2012-05-26 14:26:10 +02:00
|
|
|
{
|
2016-11-19 10:31:14 +01:00
|
|
|
XmlReader e(0, qf);
|
2016-03-02 13:20:19 +01:00
|
|
|
while (e.readNextStartElement()) {
|
|
|
|
if (e.name() == "museScore") {
|
|
|
|
QString version = e.attribute("version");
|
|
|
|
QStringList sl = version.split('.');
|
|
|
|
int mscVersion = sl[0].toInt() * 100 + sl[1].toInt();
|
|
|
|
if (mscVersion != MSCVERSION)
|
|
|
|
return false;
|
|
|
|
while (e.readNextStartElement()) {
|
|
|
|
if (e.name() == "Style")
|
|
|
|
load(e);
|
|
|
|
else
|
|
|
|
e.unknown();
|
|
|
|
}
|
|
|
|
}
|
2012-05-26 14:26:10 +02:00
|
|
|
}
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2017-03-21 16:21:36 +01:00
|
|
|
extern void readPageFormat(MStyle* style, XmlReader& e);
|
|
|
|
|
2016-03-02 13:20:19 +01:00
|
|
|
void MStyle::load(XmlReader& e)
|
2012-05-26 14:26:10 +02:00
|
|
|
{
|
2014-05-26 15:31:36 +02:00
|
|
|
QString oldChordDescriptionFile = value(StyleIdx::chordDescriptionFile).toString();
|
2013-06-11 20:26:16 +02:00
|
|
|
bool chordListTag = false;
|
2013-01-11 18:10:18 +01:00
|
|
|
while (e.readNextStartElement()) {
|
2017-01-16 20:51:12 +01:00
|
|
|
const QStringRef& tag(e.name());
|
2012-05-26 14:26:10 +02:00
|
|
|
|
|
|
|
if (tag == "TextStyle") {
|
2017-01-16 20:51:12 +01:00
|
|
|
e.skipCurrentElement();
|
|
|
|
// TextStyle s;
|
|
|
|
//s.read(e);
|
|
|
|
// setTextStyle(s);
|
2012-05-26 14:26:10 +02:00
|
|
|
}
|
|
|
|
else if (tag == "Spatium")
|
2016-03-02 13:20:19 +01:00
|
|
|
set(StyleIdx::spatium, e.readDouble() * DPMM);
|
2017-03-21 16:21:36 +01:00
|
|
|
else if (tag == "page-layout") { // obsolete
|
|
|
|
readPageFormat(this, e); // from read206.cpp
|
|
|
|
}
|
2012-05-26 14:26:10 +02:00
|
|
|
else if (tag == "displayInConcertPitch")
|
2014-05-26 15:31:36 +02:00
|
|
|
set(StyleIdx::concertPitch, QVariant(bool(e.readInt())));
|
2012-05-26 14:26:10 +02:00
|
|
|
else if (tag == "ChordList") {
|
2013-06-24 11:03:48 +02:00
|
|
|
_chordList.clear();
|
|
|
|
_chordList.read(e);
|
2012-05-26 14:26:10 +02:00
|
|
|
_customChordList = true;
|
2013-06-11 20:26:16 +02:00
|
|
|
chordListTag = true;
|
2012-05-26 14:26:10 +02:00
|
|
|
}
|
2016-09-28 10:01:20 +02:00
|
|
|
else
|
2017-01-16 20:51:12 +01:00
|
|
|
readProperties(e);
|
2012-05-26 14:26:10 +02:00
|
|
|
}
|
2013-06-10 07:03:57 +02:00
|
|
|
|
2013-06-11 20:26:16 +02:00
|
|
|
// if we just specified a new chord description file
|
|
|
|
// and didn't encounter a ChordList tag
|
|
|
|
// then load the chord description file
|
2016-03-02 13:20:19 +01:00
|
|
|
|
2014-05-26 15:31:36 +02:00
|
|
|
QString newChordDescriptionFile = value(StyleIdx::chordDescriptionFile).toString();
|
2013-06-11 20:26:16 +02:00
|
|
|
if (newChordDescriptionFile != oldChordDescriptionFile && !chordListTag) {
|
2014-05-26 15:31:36 +02:00
|
|
|
if (!newChordDescriptionFile.startsWith("chords_") && value(StyleIdx::chordStyle).toString() == "std") {
|
2013-06-29 01:13:33 +02:00
|
|
|
// should not normally happen,
|
|
|
|
// but treat as "old" (114) score just in case
|
2014-05-26 15:31:36 +02:00
|
|
|
set(StyleIdx::chordStyle, QVariant(QString("custom")));
|
|
|
|
set(StyleIdx::chordsXmlFile, QVariant(true));
|
2013-06-29 01:13:33 +02:00
|
|
|
qDebug("StyleData::load: custom chord description file %s with chordStyle == std", qPrintable(newChordDescriptionFile));
|
2013-06-10 23:36:35 +02:00
|
|
|
}
|
2014-05-26 15:31:36 +02:00
|
|
|
if (value(StyleIdx::chordStyle).toString() == "custom")
|
2013-06-11 20:26:16 +02:00
|
|
|
_customChordList = true;
|
|
|
|
else
|
|
|
|
_customChordList = false;
|
2013-06-30 23:34:41 +02:00
|
|
|
_chordList.unload();
|
2013-06-26 17:19:51 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
// make sure we have a chordlist
|
2013-06-30 23:34:41 +02:00
|
|
|
if (!_chordList.loaded() && !chordListTag) {
|
2014-05-26 15:31:36 +02:00
|
|
|
if (value(StyleIdx::chordsXmlFile).toBool())
|
2013-06-24 11:03:48 +02:00
|
|
|
_chordList.read("chords.xml");
|
|
|
|
_chordList.read(newChordDescriptionFile);
|
2013-06-10 07:03:57 +02:00
|
|
|
}
|
2012-05-26 14:26:10 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------
|
|
|
|
// save
|
|
|
|
//---------------------------------------------------------
|
|
|
|
|
2016-11-19 11:51:21 +01:00
|
|
|
void MStyle::save(XmlWriter& xml, bool optimize)
|
2012-05-26 14:26:10 +02:00
|
|
|
{
|
|
|
|
xml.stag("Style");
|
|
|
|
|
2016-03-02 13:20:19 +01:00
|
|
|
for (const StyleType& st : styleTypes) {
|
|
|
|
StyleIdx idx = st.styleIdx();
|
2016-03-08 09:46:33 +01:00
|
|
|
if (idx == StyleIdx::spatium) // special handling for spatium
|
|
|
|
continue;
|
2012-05-26 14:26:10 +02:00
|
|
|
if (optimize && isDefault(idx))
|
|
|
|
continue;
|
2016-03-02 13:20:19 +01:00
|
|
|
const char* type = st.valueType();
|
|
|
|
if (!strcmp("Ms::Spatium", type))
|
|
|
|
xml.tag(st.name(), value(idx).value<Spatium>().val());
|
|
|
|
else if (!strcmp("Ms::Direction", type))
|
|
|
|
xml.tag(st.name(), value(idx).toInt());
|
|
|
|
else
|
2017-02-09 11:57:10 +01:00
|
|
|
xml.tag(st.name(), value(idx));
|
2012-05-26 14:26:10 +02:00
|
|
|
}
|
2016-02-06 22:03:43 +01:00
|
|
|
if (_customChordList && !_chordList.empty()) {
|
2012-05-26 14:26:10 +02:00
|
|
|
xml.stag("ChordList");
|
2013-06-24 11:03:48 +02:00
|
|
|
_chordList.write(xml);
|
2012-05-26 14:26:10 +02:00
|
|
|
xml.etag();
|
|
|
|
}
|
2016-03-02 13:20:19 +01:00
|
|
|
xml.tag("Spatium", value(StyleIdx::spatium).toDouble() / DPMM);
|
2012-05-26 14:26:10 +02:00
|
|
|
xml.etag();
|
|
|
|
}
|
|
|
|
|
2017-01-16 20:51:12 +01:00
|
|
|
#ifndef NDEBUG
|
|
|
|
//---------------------------------------------------------
|
|
|
|
// checkStyles
|
|
|
|
//---------------------------------------------------------
|
|
|
|
|
|
|
|
void checkStyles()
|
|
|
|
{
|
|
|
|
int idx = 0;
|
|
|
|
for (const StyleType& t : styleTypes) {
|
|
|
|
Q_ASSERT(t.idx() == idx);
|
|
|
|
++idx;
|
|
|
|
}
|
|
|
|
idx = 0;
|
|
|
|
for (auto a : namedStyles) {
|
|
|
|
Q_ASSERT(int(a.ss) == idx);
|
|
|
|
++idx;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2013-05-13 18:49:17 +02:00
|
|
|
}
|