From 92d3ff1e4686e7612f55c96c0bc115bab6a8d38b Mon Sep 17 00:00:00 2001 From: Georg Zotti Date: Tue, 4 Mar 2025 11:37:41 +0100 Subject: [PATCH 1/3] Reduce warning level --- src/core/modules/AsterismMgr.cpp | 2 +- src/core/modules/ConstellationMgr.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/modules/AsterismMgr.cpp b/src/core/modules/AsterismMgr.cpp index f239799cbf079..efc9d3819b8db 100644 --- a/src/core/modules/AsterismMgr.cpp +++ b/src/core/modules/AsterismMgr.cpp @@ -129,7 +129,7 @@ void AsterismMgr::updateSkyCulture(const StelSkyCulture& skyCulture) asterisms.clear(); selected.clear(); hasAsterism = false; - qWarning() << "No asterisms for skyculture" << currentSkyCultureID; + qInfo() << "No asterisms for skyculture" << currentSkyCultureID; } else { diff --git a/src/core/modules/ConstellationMgr.cpp b/src/core/modules/ConstellationMgr.cpp index 9da7e636891ec..3190f73ec0b0e 100644 --- a/src/core/modules/ConstellationMgr.cpp +++ b/src/core/modules/ConstellationMgr.cpp @@ -173,7 +173,7 @@ void ConstellationMgr::updateSkyCulture(const StelSkyCulture& skyCulture) int i = 1; for (auto* constellation : constellations) { - qWarning() << "[Constellation] #" << i << " abbr:" << constellation->abbreviation << " name:" << constellation->getEnglishName() << " segments:" << constellation->numberOfSegments; + qInfo() << "[Constellation] #" << i << " abbr:" << constellation->abbreviation << " name:" << constellation->getEnglishName() << " segments:" << constellation->numberOfSegments; i++; } } From 2a9167384db88f9f66b5c6fd11c38eeb8d4797c3 Mon Sep 17 00:00:00 2001 From: Georg Zotti Date: Tue, 4 Mar 2025 16:30:43 +0100 Subject: [PATCH 2/3] Rename enums, add a few useful entries for a start --- src/core/modules/Constellation.cpp | 8 ++++---- src/core/modules/ConstellationMgr.cpp | 14 +++++++------- src/core/modules/ConstellationMgr.hpp | 19 +++++++++++++++---- src/core/modules/StarMgr.cpp | 2 +- 4 files changed, 27 insertions(+), 16 deletions(-) diff --git a/src/core/modules/Constellation.cpp b/src/core/modules/Constellation.cpp index 28a47114dc0a6..b09cf9524a80e 100644 --- a/src/core/modules/Constellation.cpp +++ b/src/core/modules/Constellation.cpp @@ -194,16 +194,16 @@ void Constellation::drawName(StelPainter& sPainter, ConstellationMgr::Constellat QString name; switch (style) { - case ConstellationMgr::constellationsTranslated: + case ConstellationMgr::Translated: name=nameI18; break; - case ConstellationMgr::constellationsNative: + case ConstellationMgr::Native: name=nativeName; break; - case ConstellationMgr::constellationsEnglish: + case ConstellationMgr::English: name=englishName; break; - case ConstellationMgr::constellationsAbbreviated: + case ConstellationMgr::Abbreviated: name=(abbreviation.startsWith('.') ? "" : abbreviation); break; } diff --git a/src/core/modules/ConstellationMgr.cpp b/src/core/modules/ConstellationMgr.cpp index 3190f73ec0b0e..b961b2f34ecd1 100644 --- a/src/core/modules/ConstellationMgr.cpp +++ b/src/core/modules/ConstellationMgr.cpp @@ -52,7 +52,7 @@ ConstellationMgr::ConstellationMgr(StarMgr *_hip_stars) : hipStarMgr(_hip_stars), isolateSelected(false), flagConstellationPick(false), - constellationDisplayStyle(ConstellationMgr::constellationsTranslated), + constellationDisplayStyle(ConstellationMgr::Translated), artFadeDuration(2.), artIntensity(0), artIntensityMinimumFov(1.0), @@ -107,7 +107,7 @@ void ConstellationMgr::init() qWarning() << "viewing/constellation_name_style (" << starloreDisplayStyle << ") invalid. Using translated style."; conf->setValue("viewing/constellation_name_style", "translated"); } - setConstellationDisplayStyle(ConstellationDisplayStyleMap.value(starloreDisplayStyle, constellationsTranslated)); + setConstellationDisplayStyle(ConstellationDisplayStyleMap.value(starloreDisplayStyle, Translated)); // Load colors from config file QString defaultColor = conf->value("color/default_color").toString(); @@ -400,7 +400,7 @@ void ConstellationMgr::setConstellationDisplayStyle(ConstellationDisplayStyle st QString ConstellationMgr::getConstellationDisplayStyleString(ConstellationDisplayStyle style) { - return (style == constellationsAbbreviated ? "abbreviated" : (style == constellationsNative ? "native" : "translated")); + return (style == Abbreviated ? "abbreviated" : (style == Native ? "native" : "translated")); } ConstellationMgr::ConstellationDisplayStyle ConstellationMgr::getConstellationDisplayStyle() @@ -1355,7 +1355,7 @@ Constellation* ConstellationMgr::isObjectIn(const StelObject *s) const } const QMapConstellationMgr::ConstellationDisplayStyleMap={ - { "translated", constellationsTranslated}, - { "native", constellationsNative}, - { "abbreviated", constellationsAbbreviated}, - { "english", constellationsEnglish}}; + { "translated", Translated}, + { "native", Native}, + { "abbreviated", Abbreviated}, + { "english", English}}; diff --git a/src/core/modules/ConstellationMgr.hpp b/src/core/modules/ConstellationMgr.hpp index a2edd93d06b6c..55106406bc25e 100644 --- a/src/core/modules/ConstellationMgr.hpp +++ b/src/core/modules/ConstellationMgr.hpp @@ -146,12 +146,23 @@ class ConstellationMgr : public StelObjectModule QString getName() const override { return "Constellations"; } QString getStelObjectType() const override; //! Describes how to display constellation labels. The viewDialog GUI has a combobox which corresponds to these values. + //! TODO: Move to become SkycultureMgr::DisplayStyle? Then apply separately to Constellations and Planets, and whether applied to screen labels or infoString. enum ConstellationDisplayStyle { - constellationsAbbreviated = 0, - constellationsNative = 1, - constellationsTranslated = 2, - constellationsEnglish = 3 // Maybe this is not useful? + Abbreviated = 0, // short label + Native = 1, // may show non-Latin glyphs + Translated = 2, // user language + English = 3, // Useful in case of adding names in modern English terminology (planets etc.). Maybe "Modern" would be better, and should show object scientific name in modern terminology, translated. + Translit = 4, // user-language transliteration/pronunciation aid + Native_Translit, // combinations: just help reading foreign glyphs. MORE OPTIONS POSSIBLE! + Native_Translit_Translated, // help reading foreign glyphs, show translations + Native_Translit_IPA_Translated, // help reading foreign glyphs, phonetics, show translations + Native_Translated, // glyphs + user language + Translit_Translated, // user language letters + translation + Translit_IPA_Translated, // user language letters, phonetic + translation + Translit_Translated_English, // user language letters + translation + English Name + Translit_IPA_Translated_English, // user language letters + translation + English Name + }; Q_ENUM(ConstellationDisplayStyle) diff --git a/src/core/modules/StarMgr.cpp b/src/core/modules/StarMgr.cpp index 3bb3773d95b8c..2d97a8ac79e89 100644 --- a/src/core/modules/StarMgr.cpp +++ b/src/core/modules/StarMgr.cpp @@ -190,7 +190,7 @@ StarMgr::~StarMgr(void) QString StarMgr::getCommonName(StarId hip) { ConstellationMgr* cmgr=GETSTELMODULE(ConstellationMgr); - if (cmgr->getConstellationDisplayStyle() == ConstellationMgr::constellationsNative) + if (cmgr->getConstellationDisplayStyle() == ConstellationMgr::Native) return getCommonEnglishName(hip); auto it = commonNamesMapI18n.find(hip); From cb6ebc483fb3ab02dc41fd09f81ad0d12cb04f67 Mon Sep 17 00:00:00 2001 From: Georg Zotti Date: Thu, 6 Mar 2025 18:27:37 +0100 Subject: [PATCH 3/3] Move ConstellationMgr::ConstellationDisplayStyle to StelObject::CulturalDisplayStyle - Start extending options - Actual display not changed yet --- src/core/StelObject.hpp | 36 ++++++++++++++++++++ src/core/modules/Constellation.cpp | 49 +++++++++++++++++++++++---- src/core/modules/Constellation.hpp | 8 +++-- src/core/modules/ConstellationMgr.cpp | 24 +++++++------ src/core/modules/ConstellationMgr.hpp | 47 +++++++++++-------------- src/core/modules/StarMgr.cpp | 2 +- src/gui/ConfigurationDialog.cpp | 2 +- 7 files changed, 119 insertions(+), 49 deletions(-) diff --git a/src/core/StelObject.hpp b/src/core/StelObject.hpp index d35b7335d0043..fd9d95ee45234 100644 --- a/src/core/StelObject.hpp +++ b/src/core/StelObject.hpp @@ -79,6 +79,42 @@ class StelObject : public StelRegionObject Q_DECLARE_FLAGS(InfoStringGroup, InfoStringGroupFlags) Q_FLAG(InfoStringGroup) + + //! Describes how to display culture aware labels for constellation, planets, star names, .... The viewDialog GUI has comboboxes which corresponds to these values. + //! It may be necessary to have different settings for screen labels (usually shorter) and InfoString labels (may be set to more complete) + //! Then apply separately to Constellations and Planets, and whether applied to screen labels or infoString. + //! TODO: This could of course become a bitfield, but having just a choice of discrete options may still be easier to maintain. + //! TODO: In any case, this will require methods getScreenLabel() and getInfoLabel() in StelObject. + enum class CulturalDisplayStyle // TODO: Not sure about class yet. It may be easier to store the enums as ints, not long strings. + { + Abbreviated = 0, // short label + Native = 1, // may show non-Latin glyphs + Translated = 2, // Just user language. This is the most common case for people casually interested in the topic. + Modern = 3, // Was: English. Useful in case of adding names in modern English/userlanguage terminology (planets etc.). Should show object scientific name in modern terminology, translated. + Pronounce = 4, // user-language transliteration/pronunciation aid. Usually the original form like pinyin is also used in users' languages, but it may be translatable to user language, e.g. into another coding system like Cyrillic. + Translit = 5, // Non-translatable scientific transliteration that is not a pronounciation aid. Only known use case is Tibetan/Wiley. + IPA = 6, // International Phonetic Alphabet, a standardized pronunciation aid + Pronounce_Translated, // combinations: user language letters + translation + Pronounce_IPA_Translated, // user language letters + phonetic + translation + Pronounce_Translated_Modern, // user language letters + translation + Modern Name + Pronounce_IPA_Translated_Modern, // user language letters + phonetics + translation + Modern Name + Native_Pronounce, // just help reading foreign glyphs. + Native_Pronounce_Translated, // foreign glyphs, own pronunciation aid, translation + Native_Pronounce_IPA_Translated, // foreign glyphs, own pronunciation aid, phonetics, translation + Native_Translated, // glyphs + user language + Native_Translit_Translated, // glyphs + sci.transliteration, translation + Native_Translit_Pronounce_Translated, // glyphs + sci.transliteration, pronunciation for mortals, translation + Native_Translit_Pronounce_IPA_Translated, // glyphs + sci.transliteration, pronunciation for mortals, phonetics, translation + Native_Translit_IPA_Translated, // glyphs + sci.transliteration, phonetics, translation + Translit_Translated, // sci.transliteration, translation + Translit_Pronounce_Translated, // sci.transliteration, pronunciation for mortals, translation + Translit_Pronounce_IPA_Translated, // sci.transliteration, pronunciation for mortals, phonetics, translation + Translit_IPA_Translated, // sci.transliteration, phonetics, translation + }; // MORE OPTIONS NEEDED? + Q_ENUM(CulturalDisplayStyle) + + + //! A pre-defined "all available" set of specifiers for the getInfoString flags argument to getInfoString static constexpr InfoStringGroup AllInfo = static_cast(Name|CatalogNumber|Magnitude|RaDecJ2000|RaDecOfDate|AltAzi| Distance|Elongation|Size|Velocity|ProperMotion|Extra|HourAngle|AbsoluteMagnitude| diff --git a/src/core/modules/Constellation.cpp b/src/core/modules/Constellation.cpp index b09cf9524a80e..74cfd369ae2a3 100644 --- a/src/core/modules/Constellation.cpp +++ b/src/core/modules/Constellation.cpp @@ -184,27 +184,62 @@ void Constellation::drawOptim(StelPainter& sPainter, const StelCore* core, const } } -void Constellation::drawName(StelPainter& sPainter, ConstellationMgr::ConstellationDisplayStyle style) const +void Constellation::drawName(StelPainter& sPainter, StelObject::CulturalDisplayStyle style) const { if (nameFader.getInterstate()==0.0f) return; + // TODO: Find a solution of fallbacks when components are missing? if (checkVisibility()) { QString name; switch (style) { - case ConstellationMgr::Translated: - name=nameI18; + case CulturalDisplayStyle::Abbreviated: + name=(abbreviation.startsWith('.') ? "" : abbreviation); break; - case ConstellationMgr::Native: + case CulturalDisplayStyle::Native: name=nativeName; break; - case ConstellationMgr::English: + case CulturalDisplayStyle::Translated: + name=nameI18; + break; + case CulturalDisplayStyle::Modern: name=englishName; break; - case ConstellationMgr::Abbreviated: - name=(abbreviation.startsWith('.') ? "" : abbreviation); + case CulturalDisplayStyle::Pronounce: + name=englishName; + break; + case CulturalDisplayStyle::Translit: + name=englishName; + break; + case CulturalDisplayStyle::IPA: + name=nativeNameIPA; + break; + case CulturalDisplayStyle::Pronounce_Translated: + name=QString("%1 (%2)").arg(nativeNamePronounce, nameI18); + break; + case CulturalDisplayStyle::Pronounce_IPA_Translated: + name=QString("%1 [%2] (%3)").arg(nativeNamePronounce, nativeNameIPA, englishName); + break; + case CulturalDisplayStyle::Pronounce_Translated_Modern: + name=QString("%1 (%2, %3)").arg(nativeNamePronounce, nameI18, englishName); + break; + case CulturalDisplayStyle::Pronounce_IPA_Translated_Modern: + name=QString("%1 [%2] (%3, %4)").arg(nativeNamePronounce, nativeNameIPA, nameI18, englishName); + break; + case CulturalDisplayStyle::Native_Pronounce: + name=QString("%1 [%2]").arg(nativeName, nativeNamePronounce); + break; + case CulturalDisplayStyle::Native_Pronounce_Translated: + name=QString("%1 [%2] (%3)").arg(nativeName, nativeNamePronounce, nameI18); + break; + case CulturalDisplayStyle::Native_Pronounce_IPA_Translated: + name=QString("%1 [%2, %3] (%4)").arg(nativeName, nativeNamePronounce, nativeNameIPA, nameI18); + break; + // TODO: MORE TO COME! + default: // pronounce + translated... + name=QString("%1 (%2)").arg(nativeNamePronounce, nameI18); break; } diff --git a/src/core/modules/Constellation.hpp b/src/core/modules/Constellation.hpp index ba41cf9e62f6c..3953b277c48ca 100644 --- a/src/core/modules/Constellation.hpp +++ b/src/core/modules/Constellation.hpp @@ -83,8 +83,8 @@ class Constellation : public StelObject //! @return false if can't parse record (invalid result!), else true. bool read(const QJsonObject& data, StarMgr *starMgr, bool preferNativeNames); - //! Draw the constellation name - void drawName(StelPainter& sPainter, ConstellationMgr::ConstellationDisplayStyle style) const; + //! Draw the constellation name. Depending on completeness of names and data, there may be a rich set of options to display. + void drawName(StelPainter& sPainter, CulturalDisplayStyle style) const; //! Draw the constellation art void drawArt(StelPainter& sPainter) const; //! Draw the constellation boundary. obsVelocity used for aberration @@ -160,6 +160,10 @@ class Constellation : public StelObject QString nativeName; //! Pronouncement of the native name or the romanized version of native name of constellation QString nativeNamePronounce; + //! Pronunciation aid in International Phonetic Alphabet (future addition) + QString nativeNameIPA; + //! A scientific transliteration that does not help pronunciation. (Example: Tibetan/Wylie.) + QString nativeNameTranslit; //! Abbreviation (the short name or designation of constellations) //! For non-western, a skyculture designer must invent it. (usually 2-5 letters) //! This MUST be filled and be unique within a sky culture. diff --git a/src/core/modules/ConstellationMgr.cpp b/src/core/modules/ConstellationMgr.cpp index b961b2f34ecd1..e330ad847f87e 100644 --- a/src/core/modules/ConstellationMgr.cpp +++ b/src/core/modules/ConstellationMgr.cpp @@ -52,7 +52,7 @@ ConstellationMgr::ConstellationMgr(StarMgr *_hip_stars) : hipStarMgr(_hip_stars), isolateSelected(false), flagConstellationPick(false), - constellationDisplayStyle(ConstellationMgr::Translated), + constellationDisplayStyle(StelObject::CulturalDisplayStyle::Translated), artFadeDuration(2.), artIntensity(0), artIntensityMinimumFov(1.0), @@ -107,7 +107,7 @@ void ConstellationMgr::init() qWarning() << "viewing/constellation_name_style (" << starloreDisplayStyle << ") invalid. Using translated style."; conf->setValue("viewing/constellation_name_style", "translated"); } - setConstellationDisplayStyle(ConstellationDisplayStyleMap.value(starloreDisplayStyle, Translated)); + setConstellationDisplayStyle(ConstellationDisplayStyleMap.value(starloreDisplayStyle, StelObject::CulturalDisplayStyle::Translated)); // Load colors from config file QString defaultColor = conf->value("color/default_color").toString(); @@ -391,19 +391,20 @@ int ConstellationMgr::getFontSize() const return asterFont.pixelSize(); } -void ConstellationMgr::setConstellationDisplayStyle(ConstellationDisplayStyle style) +void ConstellationMgr::setConstellationDisplayStyle(StelObject::CulturalDisplayStyle style) { + // TODO: Store this per-skyculture! Maybe open a new group in config.ini? constellationDisplayStyle=style; StelApp::immediateSave("viewing/constellation_name_style", ConstellationDisplayStyleMap.key(style)); emit constellationsDisplayStyleChanged(constellationDisplayStyle); } -QString ConstellationMgr::getConstellationDisplayStyleString(ConstellationDisplayStyle style) +QString ConstellationMgr::getConstellationDisplayStyleString(StelObject::CulturalDisplayStyle style) { - return (style == Abbreviated ? "abbreviated" : (style == Native ? "native" : "translated")); + return (style == StelObject::CulturalDisplayStyle::Abbreviated ? "abbreviated" : (style == StelObject::CulturalDisplayStyle::Native ? "native" : "translated")); } -ConstellationMgr::ConstellationDisplayStyle ConstellationMgr::getConstellationDisplayStyle() +StelObject::CulturalDisplayStyle ConstellationMgr::getConstellationDisplayStyle() { return constellationDisplayStyle; } @@ -1354,8 +1355,9 @@ Constellation* ConstellationMgr::isObjectIn(const StelObject *s) const return Q_NULLPTR; } -const QMapConstellationMgr::ConstellationDisplayStyleMap={ - { "translated", Translated}, - { "native", Native}, - { "abbreviated", Abbreviated}, - { "english", English}}; +// TODO: More to come. Probably move to StelObject! +const QMapConstellationMgr::ConstellationDisplayStyleMap={ + { "translated", StelObject::CulturalDisplayStyle::Translated}, + { "native", StelObject::CulturalDisplayStyle::Native}, + { "abbreviated", StelObject::CulturalDisplayStyle::Abbreviated}, + { "english", StelObject::CulturalDisplayStyle::Modern}}; diff --git a/src/core/modules/ConstellationMgr.hpp b/src/core/modules/ConstellationMgr.hpp index 55106406bc25e..14f1976f5e703 100644 --- a/src/core/modules/ConstellationMgr.hpp +++ b/src/core/modules/ConstellationMgr.hpp @@ -23,6 +23,7 @@ #include "StelObjectType.hpp" #include "StelObjectModule.hpp" +#include "StelObject.hpp" #include #include @@ -91,7 +92,7 @@ class ConstellationMgr : public StelObjectModule READ getFlagLabels WRITE setFlagLabels NOTIFY namesDisplayedChanged) - Q_PROPERTY(ConstellationDisplayStyle constellationDisplayStyle + Q_PROPERTY(StelObject::CulturalDisplayStyle constellationDisplayStyle READ getConstellationDisplayStyle WRITE setConstellationDisplayStyle NOTIFY constellationsDisplayStyleChanged) @@ -145,26 +146,18 @@ class ConstellationMgr : public StelObjectModule QStringList listAllObjects(bool inEnglish) const override; QString getName() const override { return "Constellations"; } QString getStelObjectType() const override; - //! Describes how to display constellation labels. The viewDialog GUI has a combobox which corresponds to these values. - //! TODO: Move to become SkycultureMgr::DisplayStyle? Then apply separately to Constellations and Planets, and whether applied to screen labels or infoString. - enum ConstellationDisplayStyle - { - Abbreviated = 0, // short label - Native = 1, // may show non-Latin glyphs - Translated = 2, // user language - English = 3, // Useful in case of adding names in modern English terminology (planets etc.). Maybe "Modern" would be better, and should show object scientific name in modern terminology, translated. - Translit = 4, // user-language transliteration/pronunciation aid - Native_Translit, // combinations: just help reading foreign glyphs. MORE OPTIONS POSSIBLE! - Native_Translit_Translated, // help reading foreign glyphs, show translations - Native_Translit_IPA_Translated, // help reading foreign glyphs, phonetics, show translations - Native_Translated, // glyphs + user language - Translit_Translated, // user language letters + translation - Translit_IPA_Translated, // user language letters, phonetic + translation - Translit_Translated_English, // user language letters + translation + English Name - Translit_IPA_Translated_English, // user language letters + translation + English Name - - }; - Q_ENUM(ConstellationDisplayStyle) + // Moved to become StelObject::CulturalDisplayStyle, Then apply maybe even separately to Constellations and Planets, and whether applied to screen labels or infoString. + // Describes how to display constellation labels. The viewDialog GUI has a combobox which corresponds to these values. + // TODO: This could of course become a bitfield, but having just discrete options may still be easier to maintain. + //enum ConstellationDisplayStyle + //{ + // Abbreviated = 0, // short label + // Native = 1, // may show non-Latin glyphs + // Translated = 2, // user language + // English = 3, // Useful in case of adding names in modern English terminology (planets etc.). Maybe "Modern" would be better, and should show object scientific name in modern terminology, translated. + // Pronounce = 4, // user-language transliteration/pronunciation aid. Usually the original form like pinyin is also used in users' languages, but it may be translatable to user language, e.g. for other coding system. + //}; + //Q_ENUM(ConstellationDisplayStyle) /////////////////////////////////////////////////////////////////////////// // Properties setters and getters @@ -266,12 +259,12 @@ public slots: //! Set the way how constellation names are displayed: abbreviated/as-given/translated //! @param style the new display style - void setConstellationDisplayStyle(ConstellationMgr::ConstellationDisplayStyle style); + void setConstellationDisplayStyle(StelObject::CulturalDisplayStyle style); //! get the way how constellation names are displayed: abbreviated/as-given/translated - ConstellationMgr::ConstellationDisplayStyle getConstellationDisplayStyle(); + StelObject::CulturalDisplayStyle getConstellationDisplayStyle(); //! Returns the currently set constellation display style as string, instead of enum //! @see getConstellationDisplayStyle() - static QString getConstellationDisplayStyleString(ConstellationMgr::ConstellationDisplayStyle style); + static QString getConstellationDisplayStyleString(StelObject::CulturalDisplayStyle style); //! Set the thickness of lines of the constellations //! @param thickness of line in pixels @@ -337,7 +330,7 @@ public slots: void linesDisplayedChanged(const bool displayed); void namesColorChanged(const Vec3f & color); void namesDisplayedChanged(const bool displayed); - void constellationsDisplayStyleChanged(const ConstellationMgr::ConstellationDisplayStyle style); + void constellationsDisplayStyleChanged(const StelObject::CulturalDisplayStyle style); void constellationLineThicknessChanged(int thickness); void constellationBoundariesThicknessChanged(int thickness); @@ -418,8 +411,8 @@ private slots: QStringList constellationsEnglishNames; //! this controls how constellations (and also star names) are printed: Abbreviated/as-given/translated - ConstellationDisplayStyle constellationDisplayStyle; - static const QMapConstellationDisplayStyleMap; + StelObject::CulturalDisplayStyle constellationDisplayStyle; + static const QMapConstellationDisplayStyleMap; // These are THE master settings - individual constellation settings can vary based on selection status float artFadeDuration; diff --git a/src/core/modules/StarMgr.cpp b/src/core/modules/StarMgr.cpp index 2d97a8ac79e89..e84a8b31649b1 100644 --- a/src/core/modules/StarMgr.cpp +++ b/src/core/modules/StarMgr.cpp @@ -190,7 +190,7 @@ StarMgr::~StarMgr(void) QString StarMgr::getCommonName(StarId hip) { ConstellationMgr* cmgr=GETSTELMODULE(ConstellationMgr); - if (cmgr->getConstellationDisplayStyle() == ConstellationMgr::Native) + if (cmgr->getConstellationDisplayStyle() == StelObject::CulturalDisplayStyle::Native) return getCommonEnglishName(hip); auto it = commonNamesMapI18n.find(hip); diff --git a/src/gui/ConfigurationDialog.cpp b/src/gui/ConfigurationDialog.cpp index 483b38b9c77a3..1aac5e88fc040 100644 --- a/src/gui/ConfigurationDialog.cpp +++ b/src/gui/ConfigurationDialog.cpp @@ -1053,7 +1053,7 @@ void ConfigurationDialog::saveAllSettings() conf->setValue("viewing/flag_light_pollution_database", propMgr->getStelPropertyValue("LandscapeMgr.flagUseLightPollutionFromDatabase").toBool()); conf->setValue("viewing/flag_environment_auto_enable", propMgr->getStelPropertyValue("LandscapeMgr.flagEnvironmentAutoEnabling").toBool()); conf->setValue("viewing/constellation_art_intensity", propMgr->getStelPropertyValue("ConstellationMgr.artIntensity").toFloat()); - conf->setValue("viewing/constellation_name_style", ConstellationMgr::getConstellationDisplayStyleString(static_cast (propMgr->getStelPropertyValue("ConstellationMgr.constellationDisplayStyle").toInt()) )); + conf->setValue("viewing/constellation_name_style", ConstellationMgr::getConstellationDisplayStyleString(static_cast (propMgr->getStelPropertyValue("ConstellationMgr.constellationDisplayStyle").toInt()) )); conf->setValue("viewing/constellation_line_thickness", propMgr->getStelPropertyValue("ConstellationMgr.constellationLineThickness").toInt()); conf->setValue("viewing/constellation_boundaries_thickness", propMgr->getStelPropertyValue("ConstellationMgr.constellationBoundariesThickness").toInt());