Beispiel #1
0
void TextProp::setTextStyle(const TextStyle& s)
      {
      fontBold->setChecked(s.bold());
      fontItalic->setChecked(s.italic());
      fontUnderline->setChecked(s.underline());
      fontSize->setValue(s.size());
      color->setColor(s.foregroundColor());

      systemFlag->setChecked(s.systemFlag());
      int a = s.align();
      if (a & ALIGN_HCENTER)
            alignHCenter->setChecked(true);
      else if (a & ALIGN_RIGHT)
            alignRight->setChecked(true);
      else
            alignLeft->setChecked(true);

      if (a & ALIGN_VCENTER)
            alignVCenter->setChecked(true);
      else if (a & ALIGN_BOTTOM)
            alignBottom->setChecked(true);
      else if (a & ALIGN_BASELINE)
            alignBaseline->setChecked(true);
      else
            alignTop->setChecked(true);

      QString str;
      if (s.offsetType() == OFFSET_ABS) {
            xOffset->setValue(s.offset().x() * INCH);
            yOffset->setValue(s.offset().y() * INCH);
            mmUnit->setChecked(true);
            curUnit = 0;
            }
      else if (s.offsetType() == OFFSET_SPATIUM) {
            xOffset->setValue(s.offset().x());
            yOffset->setValue(s.offset().y());
            spatiumUnit->setChecked(true);
            curUnit = 1;
            }
      rxOffset->setValue(s.reloff().x());
      ryOffset->setValue(s.reloff().y());

      QFont f(s.family());
      f.setPixelSize(lrint(s.size()));
      f.setItalic(s.italic());
      f.setUnderline(s.underline());
      f.setBold(s.bold());
      fontSelect->setCurrentFont(f);
      sizeIsSpatiumDependent->setChecked(s.sizeIsSpatiumDependent());

      frameColor->setColor(s.frameColor());
      bgColor->setColor(s.backgroundColor());
      frameWidth->setValue(s.frameWidth());
      frame->setChecked(s.hasFrame());
      paddingWidth->setValue(s.paddingWidth());
      frameRound->setValue(s.frameRound());
      circleButton->setChecked(s.circle());
      boxButton->setChecked(!s.circle());
      }
Beispiel #2
0
TextStyle TextProp::textStyle() const
      {
      TextStyle s;
      if (curUnit == 0)
            s.setOffsetType(OFFSET_ABS);
      else if (curUnit == 1)
            s.setOffsetType(OFFSET_SPATIUM);
      s.setBold(fontBold->isChecked());
      s.setItalic(fontItalic->isChecked());
      s.setUnderline(fontUnderline->isChecked());
      s.setSize(fontSize->value());
      QFont f = fontSelect->currentFont();
      s.setFamily(f.family());
      s.setXoff(xOffset->value() / ((s.offsetType() == OFFSET_ABS) ? INCH : 1.0));
      s.setYoff(yOffset->value() / ((s.offsetType() == OFFSET_ABS) ? INCH : 1.0));
      s.setRxoff(rxOffset->value());
      s.setRyoff(ryOffset->value());
      s.setFrameColor(frameColor->color());
      s.setBackgroundColor(bgColor->color());
      s.setFrameWidth(frameWidth->value());
      s.setPaddingWidth(paddingWidth->value());
      s.setCircle(circleButton->isChecked());
      s.setFrameRound(frameRound->value());
      s.setHasFrame(frame->isChecked());
      s.setSystemFlag(systemFlag->isChecked());
      s.setForegroundColor(color->color());
      s.setSizeIsSpatiumDependent(sizeIsSpatiumDependent->isChecked());

      Align a = 0;
      if (alignHCenter->isChecked())
            a |= ALIGN_HCENTER;
      else if (alignRight->isChecked())
            a |= ALIGN_RIGHT;

      if (alignVCenter->isChecked())
            a |= ALIGN_VCENTER;
      else if (alignBottom->isChecked())
            a |= ALIGN_BOTTOM;
      else if (alignBaseline->isChecked())
            a |= ALIGN_BASELINE;
      s.setAlign(a);
      return s;
      }
