|
23 | 23 |
|
24 | 24 | #include "StelObjectType.hpp"
|
25 | 25 | #include "StelObjectModule.hpp"
|
| 26 | +#include "StelObject.hpp" |
26 | 27 |
|
27 | 28 | #include <vector>
|
28 | 29 | #include <QString>
|
@@ -91,7 +92,7 @@ class ConstellationMgr : public StelObjectModule
|
91 | 92 | READ getFlagLabels
|
92 | 93 | WRITE setFlagLabels
|
93 | 94 | NOTIFY namesDisplayedChanged)
|
94 |
| - Q_PROPERTY(ConstellationDisplayStyle constellationDisplayStyle |
| 95 | + Q_PROPERTY(StelObject::CulturalDisplayStyle constellationDisplayStyle |
95 | 96 | READ getConstellationDisplayStyle
|
96 | 97 | WRITE setConstellationDisplayStyle
|
97 | 98 | NOTIFY constellationsDisplayStyleChanged)
|
@@ -145,26 +146,18 @@ class ConstellationMgr : public StelObjectModule
|
145 | 146 | QStringList listAllObjects(bool inEnglish) const override;
|
146 | 147 | QString getName() const override { return "Constellations"; }
|
147 | 148 | QString getStelObjectType() const override;
|
148 |
| - //! Describes how to display constellation labels. The viewDialog GUI has a combobox which corresponds to these values. |
149 |
| - //! TODO: Move to become SkycultureMgr::DisplayStyle? Then apply separately to Constellations and Planets, and whether applied to screen labels or infoString. |
150 |
| - enum ConstellationDisplayStyle |
151 |
| - { |
152 |
| - Abbreviated = 0, // short label |
153 |
| - Native = 1, // may show non-Latin glyphs |
154 |
| - Translated = 2, // user language |
155 |
| - 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. |
156 |
| - Translit = 4, // user-language transliteration/pronunciation aid |
157 |
| - Native_Translit, // combinations: just help reading foreign glyphs. MORE OPTIONS POSSIBLE! |
158 |
| - Native_Translit_Translated, // help reading foreign glyphs, show translations |
159 |
| - Native_Translit_IPA_Translated, // help reading foreign glyphs, phonetics, show translations |
160 |
| - Native_Translated, // glyphs + user language |
161 |
| - Translit_Translated, // user language letters + translation |
162 |
| - Translit_IPA_Translated, // user language letters, phonetic + translation |
163 |
| - Translit_Translated_English, // user language letters + translation + English Name |
164 |
| - Translit_IPA_Translated_English, // user language letters + translation + English Name |
165 |
| - |
166 |
| - }; |
167 |
| - Q_ENUM(ConstellationDisplayStyle) |
| 149 | + // Moved to become StelObject::CulturalDisplayStyle, Then apply maybe even separately to Constellations and Planets, and whether applied to screen labels or infoString. |
| 150 | + // Describes how to display constellation labels. The viewDialog GUI has a combobox which corresponds to these values. |
| 151 | + // TODO: This could of course become a bitfield, but having just discrete options may still be easier to maintain. |
| 152 | + //enum ConstellationDisplayStyle |
| 153 | + //{ |
| 154 | + // Abbreviated = 0, // short label |
| 155 | + // Native = 1, // may show non-Latin glyphs |
| 156 | + // Translated = 2, // user language |
| 157 | + // 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. |
| 158 | + // 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. |
| 159 | + //}; |
| 160 | + //Q_ENUM(ConstellationDisplayStyle) |
168 | 161 |
|
169 | 162 | ///////////////////////////////////////////////////////////////////////////
|
170 | 163 | // Properties setters and getters
|
@@ -266,12 +259,12 @@ public slots:
|
266 | 259 |
|
267 | 260 | //! Set the way how constellation names are displayed: abbreviated/as-given/translated
|
268 | 261 | //! @param style the new display style
|
269 |
| - void setConstellationDisplayStyle(ConstellationMgr::ConstellationDisplayStyle style); |
| 262 | + void setConstellationDisplayStyle(StelObject::CulturalDisplayStyle style); |
270 | 263 | //! get the way how constellation names are displayed: abbreviated/as-given/translated
|
271 |
| - ConstellationMgr::ConstellationDisplayStyle getConstellationDisplayStyle(); |
| 264 | + StelObject::CulturalDisplayStyle getConstellationDisplayStyle(); |
272 | 265 | //! Returns the currently set constellation display style as string, instead of enum
|
273 | 266 | //! @see getConstellationDisplayStyle()
|
274 |
| - static QString getConstellationDisplayStyleString(ConstellationMgr::ConstellationDisplayStyle style); |
| 267 | + static QString getConstellationDisplayStyleString(StelObject::CulturalDisplayStyle style); |
275 | 268 |
|
276 | 269 | //! Set the thickness of lines of the constellations
|
277 | 270 | //! @param thickness of line in pixels
|
@@ -337,7 +330,7 @@ public slots:
|
337 | 330 | void linesDisplayedChanged(const bool displayed);
|
338 | 331 | void namesColorChanged(const Vec3f & color);
|
339 | 332 | void namesDisplayedChanged(const bool displayed);
|
340 |
| - void constellationsDisplayStyleChanged(const ConstellationMgr::ConstellationDisplayStyle style); |
| 333 | + void constellationsDisplayStyleChanged(const StelObject::CulturalDisplayStyle style); |
341 | 334 | void constellationLineThicknessChanged(int thickness);
|
342 | 335 | void constellationBoundariesThicknessChanged(int thickness);
|
343 | 336 |
|
@@ -418,8 +411,8 @@ private slots:
|
418 | 411 | QStringList constellationsEnglishNames;
|
419 | 412 |
|
420 | 413 | //! this controls how constellations (and also star names) are printed: Abbreviated/as-given/translated
|
421 |
| - ConstellationDisplayStyle constellationDisplayStyle; |
422 |
| - static const QMap<QString, ConstellationDisplayStyle>ConstellationDisplayStyleMap; |
| 414 | + StelObject::CulturalDisplayStyle constellationDisplayStyle; |
| 415 | + static const QMap<QString, StelObject::CulturalDisplayStyle>ConstellationDisplayStyleMap; |
423 | 416 |
|
424 | 417 | // These are THE master settings - individual constellation settings can vary based on selection status
|
425 | 418 | float artFadeDuration;
|
|
0 commit comments