diff --git a/src/core/modules/AtmosphereShowMySky.cpp b/src/core/modules/AtmosphereShowMySky.cpp index 01edb91bdba1b..946c90dc09f63 100644 --- a/src/core/modules/AtmosphereShowMySky.cpp +++ b/src/core/modules/AtmosphereShowMySky.cpp @@ -98,6 +98,7 @@ struct SkySettings : ShowMySky::Settings, QObject static constexpr const char* zeroOrderScatteringPropName() { return "LandscapeMgr.flagAtmosphereZeroOrderScattering"; } static constexpr const char* singleScatteringPropName() { return "LandscapeMgr.flagAtmosphereSingleScattering"; } static constexpr const char* multipleScatteringPropName() { return "LandscapeMgr.flagAtmosphereMultipleScattering"; } + static constexpr const char* pseudoMirrorPropName() { return "LandscapeMgr.flagAtmospherePseudoMirror"; } bool inited=false; // We have to lazy initialize because at the time of construction, LandscapeMgr isn't registered with StelPropertyMgr void init() { @@ -119,6 +120,11 @@ struct SkySettings : ShowMySky::Settings, QObject QObject::connect(prop, &StelProperty::changed, this, [this](const QVariant& v) { multipleScatteringEnabled_=v.toBool(); }); multipleScatteringEnabled_ = prop->getValue().toBool(); } + { + const auto prop = propMan->getProperty(pseudoMirrorPropName()); + QObject::connect(prop, &StelProperty::changed, this, [this](const QVariant& v) { pseudoMirrorEnabled_=v.toBool(); }); + pseudoMirrorEnabled_ = prop->getValue().toBool(); + } inited=true; } }; diff --git a/src/core/modules/LandscapeMgr.cpp b/src/core/modules/LandscapeMgr.cpp index 6add0263f7f12..d7a4266f7329a 100644 --- a/src/core/modules/LandscapeMgr.cpp +++ b/src/core/modules/LandscapeMgr.cpp @@ -1768,6 +1768,12 @@ void LandscapeMgr::setFlagAtmosphereMultipleScattering(const bool enable) emit flagAtmosphereMultipleScatteringChanged(enable); } +void LandscapeMgr::setFlagAtmospherePseudoMirror(const bool enable) +{ + atmospherePseudoMirrorEnabled=enable; + emit flagAtmospherePseudoMirrorChanged(enable); +} + void LandscapeMgr::setAtmosphereEclipseSimulationQuality(const int quality) { if(getAtmosphereEclipseSimulationQuality() == quality) @@ -1843,6 +1849,11 @@ bool LandscapeMgr::getFlagAtmosphereMultipleScattering() const return atmosphereMultipleScatteringEnabled; } +bool LandscapeMgr::getFlagAtmospherePseudoMirror() const +{ + return atmospherePseudoMirrorEnabled; +} + int LandscapeMgr::getAtmosphereEclipseSimulationQuality() const { const auto conf=StelApp::getInstance().getSettings(); diff --git a/src/core/modules/LandscapeMgr.hpp b/src/core/modules/LandscapeMgr.hpp index d383e837ee320..1e3f3652b7898 100644 --- a/src/core/modules/LandscapeMgr.hpp +++ b/src/core/modules/LandscapeMgr.hpp @@ -175,6 +175,10 @@ class LandscapeMgr : public StelModule READ getFlagAtmosphereMultipleScattering WRITE setFlagAtmosphereMultipleScattering NOTIFY flagAtmosphereMultipleScatteringChanged) + Q_PROPERTY(bool flagAtmospherePseudoMirror + READ getFlagAtmospherePseudoMirror + WRITE setFlagAtmospherePseudoMirror + NOTIFY flagAtmospherePseudoMirrorChanged) Q_PROPERTY(int atmosphereEclipseSimulationQuality READ getAtmosphereEclipseSimulationQuality WRITE setAtmosphereEclipseSimulationQuality @@ -567,6 +571,9 @@ public slots: bool getFlagAtmosphereMultipleScattering() const; void setFlagAtmosphereMultipleScattering(bool enable); + bool getFlagAtmospherePseudoMirror() const; + void setFlagAtmospherePseudoMirror(bool enable); + int getAtmosphereEclipseSimulationQuality() const; void setAtmosphereEclipseSimulationQuality(int quality); @@ -718,6 +725,7 @@ public slots: void flagAtmosphereZeroOrderScatteringChanged(bool value); void flagAtmosphereSingleScatteringChanged(bool value); void flagAtmosphereMultipleScatteringChanged(bool value); + void flagAtmospherePseudoMirrorChanged(bool value); void atmosphereEclipseSimulationQualityChanged(unsigned quality); void atmosphereNoScatterChanged(const bool noScatter); void cardinalPointsDisplayedChanged(const bool displayed); @@ -883,6 +891,7 @@ private slots: bool atmosphereZeroOrderScatteringEnabled=false; bool atmosphereSingleScatteringEnabled=true; bool atmosphereMultipleScatteringEnabled=true; + bool atmospherePseudoMirrorEnabled=true; QString atmosphereShowMySkyStatusText; bool atmosphereShowMySkyStoppedWithError=false; diff --git a/src/gui/AtmosphereDialog.cpp b/src/gui/AtmosphereDialog.cpp index 98e6e0359d9b1..5740b3c377003 100644 --- a/src/gui/AtmosphereDialog.cpp +++ b/src/gui/AtmosphereDialog.cpp @@ -108,6 +108,7 @@ void AtmosphereDialog::createDialogContent() connectBoolProperty(ui->showMySky_zeroOrderEnabled, "LandscapeMgr.flagAtmosphereZeroOrderScattering"); connectBoolProperty(ui->showMySky_singleScatteringEnabled, "LandscapeMgr.flagAtmosphereSingleScattering"); connectBoolProperty(ui->showMySky_multipleScatteringEnabled, "LandscapeMgr.flagAtmosphereMultipleScattering"); + connectBoolProperty(ui->showMySky_pseudoMirrorEnabled, "LandscapeMgr.flagAtmospherePseudoMirror"); connectIntProperty(ui->showMySky_eclipseSimulationQualitySpinBox, ECLIPSE_SIM_QUALITY_PROPERTY); #else ui->visualModelConfigGroup->hide(); diff --git a/src/gui/atmosphereDialog.ui b/src/gui/atmosphereDialog.ui index a869eb30a905e..fb698701a4916 100644 --- a/src/gui/atmosphereDialog.ui +++ b/src/gui/atmosphereDialog.ui @@ -238,6 +238,13 @@ + + + + Mirror the sky under the horizon + + + @@ -434,11 +441,6 @@
Dialog.hpp
1 - - StelCloseButton - QPushButton -
gui/StelCloseButton.hpp
-
atmosphereModel