Beispiel #3
0
void EditStyle::getValues()
      {
      lstyle.set(ST_staffUpperBorder,        Spatium(staffUpperBorder->value()));
      lstyle.set(ST_staffLowerBorder,        Spatium(staffLowerBorder->value()));
      lstyle.set(ST_staffDistance,           Spatium(staffDistance->value()));
      lstyle.set(ST_akkoladeDistance,        Spatium(akkoladeDistance->value()));
      lstyle.set(ST_minSystemDistance,       Spatium(minSystemDistance->value()));
      lstyle.set(ST_maxSystemDistance,       Spatium(maxSystemDistance->value()));
      lstyle.set(ST_lyricsDistance,          Spatium(lyricsDistance->value()));
      lstyle.set(ST_lyricsMinBottomDistance, Spatium(lyricsMinBottomDistance->value()));
      lstyle.set(ST_lyricsLineHeight,        Spatium(lyricsLineHeight->value() * .01));
      lstyle.set(ST_systemFrameDistance,     Spatium(systemFrameDistance->value()));
      lstyle.set(ST_frameSystemDistance,     Spatium(frameSystemDistance->value()));
      lstyle.set(ST_minMeasureWidth,         Spatium(minMeasureWidth_2->value()));

      lstyle.set(ST_barWidth,                Spatium(barWidth->value()));
      lstyle.set(ST_endBarWidth,             Spatium(endBarWidth->value()));
      lstyle.set(ST_endBarDistance,          Spatium(endBarDistance->value()));
      lstyle.set(ST_doubleBarWidth,          Spatium(doubleBarWidth->value()));
      lstyle.set(ST_doubleBarDistance,       Spatium(doubleBarDistance->value()));

      lstyle.set(ST_repeatBarTips,           showRepeatBarTips->isChecked());
      lstyle.set(ST_startBarlineSingle,      showStartBarlineSingle->isChecked());
      lstyle.set(ST_startBarlineMultiple,    showStartBarlineMultiple->isChecked());

      lstyle.set(ST_measureSpacing,          measureSpacing->value());
      lstyle.set(ST_minNoteDistance,         Spatium(minNoteDistance->value()));
      lstyle.set(ST_barNoteDistance,         Spatium(barNoteDistance->value()));
      lstyle.set(ST_barAccidentalDistance,   Spatium(barAccidentalDistance->value()));
      lstyle.set(ST_multiMeasureRestMargin,  Spatium(multiMeasureRestMargin->value()));
      lstyle.set(ST_noteBarDistance,         Spatium(noteBarDistance->value()));
      lstyle.set(ST_showMeasureNumber,       showMeasureNumber->isChecked());
      lstyle.set(ST_showMeasureNumberOne,    showFirstMeasureNumber->isChecked());
      lstyle.set(ST_measureNumberInterval,   intervalMeasureNumber->value());
      lstyle.set(ST_measureNumberSystem,     showEverySystemMeasureNumber->isChecked());
      lstyle.set(ST_measureNumberAllStaffs,  showAllStaffsMeasureNumber->isChecked());
      lstyle.set(ST_clefLeftMargin,          Spatium(clefLeftMargin->value()));
      lstyle.set(ST_keysigLeftMargin,        Spatium(keysigLeftMargin->value()));
      lstyle.set(ST_timesigLeftMargin,       Spatium(timesigLeftMargin->value()));
      lstyle.set(ST_clefKeyRightMargin,      Spatium(clefKeyRightMargin->value()));
      lstyle.set(ST_clefBarlineDistance,     Spatium(clefBarlineDistance->value()));
      lstyle.set(ST_staffLineWidth,          Spatium(staffLineWidth->value()));
      lstyle.set(ST_beamWidth,               Spatium(beamWidth->value()));
      lstyle.set(ST_beamDistance,            beamDistance->value());
      lstyle.set(ST_beamMinLen,              Spatium(beamMinLen->value()));
      lstyle.set(ST_beamNoSlope,             beamNoSlope->isChecked());

      lstyle.set(ST_graceNoteMag,            graceNoteSize->value() * 0.01);
      lstyle.set(ST_smallStaffMag,           smallStaffSize->value() * 0.01);
      lstyle.set(ST_smallNoteMag,            smallNoteSize->value() * 0.01);
      lstyle.set(ST_smallClefMag,            smallClefSize->value() * 0.01);
      lstyle.set(ST_lastSystemFillLimit,     lastSystemFillThreshold->value() * 0.01);
      lstyle.set(ST_hairpinY,                Spatium(hairpinY->value()));
      lstyle.set(ST_hairpinLineWidth,        Spatium(hairpinLineWidth->value()));
      lstyle.set(ST_hairpinHeight,           Spatium(hairpinHeight->value()));
      lstyle.set(ST_hairpinContHeight,       Spatium(hairpinContinueHeight->value()));
      lstyle.set(ST_genClef,                 genClef->isChecked());
      lstyle.set(ST_genKeysig,               genKeysig->isChecked());
      lstyle.set(ST_genTimesig,              genTimesig->isChecked());
      lstyle.set(ST_genCourtesyTimesig,      genCourtesyTimesig->isChecked());
      lstyle.set(ST_genCourtesyKeysig,       genCourtesyKeysig->isChecked());
      lstyle.set(ST_genCourtesyClef,         genCourtesyClef->isChecked());

      bool customChords = false;
      if (chordsStandard->isChecked())
            lstyle.set(ST_chordStyle, QString("std"));
      else if (chordsJazz->isChecked())
            lstyle.set(ST_chordStyle, QString("jazz"));
      else {
            lstyle.set(ST_chordStyle, QString("custom"));
            customChords = true;
            }
      lstyle.set(ST_chordsXmlFile, chordsXmlFile->isChecked());
      if (lstyle.value(ST_chordDescriptionFile).toString() != chordDescriptionFile->text()) {
            ChordList* cl = new ChordList();
            if (lstyle.value(ST_chordsXmlFile).toBool())
                  cl->read("chords.xml");
            cl->read(chordDescriptionFile->text());
            lstyle.setChordList(cl, customChords);
            lstyle.set(ST_chordDescriptionFile, chordDescriptionFile->text());
            }

      lstyle.set(ST_useStandardNoteNames,    useStandardNoteNames->isChecked());
      lstyle.set(ST_useGermanNoteNames,      useGermanNoteNames->isChecked());
      lstyle.set(ST_useSolfeggioNoteNames,   useSolfeggioNoteNames->isChecked());
      lstyle.set(ST_lowerCaseMinorChords,    lowerCaseMinorChords->isChecked());

      lstyle.set(ST_concertPitch,            concertPitch->isChecked());
      lstyle.set(ST_createMultiMeasureRests, multiMeasureRests->isChecked());
      lstyle.set(ST_minEmptyMeasures,        minEmptyMeasures->value());
      lstyle.set(ST_minMMRestWidth,          Spatium(minMeasureWidth->value()));
      lstyle.set(ST_hideEmptyStaves,         hideEmptyStaves->isChecked());
      lstyle.set(ST_dontHideStavesInFirstSystem, dontHideStavesInFirstSystem->isChecked());

      lstyle.set(ST_accidentalNoteDistance,  Spatium(accidentalNoteDistance->value()));
      lstyle.set(ST_accidentalDistance,      Spatium(accidentalDistance->value()));
      lstyle.set(ST_dotMag,                  dotMag->value() * 0.01);
      lstyle.set(ST_dotNoteDistance,         Spatium(noteDotDistance->value()));
      lstyle.set(ST_dotDotDistance,          Spatium(dotDotDistance->value()));
      lstyle.set(ST_stemWidth,               Spatium(stemWidth->value()));
      lstyle.set(ST_ledgerLineWidth,         Spatium(ledgerLineWidth->value()));
      lstyle.set(ST_ledgerLineLength,        Spatium(ledgerLineLength->value()));

      lstyle.set(ST_bracketWidth,            Spatium(bracketWidth->value()));
      lstyle.set(ST_bracketDistance,         Spatium(bracketDistance->value()));
      lstyle.set(ST_akkoladeWidth,           Spatium(akkoladeWidth->value()));
      lstyle.set(ST_akkoladeBarDistance,     Spatium(akkoladeBarDistance->value()));

      lstyle.set(ST_propertyDistanceHead,    Spatium(propertyDistanceHead->value()));
      lstyle.set(ST_propertyDistanceStem,    Spatium(propertyDistanceStem->value()));
      lstyle.set(ST_propertyDistance,        Spatium(propertyDistance->value()));
      lstyle.set(ST_articulationMag,         articulationMag->value() * 0.01);

      lstyle.set(ST_shortenStem,             shortenStem->isChecked());
      lstyle.set(ST_shortStemProgression,    Spatium(shortStemProgression->value()));
      lstyle.set(ST_shortestStem,            Spatium(shortestStem->value()));

      lstyle.set(ST_ArpeggioNoteDistance,    Spatium(arpeggioNoteDistance->value()));
      lstyle.set(ST_ArpeggioLineWidth,       Spatium(arpeggioLineWidth->value()));
      lstyle.set(ST_ArpeggioHookLen,         Spatium(arpeggioHookLen->value()));

      lstyle.set(ST_FixMeasureNumbers,       fixNumberMeasures->value());
      lstyle.set(ST_FixMeasureWidth,         fixMeasureWidth->isChecked());

      lstyle.set(ST_SlurEndWidth,            Spatium(slurEndLineWidth->value()));
      lstyle.set(ST_SlurMidWidth,            Spatium(slurMidLineWidth->value()));
      lstyle.set(ST_SlurDottedWidth,         Spatium(slurDottedLineWidth->value()));

      lstyle.set(ST_MusicalSymbolFont,       musicalSymbolFont->currentText());

      lstyle.set(ST_showHeader,      showHeader->isChecked());
      lstyle.set(ST_headerStyled,    headerStyled->isChecked());
      lstyle.set(ST_headerFirstPage, showHeaderFirstPage->isChecked());
      lstyle.set(ST_headerOddEven,   headerOddEven->isChecked());
      if (headerStyled->isChecked()) {
            lstyle.set(ST_evenHeaderL, evenHeaderL->toPlainText());
            lstyle.set(ST_evenHeaderC, evenHeaderC->toPlainText());
            lstyle.set(ST_evenHeaderR, evenHeaderR->toPlainText());
            lstyle.set(ST_oddHeaderL,  oddHeaderL->toPlainText());
            lstyle.set(ST_oddHeaderC,  oddHeaderC->toPlainText());
            lstyle.set(ST_oddHeaderR,  oddHeaderR->toPlainText());
            }
      else {
            lstyle.set(ST_evenHeaderL, evenHeaderL->toHtml());
            lstyle.set(ST_evenHeaderC, evenHeaderC->toHtml());
            lstyle.set(ST_evenHeaderR, evenHeaderR->toHtml());
            lstyle.set(ST_oddHeaderL,  oddHeaderL->toHtml());
            lstyle.set(ST_oddHeaderC,  oddHeaderC->toHtml());
            lstyle.set(ST_oddHeaderR,  oddHeaderR->toHtml());
            }

      lstyle.set(ST_showFooter,      showFooter->isChecked());
      lstyle.set(ST_footerStyled,    footerStyled->isChecked());
      lstyle.set(ST_footerFirstPage, showFooterFirstPage->isChecked());
      lstyle.set(ST_footerOddEven,   footerOddEven->isChecked());
      if (footerStyled->isChecked()) {
            lstyle.set(ST_evenFooterL, evenFooterL->toPlainText());
            lstyle.set(ST_evenFooterC, evenFooterC->toPlainText());
            lstyle.set(ST_evenFooterR, evenFooterR->toPlainText());
            lstyle.set(ST_oddFooterL,  oddFooterL->toPlainText());
            lstyle.set(ST_oddFooterC,  oddFooterC->toPlainText());
            lstyle.set(ST_oddFooterR,  oddFooterR->toPlainText());
            }
      else {
            lstyle.set(ST_evenFooterL, evenFooterL->toHtml());
            lstyle.set(ST_evenFooterC, evenFooterC->toHtml());
            lstyle.set(ST_evenFooterR, evenFooterR->toHtml());
            lstyle.set(ST_oddFooterL,  oddFooterL->toHtml());
            lstyle.set(ST_oddFooterC,  oddFooterC->toHtml());
            lstyle.set(ST_oddFooterR,  oddFooterR->toHtml());
            }

      // figured bass
      int         idx = comboFBFont->currentIndex();
      QString     family;
      if(FiguredBass::fontData(idx, &family, 0, 0, 0))
            lstyle.set(ST_figuredBassFontFamily, family);
      qreal size = doubleSpinFBSize->value();
      qreal vPos = doubleSpinFBVertPos->value();
      lstyle.set(ST_figuredBassFontSize,   size);
      lstyle.set(ST_figuredBassYOffset,    vPos);
      lstyle.set(ST_figuredBassLineHeight, ((double)spinFBLineHeight->value()) / 100.0);
      lstyle.set(ST_figuredBassAlignment,  radioFBTop->isChecked() ? 0 : 1);
      lstyle.set(ST_figuredBassStyle,      radioFBModern->isChecked() ? 0 : 1);
      // copy to text style data relevant to it (LineHeight and Style are not in text style);
      // offsetType is necessarily OFFSET_SPATIUM
      const TextStyle fbOld = lstyle.textStyle(TEXT_STYLE_FIGURED_BASS);
      if (family != fbOld.family() || size != fbOld.size()
         || vPos != fbOld.offset().y() || fbOld.offsetType() != OFFSET_SPATIUM)
            {
            TextStyle fbNew(fbOld);
            fbNew.setFamily(family);
            fbNew.setSize(size);
            fbNew.setYoff(vPos);
            fbNew.setOffsetType(OFFSET_SPATIUM);
            lstyle.setTextStyle(fbNew);
            }

      for (int i = 0; i < ARTICULATIONS; ++i) {
            QComboBox* cb = static_cast<QComboBox*>(articulationTable->cellWidget(i, 1));
            lstyle.setArticulationAnchor(i, ArticulationAnchor(cb->itemData(cb->currentIndex()).toInt()));
            }

      lstyle.set(ST_voltaY,                  Spatium(voltaY->value()));
      lstyle.set(ST_voltaHook,               Spatium(voltaHook->value()));
      lstyle.set(ST_voltaLineWidth,          Spatium(voltaLineWidth->value()));
      lstyle.set(ST_voltaLineStyle,          voltaLineStyle->currentIndex() + 1);

      lstyle.set(ST_ottavaY,                 Spatium(ottavaY->value()));
      lstyle.set(ST_ottavaHook,              Spatium(ottavaHook->value()));
      lstyle.set(ST_ottavaLineWidth,         Spatium(ottavaLineWidth->value()));
      lstyle.set(ST_ottavaLineStyle,         ottavaLineStyle->currentIndex() + 1);
      lstyle.set(ST_ottavaNumbersOnly,       ottavaNumbersOnly->isChecked());

      lstyle.set(ST_pedalY,                  Spatium(pedalY->value()));
      lstyle.set(ST_pedalLineWidth,          Spatium(pedalLineWidth->value()));
      lstyle.set(ST_pedalLineStyle,          pedalLineStyle->currentIndex() + 1);
      lstyle.set(ST_trillY,                  Spatium(trillY->value()));
      lstyle.set(ST_harmonyY,                Spatium(harmonyY->value()));
      lstyle.set(ST_harmonyFretDist,         Spatium(harmonyFretDist->value()));
      lstyle.set(ST_minHarmonyDistance,      Spatium(minHarmonyDistance->value()));

      lstyle.set(ST_tabClef, clefTab1->isChecked() ? CLEF_TAB : CLEF_TAB2);

      lstyle.set(ST_crossMeasureValues,      crossMeasureValues->isChecked());
      lstyle.set(ST_keySigNaturals,          radioKeySigNatNone->isChecked() ? NAT_NONE :
                  (radioKeySigNatBefore->isChecked() ? NAT_BEFORE : NAT_AFTER) );
      }
