void EditStyle::setValues() { staffUpperBorder->setValue(lstyle.value(ST_staffUpperBorder).toDouble()); staffLowerBorder->setValue(lstyle.value(ST_staffLowerBorder).toDouble()); staffDistance->setValue(lstyle.value(ST_staffDistance).toDouble()); akkoladeDistance->setValue(lstyle.value(ST_akkoladeDistance).toDouble()); minSystemDistance->setValue(lstyle.value(ST_minSystemDistance).toDouble()); maxSystemDistance->setValue(lstyle.value(ST_maxSystemDistance).toDouble()); lyricsDistance->setValue(lstyle.value(ST_lyricsDistance).toDouble()); lyricsMinBottomDistance->setValue(lstyle.value(ST_lyricsMinBottomDistance).toDouble()); lyricsLineHeight->setValue(lstyle.value(ST_lyricsLineHeight).toDouble() * 100.0); systemFrameDistance->setValue(lstyle.value(ST_systemFrameDistance).toDouble()); frameSystemDistance->setValue(lstyle.value(ST_frameSystemDistance).toDouble()); minMeasureWidth_2->setValue(lstyle.value(ST_minMeasureWidth).toDouble()); barWidth->setValue(lstyle.value(ST_barWidth).toDouble()); endBarWidth->setValue(lstyle.value(ST_endBarWidth).toDouble()); endBarDistance->setValue(lstyle.value(ST_endBarDistance).toDouble()); doubleBarWidth->setValue(lstyle.value(ST_doubleBarWidth).toDouble()); doubleBarDistance->setValue(lstyle.value(ST_doubleBarDistance).toDouble()); showRepeatBarTips->setChecked(lstyle.value(ST_repeatBarTips).toBool()); showStartBarlineSingle->setChecked(lstyle.value(ST_startBarlineSingle).toBool()); showStartBarlineMultiple->setChecked(lstyle.value(ST_startBarlineMultiple).toBool()); measureSpacing->setValue(lstyle.value(ST_measureSpacing).toDouble()); minNoteDistance->setValue(lstyle.value(ST_minNoteDistance).toDouble()); barNoteDistance->setValue(lstyle.value(ST_barNoteDistance).toDouble()); barAccidentalDistance->setValue(lstyle.value(ST_barAccidentalDistance).toDouble()); multiMeasureRestMargin->setValue(lstyle.value(ST_multiMeasureRestMargin).toDouble()); noteBarDistance->setValue(lstyle.value(ST_noteBarDistance).toDouble()); showMeasureNumber->setChecked(lstyle.value(ST_showMeasureNumber).toBool()); showFirstMeasureNumber->setChecked(lstyle.value(ST_showMeasureNumberOne).toBool()); intervalMeasureNumber->setValue(lstyle.value(ST_measureNumberInterval).toInt()); showIntervalMeasureNumber->setChecked(!lstyle.value(ST_measureNumberSystem).toBool()); showAllStaffsMeasureNumber->setChecked(lstyle.value(ST_measureNumberAllStaffs).toBool()); showEverySystemMeasureNumber->setChecked(lstyle.value(ST_measureNumberSystem).toBool()); clefLeftMargin->setValue(lstyle.value(ST_clefLeftMargin).toDouble()); keysigLeftMargin->setValue(lstyle.value(ST_keysigLeftMargin).toDouble()); timesigLeftMargin->setValue(lstyle.value(ST_timesigLeftMargin).toDouble()); clefKeyRightMargin->setValue(lstyle.value(ST_clefKeyRightMargin).toDouble()); clefBarlineDistance->setValue(lstyle.value(ST_clefBarlineDistance).toDouble()); staffLineWidth->setValue(lstyle.value(ST_staffLineWidth).toDouble()); beamWidth->setValue(lstyle.value(ST_beamWidth).toDouble()); beamDistance->setValue(lstyle.value(ST_beamDistance).toDouble()); beamMinLen->setValue(lstyle.value(ST_beamMinLen).toDouble()); beamNoSlope->setChecked(lstyle.value(ST_beamNoSlope).toBool()); graceNoteSize->setValue(lstyle.value(ST_graceNoteMag).toDouble() * 100.0); smallStaffSize->setValue(lstyle.value(ST_smallStaffMag).toDouble() * 100.0); smallNoteSize->setValue(lstyle.value(ST_smallNoteMag).toDouble() * 100.0); smallClefSize->setValue(lstyle.value(ST_smallClefMag).toDouble() * 100.0); lastSystemFillThreshold->setValue(lstyle.value(ST_lastSystemFillLimit).toDouble() * 100.0); hairpinY->setValue(lstyle.value(ST_hairpinY).toDouble()); hairpinLineWidth->setValue(lstyle.value(ST_hairpinLineWidth).toDouble()); hairpinHeight->setValue(lstyle.value(ST_hairpinHeight).toDouble()); hairpinContinueHeight->setValue(lstyle.value(ST_hairpinContHeight).toDouble()); genClef->setChecked(lstyle.value(ST_genClef).toBool()); genKeysig->setChecked(lstyle.value(ST_genKeysig).toBool()); genTimesig->setChecked(lstyle.value(ST_genTimesig).toBool()); genCourtesyTimesig->setChecked(lstyle.value(ST_genCourtesyTimesig).toBool()); genCourtesyKeysig->setChecked(lstyle.value(ST_genCourtesyKeysig).toBool()); genCourtesyClef->setChecked(lstyle.value(ST_genCourtesyClef).toBool()); QString s(lstyle.value(ST_chordDescriptionFile).toString()); chordDescriptionFile->setText(s); chordsXmlFile->setChecked(lstyle.value(ST_chordsXmlFile).toBool()); QString cstyle(lstyle.value(ST_chordStyle).toString()); if (cstyle == "std") { chordsStandard->setChecked(true); chordDescriptionGroup->setEnabled(false); } else if (cstyle == "jazz") { chordsJazz->setChecked(true); chordDescriptionGroup->setEnabled(false); } else { chordsCustom->setChecked(true); chordDescriptionGroup->setEnabled(true); } useStandardNoteNames->setChecked(lstyle.value(ST_useStandardNoteNames).toBool()); useGermanNoteNames->setChecked(lstyle.value(ST_useGermanNoteNames).toBool()); useSolfeggioNoteNames->setChecked(lstyle.value(ST_useSolfeggioNoteNames).toBool()); lowerCaseMinorChords->setChecked(lstyle.value(ST_lowerCaseMinorChords).toBool()); concertPitch->setChecked(lstyle.value(ST_concertPitch).toBool()); multiMeasureRests->setChecked(lstyle.value(ST_createMultiMeasureRests).toBool()); minEmptyMeasures->setValue(lstyle.value(ST_minEmptyMeasures).toInt()); minMeasureWidth->setValue(lstyle.value(ST_minMMRestWidth).toDouble()); hideEmptyStaves->setChecked(lstyle.value(ST_hideEmptyStaves).toBool()); dontHideStavesInFirstSystem->setChecked(lstyle.value(ST_dontHideStavesInFirstSystem).toBool()); dontHideStavesInFirstSystem->setEnabled(hideEmptyStaves->isChecked()); accidentalNoteDistance->setValue(lstyle.value(ST_accidentalNoteDistance).toDouble()); accidentalDistance->setValue(lstyle.value(ST_accidentalDistance).toDouble()); dotMag->setValue(lstyle.value(ST_dotMag).toDouble() * 100.0); noteDotDistance->setValue(lstyle.value(ST_dotNoteDistance).toDouble()); dotDotDistance->setValue(lstyle.value(ST_dotDotDistance).toDouble()); stemWidth->setValue(lstyle.value(ST_stemWidth).toDouble()); ledgerLineWidth->setValue(lstyle.value(ST_ledgerLineWidth).toDouble()); ledgerLineLength->setValue(lstyle.value(ST_ledgerLineLength).toDouble()); bracketWidth->setValue(lstyle.value(ST_bracketWidth).toDouble()); bracketDistance->setValue(lstyle.value(ST_bracketDistance).toDouble()); akkoladeWidth->setValue(lstyle.value(ST_akkoladeWidth).toDouble()); akkoladeBarDistance->setValue(lstyle.value(ST_akkoladeBarDistance).toDouble()); propertyDistanceHead->setValue(lstyle.value(ST_propertyDistanceHead).toDouble()); propertyDistanceStem->setValue(lstyle.value(ST_propertyDistanceStem).toDouble()); propertyDistance->setValue(lstyle.value(ST_propertyDistance).toDouble()); articulationMag->setValue(lstyle.value(ST_articulationMag).toDouble() * 100.0); shortenStem->setChecked(lstyle.value(ST_shortenStem).toBool()); shortStemProgression->setValue(lstyle.value(ST_shortStemProgression).toDouble()); shortestStem->setValue(lstyle.value(ST_shortestStem).toDouble()); arpeggioNoteDistance->setValue(lstyle.value(ST_ArpeggioNoteDistance).toDouble()); arpeggioLineWidth->setValue(lstyle.value(ST_ArpeggioLineWidth).toDouble()); arpeggioHookLen->setValue(lstyle.value(ST_ArpeggioHookLen).toDouble()); // figured bass for(int i = 0; i < comboFBFont->count(); i++) if(comboFBFont->itemText(i) == lstyle.value(ST_figuredBassFontFamily).toString()) { comboFBFont->setCurrentIndex(i); break; } doubleSpinFBSize->setValue(lstyle.value(ST_figuredBassFontSize).toDouble()); doubleSpinFBVertPos->setValue(lstyle.value(ST_figuredBassYOffset).toDouble()); spinFBLineHeight->setValue(lstyle.value(ST_figuredBassLineHeight).toDouble() * 100.0); radioFBTop->setChecked(lstyle.value(ST_figuredBassAlignment).toInt() == 0); radioFBBottom->setChecked(lstyle.value(ST_figuredBassAlignment).toInt() == 1); radioFBModern->setChecked(lstyle.value(ST_figuredBassStyle).toInt() == 0); radioFBHistoric->setChecked(lstyle.value(ST_figuredBassStyle).toInt() == 1); for (int i = 0; i < ARTICULATIONS; ++i) { QComboBox* cb = static_cast<QComboBox*>(articulationTable->cellWidget(i, 1)); if (cb == 0) continue; int st = lstyle.articulationAnchor(i); int idx = 0; if (st == A_TOP_STAFF) idx = 0; else if (st == A_BOTTOM_STAFF) idx = 1; else if (st == A_CHORD) idx = 2; cb->setCurrentIndex(idx); } fixNumberMeasures->setValue(lstyle.value(ST_FixMeasureNumbers).toInt()); fixMeasureWidth->setChecked(lstyle.value(ST_FixMeasureWidth).toBool()); slurEndLineWidth->setValue(lstyle.value(ST_SlurEndWidth).toDouble()); slurMidLineWidth->setValue(lstyle.value(ST_SlurMidWidth).toDouble()); slurDottedLineWidth->setValue(lstyle.value(ST_SlurDottedWidth).toDouble()); musicalSymbolFont->setCurrentIndex(lstyle.value(ST_MusicalSymbolFont).toString() == "Emmentaler" ? 0 : 1); showHeader->setChecked(lstyle.value(ST_showHeader).toBool()); headerStyled->setChecked(lstyle.value(ST_headerStyled).toBool()); showHeaderFirstPage->setChecked(lstyle.value(ST_headerFirstPage).toBool()); headerOddEven->setChecked(lstyle.value(ST_headerOddEven).toBool()); if (headerStyled->isChecked()) { evenHeaderL->setPlainText(lstyle.value(ST_evenHeaderL).toString()); evenHeaderC->setPlainText(lstyle.value(ST_evenHeaderC).toString()); evenHeaderR->setPlainText(lstyle.value(ST_evenHeaderR).toString()); oddHeaderL->setPlainText(lstyle.value(ST_oddHeaderL).toString()); oddHeaderC->setPlainText(lstyle.value(ST_oddHeaderC).toString()); oddHeaderR->setPlainText(lstyle.value(ST_oddHeaderR).toString()); } else { evenHeaderL->setHtml(lstyle.value(ST_evenHeaderL).toString()); evenHeaderC->setHtml(lstyle.value(ST_evenHeaderC).toString()); evenHeaderR->setHtml(lstyle.value(ST_evenHeaderR).toString()); oddHeaderL->setHtml(lstyle.value(ST_oddHeaderL).toString()); oddHeaderC->setHtml(lstyle.value(ST_oddHeaderC).toString()); oddHeaderR->setHtml(lstyle.value(ST_oddHeaderR).toString()); } showFooter->setChecked(lstyle.value(ST_showFooter).toBool()); footerStyled->setChecked(lstyle.value(ST_footerStyled).toBool()); showFooterFirstPage->setChecked(lstyle.value(ST_footerFirstPage).toBool()); footerOddEven->setChecked(lstyle.value(ST_footerOddEven).toBool()); if (footerStyled->isChecked()) { evenFooterL->setPlainText(lstyle.value(ST_evenFooterL).toString()); evenFooterC->setPlainText(lstyle.value(ST_evenFooterC).toString()); evenFooterR->setPlainText(lstyle.value(ST_evenFooterR).toString()); oddFooterL->setPlainText(lstyle.value(ST_oddFooterL).toString()); oddFooterC->setPlainText(lstyle.value(ST_oddFooterC).toString()); oddFooterR->setPlainText(lstyle.value(ST_oddFooterR).toString()); } else { evenFooterL->setHtml(lstyle.value(ST_evenFooterL).toString()); evenFooterC->setHtml(lstyle.value(ST_evenFooterC).toString()); evenFooterR->setHtml(lstyle.value(ST_evenFooterR).toString()); oddFooterL->setHtml(lstyle.value(ST_oddFooterL).toString()); oddFooterC->setHtml(lstyle.value(ST_oddFooterC).toString()); oddFooterR->setHtml(lstyle.value(ST_oddFooterR).toString()); } voltaY->setValue(lstyle.value(ST_voltaY).toDouble()); voltaHook->setValue(lstyle.value(ST_voltaHook).toDouble()); voltaLineWidth->setValue(lstyle.value(ST_voltaLineWidth).toDouble()); voltaLineStyle->setCurrentIndex(lstyle.value(ST_voltaLineStyle).toInt()-1); ottavaY->setValue(lstyle.value(ST_ottavaY).toDouble()); ottavaHook->setValue(lstyle.value(ST_ottavaHook).toDouble()); ottavaLineWidth->setValue(lstyle.value(ST_ottavaLineWidth).toDouble()); ottavaLineStyle->setCurrentIndex(lstyle.value(ST_ottavaLineStyle).toInt()-1); ottavaNumbersOnly->setChecked(lstyle.value(ST_ottavaNumbersOnly).toBool()); trillY->setValue(lstyle.value(ST_trillY).toDouble()); harmonyY->setValue(lstyle.value(ST_harmonyY).toDouble()); harmonyFretDist->setValue(lstyle.value(ST_harmonyFretDist).toDouble()); minHarmonyDistance->setValue(lstyle.value(ST_minHarmonyDistance).toDouble()); pedalY->setValue(lstyle.value(ST_pedalY).toDouble()); pedalLineWidth->setValue(lstyle.value(ST_pedalLineWidth).toDouble()); pedalLineStyle->setCurrentIndex(lstyle.value(ST_pedalLineStyle).toInt()-1); clefTab1->setChecked(lstyle.value(ST_tabClef).toInt() == CLEF_TAB); clefTab2->setChecked(lstyle.value(ST_tabClef).toInt() == CLEF_TAB2); crossMeasureValues->setChecked(lstyle.value(ST_crossMeasureValues).toBool()); // bool ??: radioKeySigNatNone->setChecked (lstyle.value(ST_keySigNaturals).toBool() == NAT_NONE); radioKeySigNatBefore->setChecked(lstyle.value(ST_keySigNaturals).toBool() == NAT_BEFORE); radioKeySigNatAfter->setChecked (lstyle.value(ST_keySigNaturals).toBool() == NAT_AFTER); }
void EditStyle::setValues() { staffUpperBorder->setValue(lstyle.value(StyleIdx::staffUpperBorder).toDouble()); staffLowerBorder->setValue(lstyle.value(StyleIdx::staffLowerBorder).toDouble()); staffDistance->setValue(lstyle.value(StyleIdx::staffDistance).toDouble()); akkoladeDistance->setValue(lstyle.value(StyleIdx::akkoladeDistance).toDouble()); minSystemDistance->setValue(lstyle.value(StyleIdx::minSystemDistance).toDouble()); maxSystemDistance->setValue(lstyle.value(StyleIdx::maxSystemDistance).toDouble()); lyricsDistance->setValue(lstyle.value(StyleIdx::lyricsDistance).toDouble()); lyricsMinBottomDistance->setValue(lstyle.value(StyleIdx::lyricsMinBottomDistance).toDouble()); lyricsLineHeight->setValue(lstyle.value(StyleIdx::lyricsLineHeight).toDouble() * 100.0); systemFrameDistance->setValue(lstyle.value(StyleIdx::systemFrameDistance).toDouble()); frameSystemDistance->setValue(lstyle.value(StyleIdx::frameSystemDistance).toDouble()); minMeasureWidth_2->setValue(lstyle.value(StyleIdx::minMeasureWidth).toDouble()); barWidth->setValue(lstyle.value(StyleIdx::barWidth).toDouble()); endBarWidth->setValue(lstyle.value(StyleIdx::endBarWidth).toDouble()); endBarDistance->setValue(lstyle.value(StyleIdx::endBarDistance).toDouble()); doubleBarWidth->setValue(lstyle.value(StyleIdx::doubleBarWidth).toDouble()); doubleBarDistance->setValue(lstyle.value(StyleIdx::doubleBarDistance).toDouble()); showRepeatBarTips->setChecked(lstyle.value(StyleIdx::repeatBarTips).toBool()); showStartBarlineSingle->setChecked(lstyle.value(StyleIdx::startBarlineSingle).toBool()); showStartBarlineMultiple->setChecked(lstyle.value(StyleIdx::startBarlineMultiple).toBool()); measureSpacing->setValue(lstyle.value(StyleIdx::measureSpacing).toDouble()); minNoteDistance->setValue(lstyle.value(StyleIdx::minNoteDistance).toDouble()); barNoteDistance->setValue(lstyle.value(StyleIdx::barNoteDistance).toDouble()); barAccidentalDistance->setValue(lstyle.value(StyleIdx::barAccidentalDistance).toDouble()); multiMeasureRestMargin->setValue(lstyle.value(StyleIdx::multiMeasureRestMargin).toDouble()); noteBarDistance->setValue(lstyle.value(StyleIdx::noteBarDistance).toDouble()); showMeasureNumber->setChecked(lstyle.value(StyleIdx::showMeasureNumber).toBool()); showFirstMeasureNumber->setChecked(lstyle.value(StyleIdx::showMeasureNumberOne).toBool()); intervalMeasureNumber->setValue(lstyle.value(StyleIdx::measureNumberInterval).toInt()); showIntervalMeasureNumber->setChecked(!lstyle.value(StyleIdx::measureNumberSystem).toBool()); showAllStaffsMeasureNumber->setChecked(lstyle.value(StyleIdx::measureNumberAllStaffs).toBool()); showEverySystemMeasureNumber->setChecked(lstyle.value(StyleIdx::measureNumberSystem).toBool()); clefLeftMargin->setValue(lstyle.value(StyleIdx::clefLeftMargin).toDouble()); keysigLeftMargin->setValue(lstyle.value(StyleIdx::keysigLeftMargin).toDouble()); timesigLeftMargin->setValue(lstyle.value(StyleIdx::timesigLeftMargin).toDouble()); clefKeyRightMargin->setValue(lstyle.value(StyleIdx::clefKeyRightMargin).toDouble()); clefBarlineDistance->setValue(lstyle.value(StyleIdx::clefBarlineDistance).toDouble()); staffLineWidth->setValue(lstyle.value(StyleIdx::staffLineWidth).toDouble()); beamWidth->setValue(lstyle.value(StyleIdx::beamWidth).toDouble()); beamDistance->setValue(lstyle.value(StyleIdx::beamDistance).toDouble() * 100.0); beamMinLen->setValue(lstyle.value(StyleIdx::beamMinLen).toDouble()); beamNoSlope->setChecked(lstyle.value(StyleIdx::beamNoSlope).toBool()); graceNoteSize->setValue(lstyle.value(StyleIdx::graceNoteMag).toDouble() * 100.0); smallStaffSize->setValue(lstyle.value(StyleIdx::smallStaffMag).toDouble() * 100.0); smallNoteSize->setValue(lstyle.value(StyleIdx::smallNoteMag).toDouble() * 100.0); smallClefSize->setValue(lstyle.value(StyleIdx::smallClefMag).toDouble() * 100.0); lastSystemFillThreshold->setValue(lstyle.value(StyleIdx::lastSystemFillLimit).toDouble() * 100.0); hairpinY->setValue(lstyle.value(StyleIdx::hairpinY).toDouble()); hairpinLineWidth->setValue(lstyle.value(StyleIdx::hairpinLineWidth).toDouble()); hairpinHeight->setValue(lstyle.value(StyleIdx::hairpinHeight).toDouble()); hairpinContinueHeight->setValue(lstyle.value(StyleIdx::hairpinContHeight).toDouble()); genClef->setChecked(lstyle.value(StyleIdx::genClef).toBool()); genKeysig->setChecked(lstyle.value(StyleIdx::genKeysig).toBool()); genTimesig->setChecked(lstyle.value(StyleIdx::genTimesig).toBool()); genCourtesyTimesig->setChecked(lstyle.value(StyleIdx::genCourtesyTimesig).toBool()); genCourtesyKeysig->setChecked(lstyle.value(StyleIdx::genCourtesyKeysig).toBool()); genCourtesyClef->setChecked(lstyle.value(StyleIdx::genCourtesyClef).toBool()); swingBox->setValue(lstyle.value(StyleIdx::swingRatio).toInt()); QString unit(lstyle.value(StyleIdx::swingUnit).toString()); if (unit == TDuration(TDuration::DurationType::V_EIGHT).name()) { swingEighth->setChecked(true); swingBox->setEnabled(true); } else if (unit == TDuration(TDuration::DurationType::V_16TH).name()) { swingSixteenth->setChecked(true); swingBox->setEnabled(true); } else if (unit == TDuration(TDuration::DurationType::V_ZERO).name()) { SwingOff->setChecked(true); swingBox->setEnabled(false); } QString s(lstyle.value(StyleIdx::chordDescriptionFile).toString()); chordDescriptionFile->setText(s); chordsXmlFile->setChecked(lstyle.value(StyleIdx::chordsXmlFile).toBool()); QString cstyle(lstyle.value(StyleIdx::chordStyle).toString()); if (cstyle == "std") { chordsStandard->setChecked(true); chordDescriptionGroup->setEnabled(false); } else if (cstyle == "jazz") { chordsJazz->setChecked(true); chordDescriptionGroup->setEnabled(false); } else { chordsCustom->setChecked(true); chordDescriptionGroup->setEnabled(true); } useStandardNoteNames->setChecked(lstyle.value(StyleIdx::useStandardNoteNames).toBool()); useGermanNoteNames->setChecked(lstyle.value(StyleIdx::useGermanNoteNames).toBool()); useSolfeggioNoteNames->setChecked(lstyle.value(StyleIdx::useSolfeggioNoteNames).toBool()); lowerCaseMinorChords->setChecked(lstyle.value(StyleIdx::lowerCaseMinorChords).toBool()); concertPitch->setChecked(lstyle.value(StyleIdx::concertPitch).toBool()); multiMeasureRests->setChecked(lstyle.value(StyleIdx::createMultiMeasureRests).toBool()); minEmptyMeasures->setValue(lstyle.value(StyleIdx::minEmptyMeasures).toInt()); minMeasureWidth->setValue(lstyle.value(StyleIdx::minMMRestWidth).toDouble()); hideEmptyStaves->setChecked(lstyle.value(StyleIdx::hideEmptyStaves).toBool()); dontHideStavesInFirstSystem->setChecked(lstyle.value(StyleIdx::dontHideStavesInFirstSystem).toBool()); dontHideStavesInFirstSystem->setEnabled(hideEmptyStaves->isChecked()); hideInstrumentNameIfOneInstrument->setChecked(lstyle.value(StyleIdx::hideInstrumentNameIfOneInstrument).toBool()); accidentalNoteDistance->setValue(lstyle.value(StyleIdx::accidentalNoteDistance).toDouble()); accidentalDistance->setValue(lstyle.value(StyleIdx::accidentalDistance).toDouble()); dotMag->setValue(lstyle.value(StyleIdx::dotMag).toDouble() * 100.0); noteDotDistance->setValue(lstyle.value(StyleIdx::dotNoteDistance).toDouble()); dotDotDistance->setValue(lstyle.value(StyleIdx::dotDotDistance).toDouble()); stemWidth->setValue(lstyle.value(StyleIdx::stemWidth).toDouble()); ledgerLineWidth->setValue(lstyle.value(StyleIdx::ledgerLineWidth).toDouble()); ledgerLineLength->setValue(lstyle.value(StyleIdx::ledgerLineLength).toDouble()); bracketWidth->setValue(lstyle.value(StyleIdx::bracketWidth).toDouble()); bracketDistance->setValue(lstyle.value(StyleIdx::bracketDistance).toDouble()); akkoladeWidth->setValue(lstyle.value(StyleIdx::akkoladeWidth).toDouble()); akkoladeBarDistance->setValue(lstyle.value(StyleIdx::akkoladeBarDistance).toDouble()); propertyDistanceHead->setValue(lstyle.value(StyleIdx::propertyDistanceHead).toDouble()); propertyDistanceStem->setValue(lstyle.value(StyleIdx::propertyDistanceStem).toDouble()); propertyDistance->setValue(lstyle.value(StyleIdx::propertyDistance).toDouble()); articulationMag->setValue(lstyle.value(StyleIdx::articulationMag).toDouble() * 100.0); shortenStem->setChecked(lstyle.value(StyleIdx::shortenStem).toBool()); shortStemProgression->setValue(lstyle.value(StyleIdx::shortStemProgression).toDouble()); shortestStem->setValue(lstyle.value(StyleIdx::shortestStem).toDouble()); arpeggioNoteDistance->setValue(lstyle.value(StyleIdx::ArpeggioNoteDistance).toDouble()); arpeggioLineWidth->setValue(lstyle.value(StyleIdx::ArpeggioLineWidth).toDouble()); arpeggioHookLen->setValue(lstyle.value(StyleIdx::ArpeggioHookLen).toDouble()); // figured bass for(int i = 0; i < comboFBFont->count(); i++) if(comboFBFont->itemText(i) == lstyle.value(StyleIdx::figuredBassFontFamily).toString()) { comboFBFont->setCurrentIndex(i); break; } doubleSpinFBSize->setValue(lstyle.value(StyleIdx::figuredBassFontSize).toDouble()); doubleSpinFBVertPos->setValue(lstyle.value(StyleIdx::figuredBassYOffset).toDouble()); spinFBLineHeight->setValue(lstyle.value(StyleIdx::figuredBassLineHeight).toDouble() * 100.0); radioFBTop->setChecked(lstyle.value(StyleIdx::figuredBassAlignment).toInt() == 0); radioFBBottom->setChecked(lstyle.value(StyleIdx::figuredBassAlignment).toInt() == 1); radioFBModern->setChecked(lstyle.value(StyleIdx::figuredBassStyle).toInt() == 0); radioFBHistoric->setChecked(lstyle.value(StyleIdx::figuredBassStyle).toInt() == 1); for (int i = 0; i < int(ArticulationType::ARTICULATIONS); ++i) { QComboBox* cb = static_cast<QComboBox*>(articulationTable->cellWidget(i, 1)); if (cb == 0) continue; ArticulationAnchor st = lstyle.articulationAnchor(i); int idx = 0; if (st == ArticulationAnchor::TOP_STAFF) idx = 0; else if (st == ArticulationAnchor::BOTTOM_STAFF) idx = 1; else if (st == ArticulationAnchor::CHORD) idx = 2; cb->setCurrentIndex(idx); } fixNumberMeasures->setValue(lstyle.value(StyleIdx::FixMeasureNumbers).toInt()); fixMeasureWidth->setChecked(lstyle.value(StyleIdx::FixMeasureWidth).toBool()); slurEndLineWidth->setValue(lstyle.value(StyleIdx::SlurEndWidth).toDouble()); slurMidLineWidth->setValue(lstyle.value(StyleIdx::SlurMidWidth).toDouble()); slurDottedLineWidth->setValue(lstyle.value(StyleIdx::SlurDottedWidth).toDouble()); minTieLength->setValue(lstyle.value(StyleIdx::MinTieLength).toDouble()); QString mfont(lstyle.value(StyleIdx::MusicalSymbolFont).toString()); int idx = 0; for (auto i : ScoreFont::scoreFonts()) { if (i.name().toLower() == mfont.toLower()) { musicalSymbolFont->setCurrentIndex(idx); break; } ++idx; } musicalTextFont->clear(); musicalTextFont->addItem("Emmentaler Text", "MScore Text"); musicalTextFont->addItem("Bravura Text", "Bravura Text"); QString tfont(lstyle.value(StyleIdx::MusicalTextFont).toString()); idx = tfont == "Bravura Text" ? 1 : 0; musicalTextFont->setCurrentIndex(idx); showHeader->setChecked(lstyle.value(StyleIdx::showHeader).toBool()); showHeaderFirstPage->setChecked(lstyle.value(StyleIdx::headerFirstPage).toBool()); headerOddEven->setChecked(lstyle.value(StyleIdx::headerOddEven).toBool()); toggleHeaderOddEven(lstyle.value(StyleIdx::headerOddEven).toBool()); setHeaderText(StyleIdx::evenHeaderL, evenHeaderL); setHeaderText(StyleIdx::evenHeaderC, evenHeaderC); setHeaderText(StyleIdx::evenHeaderR, evenHeaderR); setHeaderText(StyleIdx::oddHeaderL, oddHeaderL); setHeaderText(StyleIdx::oddHeaderC, oddHeaderC); setHeaderText(StyleIdx::oddHeaderR, oddHeaderR); showFooter->setChecked(lstyle.value(StyleIdx::showFooter).toBool()); showFooterFirstPage->setChecked(lstyle.value(StyleIdx::footerFirstPage).toBool()); footerOddEven->setChecked(lstyle.value(StyleIdx::footerOddEven).toBool()); toggleFooterOddEven(lstyle.value(StyleIdx::footerOddEven).toBool()); setFooterText(StyleIdx::evenFooterL, evenFooterL); setFooterText(StyleIdx::evenFooterC, evenFooterC); setFooterText(StyleIdx::evenFooterR, evenFooterR); setFooterText(StyleIdx::oddFooterL, oddFooterL); setFooterText(StyleIdx::oddFooterC, oddFooterC); setFooterText(StyleIdx::oddFooterR, oddFooterR); voltaY->setValue(lstyle.value(StyleIdx::voltaY).toDouble()); voltaHook->setValue(lstyle.value(StyleIdx::voltaHook).toDouble()); voltaLineWidth->setValue(lstyle.value(StyleIdx::voltaLineWidth).toDouble()); voltaLineStyle->setCurrentIndex(lstyle.value(StyleIdx::voltaLineStyle).toInt()-1); ottavaY->setValue(lstyle.value(StyleIdx::ottavaY).toDouble()); ottavaHook->setValue(lstyle.value(StyleIdx::ottavaHook).toDouble()); ottavaLineWidth->setValue(lstyle.value(StyleIdx::ottavaLineWidth).toDouble()); ottavaLineStyle->setCurrentIndex(lstyle.value(StyleIdx::ottavaLineStyle).toInt()-1); ottavaNumbersOnly->setChecked(lstyle.value(StyleIdx::ottavaNumbersOnly).toBool()); trillY->setValue(lstyle.value(StyleIdx::trillY).toDouble()); harmonyY->setValue(lstyle.value(StyleIdx::harmonyY).toDouble()); harmonyFretDist->setValue(lstyle.value(StyleIdx::harmonyFretDist).toDouble()); minHarmonyDistance->setValue(lstyle.value(StyleIdx::minHarmonyDistance).toDouble()); maxHarmonyBarDistance->setValue(lstyle.value(StyleIdx::maxHarmonyBarDistance).toDouble()); capoPosition->setValue(lstyle.value(StyleIdx::capoPosition).toInt()); fretNumMag->setValue(lstyle.value(StyleIdx::fretNumMag).toDouble()*100.0); radioFretNumLeft->setChecked(lstyle.value(StyleIdx::fretNumPos).toInt() == 0); radioFretNumRight->setChecked(lstyle.value(StyleIdx::fretNumPos).toInt() == 1); fretY->setValue(lstyle.value(StyleIdx::fretY).toDouble()); pedalY->setValue(lstyle.value(StyleIdx::pedalY).toDouble()); pedalLineWidth->setValue(lstyle.value(StyleIdx::pedalLineWidth).toDouble()); pedalLineStyle->setCurrentIndex(lstyle.value(StyleIdx::pedalLineStyle).toInt()-1); clefTab1->setChecked(lstyle.value(StyleIdx::tabClef).toInt() == int(ClefType::TAB)); clefTab2->setChecked(lstyle.value(StyleIdx::tabClef).toInt() == int(ClefType::TAB2)); crossMeasureValues->setChecked(lstyle.value(StyleIdx::crossMeasureValues).toBool()); radioKeySigNatNone->setChecked (lstyle.value(StyleIdx::keySigNaturals).toInt() == int(KeySigNatural::NONE)); radioKeySigNatBefore->setChecked(lstyle.value(StyleIdx::keySigNaturals).toInt() == int(KeySigNatural::BEFORE)); radioKeySigNatAfter->setChecked (lstyle.value(StyleIdx::keySigNaturals).toInt() == int(KeySigNatural::AFTER)); tupletMaxSlope->setValue(lstyle.value(StyleIdx::tupletMaxSlope).toDouble()); tupletOutOfStaff->setChecked(lstyle.value(StyleIdx::tupletOufOfStaff).toBool()); tupletVHeadDistance->setValue(lstyle.value(StyleIdx::tupletVHeadDistance).toDouble()); tupletVStemDistance->setValue(lstyle.value(StyleIdx::tupletVStemDistance).toDouble()); tupletStemLeftDistance->setValue(lstyle.value(StyleIdx::tupletStemLeftDistance).toDouble()); tupletStemRightDistance->setValue(lstyle.value(StyleIdx::tupletStemRightDistance).toDouble()); tupletNoteLeftDistance->setValue(lstyle.value(StyleIdx::tupletNoteLeftDistance).toDouble()); tupletNoteRightDistance->setValue(lstyle.value(StyleIdx::tupletNoteRightDistance).toDouble()); }