Use Lyricist instead of obsolete Poet
as far as possible, preserving compatibility
This commit is contained in:
parent
2cbdf50ea3
commit
5b4648bb8e
|
@ -133,7 +133,7 @@ QString NotationMeta::composer(const mu::engraving::Score* score)
|
|||
QString NotationMeta::poet(const mu::engraving::Score* score)
|
||||
{
|
||||
QString poet;
|
||||
const mu::engraving::Text* text = score->getText(mu::engraving::TextStyleType::POET);
|
||||
const mu::engraving::Text* text = score->getText(mu::engraving::TextStyleType::LYRICIST);
|
||||
if (text) {
|
||||
poet = text->plainText();
|
||||
}
|
||||
|
@ -243,7 +243,7 @@ QJsonObject NotationMeta::typeDataJson(mu::engraving::Score* score)
|
|||
{ "titles", TextStyleType::TITLE },
|
||||
{ "subtitles", TextStyleType::SUBTITLE },
|
||||
{ "composers", TextStyleType::COMPOSER },
|
||||
{ "poets", TextStyleType::POET }
|
||||
{ "poets", TextStyleType::LYRICIST }
|
||||
};
|
||||
|
||||
for (auto nameType : namesTypesList) {
|
||||
|
|
|
@ -674,7 +674,7 @@ TextBase* Score::addText(TextStyleType type, EngravingItem* destinationElement,
|
|||
case TextStyleType::TITLE:
|
||||
case TextStyleType::SUBTITLE:
|
||||
case TextStyleType::COMPOSER:
|
||||
case TextStyleType::POET:
|
||||
case TextStyleType::LYRICIST:
|
||||
case TextStyleType::INSTRUMENT_EXCERPT: {
|
||||
MeasureBase* frame = nullptr;
|
||||
|
||||
|
|
|
@ -82,7 +82,6 @@ MasterScore::MasterScore(std::weak_ptr<engraving::EngravingProject> project)
|
|||
metaTags().insert({ u"arranger", u"" });
|
||||
metaTags().insert({ u"composer", u"" });
|
||||
metaTags().insert({ u"lyricist", u"" });
|
||||
metaTags().insert({ u"poet", u"" });
|
||||
metaTags().insert({ u"translator", u"" });
|
||||
metaTags().insert({ u"source", u"" });
|
||||
metaTags().insert({ u"copyright", u"" });
|
||||
|
|
|
@ -2504,7 +2504,7 @@ String TextBase::accessibleInfo() const
|
|||
case TextStyleType::TITLE:
|
||||
case TextStyleType::SUBTITLE:
|
||||
case TextStyleType::COMPOSER:
|
||||
case TextStyleType::POET:
|
||||
case TextStyleType::LYRICIST:
|
||||
case TextStyleType::TRANSLATOR:
|
||||
case TextStyleType::MEASURE_NUMBER:
|
||||
case TextStyleType::MMREST_RANGE:
|
||||
|
@ -2534,7 +2534,7 @@ String TextBase::screenReaderInfo() const
|
|||
case TextStyleType::TITLE:
|
||||
case TextStyleType::SUBTITLE:
|
||||
case TextStyleType::COMPOSER:
|
||||
case TextStyleType::POET:
|
||||
case TextStyleType::LYRICIST:
|
||||
case TextStyleType::TRANSLATOR:
|
||||
case TextStyleType::MEASURE_NUMBER:
|
||||
case TextStyleType::MMREST_RANGE:
|
||||
|
|
|
@ -312,7 +312,7 @@ static bool readTextProperties(XmlReader& e, ReadContext& ctx, TextBase* t, Engr
|
|||
break;
|
||||
case 4: ss = TextStyleType::COMPOSER;
|
||||
break;
|
||||
case 5: ss = TextStyleType::POET;
|
||||
case 5: ss = TextStyleType::LYRICIST;
|
||||
break;
|
||||
|
||||
case 6: ss = TextStyleType::LYRICS_ODD;
|
||||
|
|
|
@ -263,7 +263,7 @@ void Read206::readTextStyle206(MStyle* style, XmlReader& e, ReadContext& ctx, st
|
|||
{ "Title", TextStyleType::TITLE },
|
||||
{ "Subtitle", TextStyleType::SUBTITLE },
|
||||
{ "Composer", TextStyleType::COMPOSER },
|
||||
{ "Lyricist", TextStyleType::POET },
|
||||
{ "Lyricist", TextStyleType::LYRICIST },
|
||||
{ "Lyrics Odd Lines", TextStyleType::LYRICS_ODD },
|
||||
{ "Lyrics Even Lines", TextStyleType::LYRICS_EVEN },
|
||||
{ "Fingering", TextStyleType::FINGERING },
|
||||
|
|
|
@ -1055,7 +1055,7 @@ const TextStyle* textStyle(TextStyleType idx)
|
|||
case TextStyleType::TITLE: return &titleTextStyle;
|
||||
case TextStyleType::SUBTITLE: return &subTitleTextStyle;
|
||||
case TextStyleType::COMPOSER: return &composerTextStyle;
|
||||
case TextStyleType::POET: return &lyricistTextStyle;
|
||||
case TextStyleType::LYRICIST: return &lyricistTextStyle;
|
||||
case TextStyleType::TRANSLATOR: return &translatorTextStyle;
|
||||
case TextStyleType::FRAME: return &frameTextStyle;
|
||||
case TextStyleType::INSTRUMENT_EXCERPT: return &partInstrumentTextStyle;
|
||||
|
@ -1133,7 +1133,7 @@ static const std::vector<TextStyleType> _primaryTextStyles = {
|
|||
TextStyleType::TITLE,
|
||||
TextStyleType::SUBTITLE,
|
||||
TextStyleType::COMPOSER,
|
||||
TextStyleType::POET,
|
||||
TextStyleType::LYRICIST,
|
||||
TextStyleType::TRANSLATOR,
|
||||
TextStyleType::FRAME,
|
||||
TextStyleType::INSTRUMENT_EXCERPT,
|
||||
|
|
|
@ -697,7 +697,7 @@ enum class TextStyleType {
|
|||
TITLE,
|
||||
SUBTITLE,
|
||||
COMPOSER,
|
||||
POET,
|
||||
LYRICIST,
|
||||
TRANSLATOR,
|
||||
FRAME,
|
||||
INSTRUMENT_EXCERPT,
|
||||
|
|
|
@ -1038,7 +1038,7 @@ static const std::vector<Item<TextStyleType> > TEXTSTYLE_TYPES = {
|
|||
{ TextStyleType::TITLE, "title", TranslatableString("engraving", "Title") },
|
||||
{ TextStyleType::SUBTITLE, "subtitle", TranslatableString("engraving", "Subtitle") },
|
||||
{ TextStyleType::COMPOSER, "composer", TranslatableString("engraving", "Composer") },
|
||||
{ TextStyleType::POET, "poet", TranslatableString("engraving", "Lyricist") },
|
||||
{ TextStyleType::LYRICIST, "poet", TranslatableString("engraving", "Lyricist") },
|
||||
{ TextStyleType::TRANSLATOR, "translator", TranslatableString("engraving", "Translator") },
|
||||
{ TextStyleType::FRAME, "frame", TranslatableString("engraving", "Frame") },
|
||||
{ TextStyleType::INSTRUMENT_EXCERPT, "instrument_excerpt", TranslatableString("engraving", "Instrument name (Part)") },
|
||||
|
@ -1135,7 +1135,7 @@ TextStyleType TConv::fromXml(const AsciiStringView& tag, TextStyleType def)
|
|||
{ "Title", TextStyleType::TITLE },
|
||||
{ "Subtitle", TextStyleType::SUBTITLE },
|
||||
{ "Composer", TextStyleType::COMPOSER },
|
||||
{ "Lyricist", TextStyleType::POET },
|
||||
{ "Lyricist", TextStyleType::LYRICIST },
|
||||
{ "Translator", TextStyleType::TRANSLATOR },
|
||||
{ "Frame", TextStyleType::FRAME },
|
||||
{ "Instrument Name (Part)", TextStyleType::INSTRUMENT_EXCERPT },
|
||||
|
|
|
@ -1288,7 +1288,7 @@ void convertCapella(Score* score, Capella* cap, bool capxMode)
|
|||
SimpleTextObj* to = static_cast<SimpleTextObj*>(o);
|
||||
TextStyleType tid;
|
||||
switch (to->textalign()) {
|
||||
case 0: tid = TextStyleType::POET;
|
||||
case 0: tid = TextStyleType::LYRICIST;
|
||||
break;
|
||||
case 1: tid = TextStyleType::TITLE;
|
||||
break;
|
||||
|
|
|
@ -1057,7 +1057,7 @@ void GPConverter::setUpGPScore(const GPScore* gpscore)
|
|||
m->add(s);
|
||||
}
|
||||
if (!gpscore->poet().isEmpty()) {
|
||||
Text* s = Factory::createText(_score->dummy(), TextStyleType::POET);
|
||||
Text* s = Factory::createText(_score->dummy(), TextStyleType::LYRICIST);
|
||||
s->setPlainText(mu::mtrc("iex_guitarpro", "Words by %1").arg(gpscore->poet()));
|
||||
m->add(s);
|
||||
}
|
||||
|
|
|
@ -2797,7 +2797,7 @@ std::tuple<libmei::Rend, TextCell, String> Convert::textToMEI(const engraving::T
|
|||
case (engraving::TextStyleType::COMPOSER):
|
||||
cell = BottomRight;
|
||||
break;
|
||||
case (engraving::TextStyleType::POET):
|
||||
case (engraving::TextStyleType::LYRICIST):
|
||||
cell = BottomLeft;
|
||||
break;
|
||||
case (engraving::TextStyleType::INSTRUMENT_EXCERPT):
|
||||
|
|
|
@ -2845,7 +2845,7 @@ bool MeiImporter::buildTextFrame()
|
|||
textCreators << m_score->metaTag(u"translator");
|
||||
}
|
||||
if (!textCreators.empty()) {
|
||||
this->addTextToTitleFrame(vBox, textCreators.join(u"\n"), TextStyleType::POET);
|
||||
this->addTextToTitleFrame(vBox, textCreators.join(u"\n"), TextStyleType::LYRICIST);
|
||||
}
|
||||
|
||||
if (vBox) {
|
||||
|
|
|
@ -360,7 +360,7 @@ void MTrack::processMeta(int tick, const MidiEvent& mm)
|
|||
ssid = TextStyleType::TRANSLATOR;
|
||||
break;
|
||||
case META_POET:
|
||||
ssid = TextStyleType::POET;
|
||||
ssid = TextStyleType::LYRICIST;
|
||||
break;
|
||||
case META_SUBTITLE:
|
||||
ssid = TextStyleType::SUBTITLE;
|
||||
|
|
|
@ -1457,7 +1457,7 @@ static QString tidToCreditType(const TextStyleType tid)
|
|||
case TextStyleType::COMPOSER:
|
||||
res = "composer";
|
||||
break;
|
||||
case TextStyleType::POET:
|
||||
case TextStyleType::LYRICIST:
|
||||
res = "lyricist";
|
||||
break;
|
||||
case TextStyleType::SUBTITLE:
|
||||
|
|
|
@ -631,7 +631,7 @@ static TextStyleType creditWordTypeToTid(const QString& type)
|
|||
if (type == "composer") {
|
||||
return TextStyleType::COMPOSER;
|
||||
} else if (type == "lyricist") {
|
||||
return TextStyleType::POET;
|
||||
return TextStyleType::LYRICIST;
|
||||
}
|
||||
/*
|
||||
else if (type == "page number")
|
||||
|
@ -665,7 +665,7 @@ static TextStyleType creditWordTypeGuess(const CreditWords* const word, std::vec
|
|||
// poet is in the left column
|
||||
else if (defx < pw1) {
|
||||
// found poet/lyricist
|
||||
return TextStyleType::POET;
|
||||
return TextStyleType::LYRICIST;
|
||||
}
|
||||
// title is in the middle column
|
||||
else {
|
||||
|
@ -800,7 +800,7 @@ static void createDefaultHeader(Score* const score)
|
|||
QString strTitle;
|
||||
QString strSubTitle;
|
||||
QString strComposer;
|
||||
QString strPoet;
|
||||
QString strLyricist;
|
||||
QString strTranslator;
|
||||
|
||||
if (!(score->metaTag(u"movementTitle").isEmpty() && score->metaTag(u"workTitle").isEmpty())) {
|
||||
|
@ -816,16 +816,16 @@ static void createDefaultHeader(Score* const score)
|
|||
}
|
||||
}
|
||||
QString metaComposer = score->metaTag(u"composer");
|
||||
QString metaPoet = score->metaTag(u"poet");
|
||||
QString metaLyricist = score->metaTag(u"lyricist");
|
||||
QString metaTranslator = score->metaTag(u"translator");
|
||||
if (!metaComposer.isEmpty()) {
|
||||
strComposer = metaComposer;
|
||||
}
|
||||
if (metaPoet.isEmpty()) {
|
||||
metaPoet = score->metaTag(u"lyricist");
|
||||
if (metaLyricist.isEmpty()) {
|
||||
metaLyricist = score->metaTag(u"poet");
|
||||
}
|
||||
if (!metaPoet.isEmpty()) {
|
||||
strPoet = metaPoet;
|
||||
if (!metaLyricist.isEmpty()) {
|
||||
strLyricist = metaLyricist;
|
||||
}
|
||||
if (!metaTranslator.isEmpty()) {
|
||||
strTranslator = metaTranslator;
|
||||
|
@ -836,7 +836,7 @@ static void createDefaultHeader(Score* const score)
|
|||
addText(vbox, score, strTitle.toHtmlEscaped(), TextStyleType::TITLE);
|
||||
addText(vbox, score, strSubTitle.toHtmlEscaped(), TextStyleType::SUBTITLE);
|
||||
addText(vbox, score, strComposer.toHtmlEscaped(), TextStyleType::COMPOSER);
|
||||
addText(vbox, score, strPoet.toHtmlEscaped(), TextStyleType::POET);
|
||||
addText(vbox, score, strLyricist.toHtmlEscaped(), TextStyleType::LYRICIST);
|
||||
addText(vbox, score, strTranslator.toHtmlEscaped(), TextStyleType::TRANSLATOR);
|
||||
}
|
||||
|
||||
|
@ -1422,7 +1422,7 @@ static bool isTitleFrameStyle(const TextStyleType tid)
|
|||
return tid == TextStyleType::TITLE
|
||||
|| tid == TextStyleType::SUBTITLE
|
||||
|| tid == TextStyleType::COMPOSER
|
||||
|| tid == TextStyleType::POET;
|
||||
|| tid == TextStyleType::LYRICIST;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------
|
||||
|
|
|
@ -386,7 +386,7 @@ void OveToMScore::convertHeader()
|
|||
QList<QString> annotates = m_ove->getAnnotates();
|
||||
if (!annotates.empty() && !annotates[0].isEmpty()) {
|
||||
QString annotate = annotates[0];
|
||||
ove::addText(vbox, m_score, annotate, TextStyleType::POET);
|
||||
ove::addText(vbox, m_score, annotate, TextStyleType::LYRICIST);
|
||||
}
|
||||
|
||||
QList<QString> writers = m_ove->getWriters();
|
||||
|
@ -398,7 +398,7 @@ void OveToMScore::convertHeader()
|
|||
|
||||
if (writers.size() > 1) {
|
||||
QString lyricist = writers[1];
|
||||
ove::addText(vbox, m_score, lyricist, TextStyleType::POET);
|
||||
ove::addText(vbox, m_score, lyricist, TextStyleType::LYRICIST);
|
||||
}
|
||||
|
||||
if (vbox) {
|
||||
|
|
|
@ -106,7 +106,7 @@ void ExcerptNotation::fillWithDefaultInfo()
|
|||
unlinkText(TextStyleType::TITLE);
|
||||
unlinkText(TextStyleType::SUBTITLE);
|
||||
unlinkText(TextStyleType::COMPOSER);
|
||||
unlinkText(TextStyleType::POET);
|
||||
unlinkText(TextStyleType::LYRICIST);
|
||||
}
|
||||
|
||||
mu::engraving::Excerpt* ExcerptNotation::excerpt() const
|
||||
|
|
|
@ -382,7 +382,7 @@ void MasterNotation::applyOptions(mu::engraving::MasterScore* score, const Score
|
|||
setText(mu::engraving::TextStyleType::COMPOSER, composer);
|
||||
}
|
||||
if (!lyricist.isEmpty()) {
|
||||
setText(mu::engraving::TextStyleType::POET, lyricist);
|
||||
setText(mu::engraving::TextStyleType::LYRICIST, lyricist);
|
||||
}
|
||||
} else if (nvb) {
|
||||
delete nvb;
|
||||
|
|
|
@ -314,7 +314,7 @@ void NotationActionController::init()
|
|||
registerAction("title-text", [this]() { addText(TextStyleType::TITLE); });
|
||||
registerAction("subtitle-text", [this]() { addText(TextStyleType::SUBTITLE); });
|
||||
registerAction("composer-text", [this]() { addText(TextStyleType::COMPOSER); });
|
||||
registerAction("poet-text", [this]() { addText(TextStyleType::POET); });
|
||||
registerAction("poet-text", [this]() { addText(TextStyleType::LYRICIST); });
|
||||
registerAction("part-text", [this]() { addText(TextStyleType::INSTRUMENT_EXCERPT); });
|
||||
registerAction("frame-text", [this]() { addText(TextStyleType::FRAME); });
|
||||
|
||||
|
|
|
@ -673,7 +673,7 @@ inline bool isVerticalBoxTextStyle(TextStyleType type)
|
|||
TextStyleType::TITLE,
|
||||
TextStyleType::SUBTITLE,
|
||||
TextStyleType::COMPOSER,
|
||||
TextStyleType::POET,
|
||||
TextStyleType::LYRICIST,
|
||||
TextStyleType::INSTRUMENT_EXCERPT,
|
||||
};
|
||||
|
||||
|
|
|
@ -547,7 +547,7 @@ enum class Tid {
|
|||
TITLE = int(mu::engraving::TextStyleType::TITLE),
|
||||
SUBTITLE = int(mu::engraving::TextStyleType::SUBTITLE),
|
||||
COMPOSER = int(mu::engraving::TextStyleType::COMPOSER),
|
||||
POET = int(mu::engraving::TextStyleType::POET),
|
||||
POET = int(mu::engraving::TextStyleType::LYRICIST),
|
||||
TRANSLATOR = int(mu::engraving::TextStyleType::TRANSLATOR),
|
||||
FRAME = int(mu::engraving::TextStyleType::FRAME),
|
||||
INSTRUMENT_EXCERPT = int(mu::engraving::TextStyleType::INSTRUMENT_EXCERPT),
|
||||
|
|
|
@ -70,7 +70,7 @@ void Score::addText(const QString& type, const QString& txt)
|
|||
} else if (type == "composer") {
|
||||
tid = mu::engraving::TextStyleType::COMPOSER;
|
||||
} else if (type == "lyricist") {
|
||||
tid = mu::engraving::TextStyleType::POET;
|
||||
tid = mu::engraving::TextStyleType::LYRICIST;
|
||||
}
|
||||
|
||||
mu::engraving::Text* text = mu::engraving::Factory::createText(measure, tid);
|
||||
|
|
Loading…
Reference in New Issue