Beispiel #4
0
void EditStyle::getValues()
      {
      lstyle.set(StyleIdx::staffUpperBorder,        Spatium(staffUpperBorder->value()));
      lstyle.set(StyleIdx::staffLowerBorder,        Spatium(staffLowerBorder->value()));
      lstyle.set(StyleIdx::staffDistance,           Spatium(staffDistance->value()));
      lstyle.set(StyleIdx::akkoladeDistance,        Spatium(akkoladeDistance->value()));
      lstyle.set(StyleIdx::minSystemDistance,       Spatium(minSystemDistance->value()));
      lstyle.set(StyleIdx::maxSystemDistance,       Spatium(maxSystemDistance->value()));
      lstyle.set(StyleIdx::lyricsDistance,          Spatium(lyricsDistance->value()));
      lstyle.set(StyleIdx::lyricsMinBottomDistance, Spatium(lyricsMinBottomDistance->value()));
      lstyle.set(StyleIdx::lyricsLineHeight,        Spatium(lyricsLineHeight->value() * .01));
      lstyle.set(StyleIdx::systemFrameDistance,     Spatium(systemFrameDistance->value()));
      lstyle.set(StyleIdx::frameSystemDistance,     Spatium(frameSystemDistance->value()));
      lstyle.set(StyleIdx::minMeasureWidth,         Spatium(minMeasureWidth_2->value()));

      lstyle.set(StyleIdx::barWidth,                Spatium(barWidth->value()));
      lstyle.set(StyleIdx::endBarWidth,             Spatium(endBarWidth->value()));
      lstyle.set(StyleIdx::endBarDistance,          Spatium(endBarDistance->value()));
      lstyle.set(StyleIdx::doubleBarWidth,          Spatium(doubleBarWidth->value()));
      lstyle.set(StyleIdx::doubleBarDistance,       Spatium(doubleBarDistance->value()));

      lstyle.set(StyleIdx::repeatBarTips,           showRepeatBarTips->isChecked());
      lstyle.set(StyleIdx::startBarlineSingle,      showStartBarlineSingle->isChecked());
      lstyle.set(StyleIdx::startBarlineMultiple,    showStartBarlineMultiple->isChecked());

      lstyle.set(StyleIdx::measureSpacing,          measureSpacing->value());
      lstyle.set(StyleIdx::minNoteDistance,         Spatium(minNoteDistance->value()));
      lstyle.set(StyleIdx::barNoteDistance,         Spatium(barNoteDistance->value()));
      lstyle.set(StyleIdx::barAccidentalDistance,   Spatium(barAccidentalDistance->value()));
      lstyle.set(StyleIdx::multiMeasureRestMargin,  Spatium(multiMeasureRestMargin->value()));
      lstyle.set(StyleIdx::noteBarDistance,         Spatium(noteBarDistance->value()));
      lstyle.set(StyleIdx::showMeasureNumber,       showMeasureNumber->isChecked());
      lstyle.set(StyleIdx::showMeasureNumberOne,    showFirstMeasureNumber->isChecked());
      lstyle.set(StyleIdx::measureNumberInterval,   intervalMeasureNumber->value());
      lstyle.set(StyleIdx::measureNumberSystem,     showEverySystemMeasureNumber->isChecked());
      lstyle.set(StyleIdx::measureNumberAllStaffs,  showAllStaffsMeasureNumber->isChecked());
      lstyle.set(StyleIdx::clefLeftMargin,          Spatium(clefLeftMargin->value()));
      lstyle.set(StyleIdx::keysigLeftMargin,        Spatium(keysigLeftMargin->value()));
      lstyle.set(StyleIdx::timesigLeftMargin,       Spatium(timesigLeftMargin->value()));
      lstyle.set(StyleIdx::clefKeyRightMargin,      Spatium(clefKeyRightMargin->value()));
      lstyle.set(StyleIdx::clefBarlineDistance,     Spatium(clefBarlineDistance->value()));
      lstyle.set(StyleIdx::staffLineWidth,          Spatium(staffLineWidth->value()));
      lstyle.set(StyleIdx::beamWidth,               Spatium(beamWidth->value()));
      lstyle.set(StyleIdx::beamDistance,            beamDistance->value() / 100.0);
      lstyle.set(StyleIdx::beamMinLen,              Spatium(beamMinLen->value()));
      lstyle.set(StyleIdx::beamNoSlope,             beamNoSlope->isChecked());

      lstyle.set(StyleIdx::graceNoteMag,            graceNoteSize->value() / 100.0);
      lstyle.set(StyleIdx::smallStaffMag,           smallStaffSize->value() / 100.0);
      lstyle.set(StyleIdx::smallNoteMag,            smallNoteSize->value() / 100.0);
      lstyle.set(StyleIdx::smallClefMag,            smallClefSize->value() / 100.0);
      lstyle.set(StyleIdx::lastSystemFillLimit,     lastSystemFillThreshold->value() / 100.0);
      lstyle.set(StyleIdx::hairpinY,                Spatium(hairpinY->value()));
      lstyle.set(StyleIdx::hairpinLineWidth,        Spatium(hairpinLineWidth->value()));
      lstyle.set(StyleIdx::hairpinHeight,           Spatium(hairpinHeight->value()));
      lstyle.set(StyleIdx::hairpinContHeight,       Spatium(hairpinContinueHeight->value()));
      lstyle.set(StyleIdx::genClef,                 genClef->isChecked());
      lstyle.set(StyleIdx::genKeysig,               genKeysig->isChecked());
      lstyle.set(StyleIdx::genTimesig,              genTimesig->isChecked());
      lstyle.set(StyleIdx::genCourtesyTimesig,      genCourtesyTimesig->isChecked());
      lstyle.set(StyleIdx::genCourtesyKeysig,       genCourtesyKeysig->isChecked());
      lstyle.set(StyleIdx::genCourtesyClef,         genCourtesyClef->isChecked());
      lstyle.set(StyleIdx::swingRatio,              swingBox->value());
      if (swingEighth->isChecked())
            lstyle.set(StyleIdx::swingUnit, QString(TDuration(TDuration::DurationType::V_EIGHT).name()));
      else if (swingSixteenth->isChecked())
            lstyle.set(StyleIdx::swingUnit, QString(TDuration(TDuration::DurationType::V_16TH).name()));
      else if (SwingOff->isChecked())
            lstyle.set(StyleIdx::swingUnit, QString(TDuration(TDuration::DurationType::V_ZERO).name()));
      bool customChords = false;
      if (chordsStandard->isChecked())
            lstyle.set(StyleIdx::chordStyle, QString("std"));
      else if (chordsJazz->isChecked())
            lstyle.set(StyleIdx::chordStyle, QString("jazz"));
      else {
            lstyle.set(StyleIdx::chordStyle, QString("custom"));
            customChords = true;
            }
      lstyle.set(StyleIdx::chordsXmlFile, chordsXmlFile->isChecked());
      if (lstyle.value(StyleIdx::chordDescriptionFile).toString() != chordDescriptionFile->text()) {
            ChordList* cl = new ChordList();
            if (lstyle.value(StyleIdx::chordsXmlFile).toBool())
                  cl->read("chords.xml");
            cl->read(chordDescriptionFile->text());
            lstyle.setChordList(cl, customChords);
            lstyle.set(StyleIdx::chordDescriptionFile, chordDescriptionFile->text());
            }

      lstyle.set(StyleIdx::useStandardNoteNames,    useStandardNoteNames->isChecked());
      lstyle.set(StyleIdx::useGermanNoteNames,      useGermanNoteNames->isChecked());
      lstyle.set(StyleIdx::useSolfeggioNoteNames,   useSolfeggioNoteNames->isChecked());
      lstyle.set(StyleIdx::lowerCaseMinorChords,    lowerCaseMinorChords->isChecked());

      lstyle.set(StyleIdx::concertPitch,            concertPitch->isChecked());
      lstyle.set(StyleIdx::createMultiMeasureRests, multiMeasureRests->isChecked());
      lstyle.set(StyleIdx::minEmptyMeasures,        minEmptyMeasures->value());
      lstyle.set(StyleIdx::minMMRestWidth,          Spatium(minMeasureWidth->value()));
      lstyle.set(StyleIdx::hideEmptyStaves,         hideEmptyStaves->isChecked());
      lstyle.set(StyleIdx::dontHideStavesInFirstSystem, dontHideStavesInFirstSystem->isChecked());
      lstyle.set(StyleIdx::hideInstrumentNameIfOneInstrument, hideInstrumentNameIfOneInstrument->isChecked());

      lstyle.set(StyleIdx::accidentalNoteDistance,  Spatium(accidentalNoteDistance->value()));
      lstyle.set(StyleIdx::accidentalDistance,      Spatium(accidentalDistance->value()));
      lstyle.set(StyleIdx::dotMag,                  dotMag->value() / 100.0);
      lstyle.set(StyleIdx::dotNoteDistance,         Spatium(noteDotDistance->value()));
      lstyle.set(StyleIdx::dotDotDistance,          Spatium(dotDotDistance->value()));
      lstyle.set(StyleIdx::stemWidth,               Spatium(stemWidth->value()));
      lstyle.set(StyleIdx::ledgerLineWidth,         Spatium(ledgerLineWidth->value()));
      lstyle.set(StyleIdx::ledgerLineLength,        Spatium(ledgerLineLength->value()));

      lstyle.set(StyleIdx::bracketWidth,            Spatium(bracketWidth->value()));
      lstyle.set(StyleIdx::bracketDistance,         Spatium(bracketDistance->value()));
      lstyle.set(StyleIdx::akkoladeWidth,           Spatium(akkoladeWidth->value()));
      lstyle.set(StyleIdx::akkoladeBarDistance,     Spatium(akkoladeBarDistance->value()));

      lstyle.set(StyleIdx::propertyDistanceHead,    Spatium(propertyDistanceHead->value()));
      lstyle.set(StyleIdx::propertyDistanceStem,    Spatium(propertyDistanceStem->value()));
      lstyle.set(StyleIdx::propertyDistance,        Spatium(propertyDistance->value()));
      lstyle.set(StyleIdx::articulationMag,         articulationMag->value() / 100.0);

      lstyle.set(StyleIdx::shortenStem,             shortenStem->isChecked());
      lstyle.set(StyleIdx::shortStemProgression,    Spatium(shortStemProgression->value()));
      lstyle.set(StyleIdx::shortestStem,            Spatium(shortestStem->value()));

      lstyle.set(StyleIdx::ArpeggioNoteDistance,    Spatium(arpeggioNoteDistance->value()));
      lstyle.set(StyleIdx::ArpeggioLineWidth,       Spatium(arpeggioLineWidth->value()));
      lstyle.set(StyleIdx::ArpeggioHookLen,         Spatium(arpeggioHookLen->value()));

      lstyle.set(StyleIdx::FixMeasureNumbers,       fixNumberMeasures->value());
      lstyle.set(StyleIdx::FixMeasureWidth,         fixMeasureWidth->isChecked());

      lstyle.set(StyleIdx::SlurEndWidth,            Spatium(slurEndLineWidth->value()));
      lstyle.set(StyleIdx::SlurMidWidth,            Spatium(slurMidLineWidth->value()));
      lstyle.set(StyleIdx::SlurDottedWidth,         Spatium(slurDottedLineWidth->value()));
      lstyle.set(StyleIdx::MinTieLength,            Spatium(minTieLength->value()));

      int idx1 = musicalSymbolFont->itemData(musicalSymbolFont->currentIndex()).toInt();
      lstyle.set(StyleIdx::MusicalSymbolFont, ScoreFont::scoreFonts().at(idx1).name());

      QString tf = musicalTextFont->itemData(musicalTextFont->currentIndex()).toString();
      lstyle.set(StyleIdx::MusicalTextFont, tf);

      lstyle.set(StyleIdx::showHeader,      showHeader->isChecked());
      lstyle.set(StyleIdx::headerFirstPage, showHeaderFirstPage->isChecked());
      lstyle.set(StyleIdx::headerOddEven,   headerOddEven->isChecked());

      Text t(cs);
      t.setTextStyleType(TextStyleType::HEADER);

      lstyle.set(StyleIdx::evenHeaderL, t.convertFromHtml(evenHeaderL->toHtml()));
      lstyle.set(StyleIdx::evenHeaderC, t.convertFromHtml(evenHeaderC->toHtml()));
      lstyle.set(StyleIdx::evenHeaderR, t.convertFromHtml(evenHeaderR->toHtml()));
      lstyle.set(StyleIdx::oddHeaderL,  t.convertFromHtml(oddHeaderL->toHtml()));
      lstyle.set(StyleIdx::oddHeaderC,  t.convertFromHtml(oddHeaderC->toHtml()));
      lstyle.set(StyleIdx::oddHeaderR,  t.convertFromHtml(oddHeaderR->toHtml()));

      lstyle.set(StyleIdx::showFooter,      showFooter->isChecked());
      lstyle.set(StyleIdx::footerFirstPage, showFooterFirstPage->isChecked());
      lstyle.set(StyleIdx::footerOddEven,   footerOddEven->isChecked());

      t.setTextStyleType(TextStyleType::FOOTER);
      lstyle.set(StyleIdx::evenFooterL, t.convertFromHtml(evenFooterL->toHtml()));
      lstyle.set(StyleIdx::evenFooterC, t.convertFromHtml(evenFooterC->toHtml()));
      lstyle.set(StyleIdx::evenFooterR, t.convertFromHtml(evenFooterR->toHtml()));
      lstyle.set(StyleIdx::oddFooterL,  t.convertFromHtml(oddFooterL->toHtml()));
      lstyle.set(StyleIdx::oddFooterC,  t.convertFromHtml(oddFooterC->toHtml()));
      lstyle.set(StyleIdx::oddFooterR,  t.convertFromHtml(oddFooterR->toHtml()));

      // figured bass
      int         idx = comboFBFont->currentIndex();
      QString     family;
      if(FiguredBass::fontData(idx, &family, 0, 0, 0))
            lstyle.set(StyleIdx::figuredBassFontFamily, family);
      qreal size = doubleSpinFBSize->value();
      qreal vPos = doubleSpinFBVertPos->value();
      lstyle.set(StyleIdx::figuredBassFontSize,   size);
      lstyle.set(StyleIdx::figuredBassYOffset,    vPos);
      lstyle.set(StyleIdx::figuredBassLineHeight, ((double)spinFBLineHeight->value()) / 100.0);
      lstyle.set(StyleIdx::figuredBassAlignment,  radioFBTop->isChecked() ? 0 : 1);
      lstyle.set(StyleIdx::figuredBassStyle,      radioFBModern->isChecked() ? 0 : 1);
      // copy to text style data relevant to it (LineHeight and Style are not in text style);
      // offsetType is necessarily OFFSET_SPATIUM
      const TextStyle fbOld = lstyle.textStyle(TextStyleType::FIGURED_BASS);
      if (family != fbOld.family() || size != fbOld.size()
         || vPos != fbOld.offset().y() || fbOld.offsetType() != OffsetType::SPATIUM)
            {
            TextStyle fbNew(fbOld);
            fbNew.setFamily(family);
            fbNew.setSize(size);
            fbNew.setYoff(vPos);
            fbNew.setOffsetType(OffsetType::SPATIUM);
            lstyle.setTextStyle(fbNew);
            }

      for (int i = 0; i < int(ArticulationType::ARTICULATIONS); ++i) {
            QComboBox* cb = static_cast<QComboBox*>(articulationTable->cellWidget(i, 1));
            lstyle.setArticulationAnchor(i, ArticulationAnchor(cb->itemData(cb->currentIndex()).toInt()));
            }

      lstyle.set(StyleIdx::voltaY,                  Spatium(voltaY->value()));
      lstyle.set(StyleIdx::voltaHook,               Spatium(voltaHook->value()));
      lstyle.set(StyleIdx::voltaLineWidth,          Spatium(voltaLineWidth->value()));
      lstyle.set(StyleIdx::voltaLineStyle,          voltaLineStyle->currentIndex() + 1);

      lstyle.set(StyleIdx::ottavaY,                 Spatium(ottavaY->value()));
      lstyle.set(StyleIdx::ottavaHook,              Spatium(ottavaHook->value()));
      lstyle.set(StyleIdx::ottavaLineWidth,         Spatium(ottavaLineWidth->value()));
      lstyle.set(StyleIdx::ottavaLineStyle,         ottavaLineStyle->currentIndex() + 1);
      lstyle.set(StyleIdx::ottavaNumbersOnly,       ottavaNumbersOnly->isChecked());

      lstyle.set(StyleIdx::pedalY,                  Spatium(pedalY->value()));
      lstyle.set(StyleIdx::pedalLineWidth,          Spatium(pedalLineWidth->value()));
      lstyle.set(StyleIdx::pedalLineStyle,          pedalLineStyle->currentIndex() + 1);
      lstyle.set(StyleIdx::trillY,                  Spatium(trillY->value()));
      lstyle.set(StyleIdx::harmonyY,                Spatium(harmonyY->value()));
      lstyle.set(StyleIdx::harmonyFretDist,         Spatium(harmonyFretDist->value()));
      lstyle.set(StyleIdx::minHarmonyDistance,      Spatium(minHarmonyDistance->value()));
      lstyle.set(StyleIdx::maxHarmonyBarDistance,   Spatium(maxHarmonyBarDistance->value()));

      lstyle.set(StyleIdx::capoPosition,            capoPosition->value());

      lstyle.set(StyleIdx::fretNumMag,              fretNumMag->value()*0.01);
      lstyle.set(StyleIdx::fretNumPos,              radioFretNumLeft->isChecked() ? 0 : 1);
      lstyle.set(StyleIdx::fretY,                   fretY->value());

      lstyle.set(StyleIdx::tabClef, int(clefTab1->isChecked() ? ClefType::TAB : ClefType::TAB2));

      lstyle.set(StyleIdx::crossMeasureValues,      crossMeasureValues->isChecked());
      lstyle.set(StyleIdx::keySigNaturals,          radioKeySigNatNone->isChecked() ? int(KeySigNatural::NONE) :
                  (radioKeySigNatBefore->isChecked() ? int(KeySigNatural::BEFORE) : int(KeySigNatural::AFTER)) );

      lstyle.set(StyleIdx::tupletMaxSlope,           tupletMaxSlope->value());
      lstyle.set(StyleIdx::tupletOufOfStaff,         tupletOutOfStaff->isChecked());
      lstyle.set(StyleIdx::tupletVHeadDistance,      Spatium(tupletVHeadDistance->value()));
      lstyle.set(StyleIdx::tupletVStemDistance,      Spatium(tupletVStemDistance->value()));
      lstyle.set(StyleIdx::tupletStemLeftDistance,   Spatium(tupletStemLeftDistance->value()));
      lstyle.set(StyleIdx::tupletStemRightDistance,  Spatium(tupletStemRightDistance->value()));
      lstyle.set(StyleIdx::tupletNoteLeftDistance,   Spatium(tupletNoteLeftDistance->value()));
      lstyle.set(StyleIdx::tupletNoteRightDistance,  Spatium(tupletNoteRightDistance->value()));
      }