LandscapeMgr.hpp   LandscapeMgr.hpp 
skipping to change at line 55 skipping to change at line 55
//! with \link StelSkyDrawer::getBortleScaleIndex getBortleScaleIndex \endl ink //! with \link StelSkyDrawer::getBortleScaleIndex getBortleScaleIndex \endl ink
//! and \link StelSkyDrawer::setBortleScaleIndex setBortleScaleIndex \endli nk. //! and \link StelSkyDrawer::setBortleScaleIndex setBortleScaleIndex \endli nk.
//! Slots setAtmosphereBortleLightPollution and getAtmosphereBortleLightPol lution //! Slots setAtmosphereBortleLightPollution and getAtmosphereBortleLightPol lution
//! in this class have been removed/made private. //! in this class have been removed/made private.
//! If script access is desired, use //! If script access is desired, use
//! \link StelMainScriptAPI::getBortleScaleIndex StelMainScriptAPI::get \en dlink/\link StelMainScriptAPI::setBortleScaleIndex setBortleScaleIndex \end link //! \link StelMainScriptAPI::getBortleScaleIndex StelMainScriptAPI::get \en dlink/\link StelMainScriptAPI::setBortleScaleIndex setBortleScaleIndex \end link
class LandscapeMgr : public StelModule class LandscapeMgr : public StelModule
{ {
Q_OBJECT Q_OBJECT
Q_PROPERTY(bool atmosphereDisplayed Q_PROPERTY(bool atmosphereDisplayed
READ getFlagAtmosphere READ getFlagAtmosphere
WRITE setFlagAtmosphere WRITE setFlagAtmosphere
NOTIFY atmosphereDisplayedChanged) NOTIFY atmosphereDisplayedChanged)
Q_PROPERTY(bool cardinalsPointsDisplayed Q_PROPERTY(bool cardinalsPointsDisplayed
READ getFlagCardinalsPoints READ getFlagCardinalsPoints
WRITE setFlagCardinalsPoints WRITE setFlagCardinalsPoints
NOTIFY cardinalsPointsDisplayedChanged) NOTIFY cardinalsPointsDisplayedChanged)
Q_PROPERTY(Vec3f cardinalsPointsColor
READ getColorCardinalPoints
WRITE setColorCardinalPoints
NOTIFY cardinalsPointsColorChanged)
Q_PROPERTY(bool fogDisplayed Q_PROPERTY(bool fogDisplayed
READ getFlagFog READ getFlagFog
WRITE setFlagFog WRITE setFlagFog
NOTIFY fogDisplayedChanged) NOTIFY fogDisplayedChanged)
Q_PROPERTY(bool landscapeDisplayed Q_PROPERTY(bool landscapeDisplayed
READ getFlagLandscape READ getFlagLandscape
WRITE setFlagLandscape WRITE setFlagLandscape
NOTIFY landscapeDisplayedChanged) NOTIFY landscapeDisplayedChanged)
Q_PROPERTY(bool illuminationDisplayed Q_PROPERTY(bool illuminationDisplayed
READ getFlagIllumination READ getFlagIllumination
WRITE setFlagIllumination WRITE setFlagIllumination
NOTIFY illuminationDisplayedChanged) NOTIFY illuminationDisplayedChanged)
Q_PROPERTY(bool labelsDisplayed Q_PROPERTY(bool labelsDisplayed
READ getFlagLabels READ getFlagLabels
WRITE setFlagLabels WRITE setFlagLabels
NOTIFY labelsDisplayedChanged) NOTIFY labelsDisplayedChanged)
Q_PROPERTY(bool databaseUsage Q_PROPERTY(bool databaseUsage
READ getFlagUseLightPollutionFromDatabase READ getFlagUseLightPollutionFromDatabase
WRITE setFlagUseLightPollutionFromDatabase WRITE setFlagUseLightPollutionFromDatabase
NOTIFY lightPollutionUsageChanged) NOTIFY lightPollutionUsageChanged)
Q_PROPERTY(bool flagLandscapeAutoSelection Q_PROPERTY(bool flagLandscapeAutoSelection
READ getFlagLandscapeAutoSelection READ getFlagLandscapeAutoSelection
WRITE setFlagLandscapeAutoSelection WRITE setFlagLandscapeAutoSelection
NOTIFY flagLandscapeAutoSelectionChanged) NOTIFY flagLandscapeAutoSelectionChanged)
Q_PROPERTY(bool flagLandscapeSetsLocation Q_PROPERTY(bool flagLandscapeSetsLocation
READ getFlagLandscapeSetsLocation READ getFlagLandscapeSetsLocation
WRITE setFlagLandscapeSetsLocation WRITE setFlagLandscapeSetsLocation
NOTIFY flagLandscapeSetsLocationChanged NOTIFY flagLandscapeSetsLocationChanged)
)
Q_PROPERTY(bool flagLandscapeUseMinimalBrightness Q_PROPERTY(bool flagLandscapeUseMinimalBrightness
READ getFlagLandscapeUseMinimalBrightness READ getFlagLandscapeUseMinimalBrightness
WRITE setFlagLandscapeUseMinimalBrightness WRITE setFlagLandscapeUseMinimalBrightness
NOTIFY flagLandscapeUseMinimalBrightnessChanged NOTIFY flagLandscapeUseMinimalBrightnessChanged)
)
Q_PROPERTY(bool flagLandscapeSetsMinimalBrightness Q_PROPERTY(bool flagLandscapeSetsMinimalBrightness
READ getFlagLandscapeSetsMinimalBrightness READ getFlagLandscapeSetsMinimalBrightness
WRITE setFlagLandscapeSetsMinimalBrightness WRITE setFlagLandscapeSetsMinimalBrightness
NOTIFY flagLandscapeSetsMinimalBrightnessChanged NOTIFY flagLandscapeSetsMinimalBrightnessChanged)
)
Q_PROPERTY(double defaultMinimalBrightness Q_PROPERTY(double defaultMinimalBrightness
READ getDefaultMinimalBrightness READ getDefaultMinimalBrightness
WRITE setDefaultMinimalBrightness WRITE setDefaultMinimalBrightness
NOTIFY defaultMinimalBrightnessChanged NOTIFY defaultMinimalBrightnessChanged)
)
Q_PROPERTY(bool flagAtmosphereAutoEnabling Q_PROPERTY(bool flagAtmosphereAutoEnabling
READ getFlagAtmosphereAutoEnable READ getFlagAtmosphereAutoEnable
WRITE setFlagAtmosphereAutoEnable WRITE setFlagAtmosphereAutoEnable
NOTIFY setFlagAtmosphereAutoEnableChanged NOTIFY setFlagAtmosphereAutoEnableChanged)
)
Q_PROPERTY(QString currentLandscapeID Q_PROPERTY(QString currentLandscapeID
READ getCurrentLandscapeID READ getCurrentLandscapeID
WRITE setCurrentLandscapeID WRITE setCurrentLandscapeID
NOTIFY currentLandscapeChanged NOTIFY currentLandscapeChanged)
)
public: public:
LandscapeMgr(); LandscapeMgr();
virtual ~LandscapeMgr(); virtual ~LandscapeMgr();
//////////////////////////////////////////////////////////////////// /////// //////////////////////////////////////////////////////////////////// ///////
// Methods defined in the StelModule class // Methods defined in the StelModule class
//! Initialize the LandscapeManager class. //! Initialize the LandscapeManager class.
//! Operations performed: //! Operations performed:
//! - Load the default landscape as specified in the application con figuration //! - Load the default landscape as specified in the application con figuration
//! - Set up landscape-related display flags from ini parser object //! - Set up landscape-related display flags from ini parser object
skipping to change at line 201 skipping to change at line 199
//! the file search path sub-directories of the landscape area //! the file search path sub-directories of the landscape area
//! @return the identifiers of the landscapes, which are the names o f the directories containing the landscapes' files //! @return the identifiers of the landscapes, which are the names o f the directories containing the landscapes' files
QStringList getAllLandscapeIDs() const; QStringList getAllLandscapeIDs() const;
//! Retrieve a list of the identifiers of all user-installed landsca pes. //! Retrieve a list of the identifiers of all user-installed landsca pes.
//! Effectively, this returns the results of getAllLandscapeIDs() wi thout //! Effectively, this returns the results of getAllLandscapeIDs() wi thout
//! the landscapes specified in the #packagedLandscapeIDs list. //! the landscapes specified in the #packagedLandscapeIDs list.
QStringList getUserLandscapeIDs() const; QStringList getUserLandscapeIDs() const;
//! Get the current landscape ID. //! Get the current landscape ID.
const QString& getCurrentLandscapeID() const {return currentLandscap eID;} const QString getCurrentLandscapeID() const {return currentLandscape ID;}
//! Change the current landscape to the landscape with the ID specif ied. //! Change the current landscape to the landscape with the ID specif ied.
//! Emits currentLandscapeChanged() if the landscape changed (true r eturned) //! Emits currentLandscapeChanged() if the landscape changed (true r eturned)
//! @param id the ID of the new landscape //! @param id the ID of the new landscape
//! @param changeLocationDuration the duration of the transition ani mation //! @param changeLocationDuration the duration of the transition ani mation
//! @return false if the new landscape could not be set (e.g. no lan dscape of that ID was found). //! @return false if the new landscape could not be set (e.g. no lan dscape of that ID was found).
bool setCurrentLandscapeID(const QString& id, const double changeLoc ationDuration = 1.0); bool setCurrentLandscapeID(const QString& id, const double changeLoc ationDuration = 1.0);
//! Get the current landscape name. //! Get the current landscape name.
QString getCurrentLandscapeName() const; QString getCurrentLandscapeName() const;
//! Change the current landscape to the landscape with the name spec ified. //! Change the current landscape to the landscape with the name spec ified.
//! Emits currentLandscapeChanged() if the landscape changed (true r eturned) //! Emits currentLandscapeChanged() if the landscape changed (true r eturned)
//! @param name the name of the new landscape, as found in the lands cape:name key of the landscape.ini file. //! @param name the name of the new landscape, as found in the lands cape:name key of the landscape.ini file.
//! @param changeLocationDuration the duration of the transition ani mation //! @param changeLocationDuration the duration of the transition ani mation
bool setCurrentLandscapeName(const QString& name, const double chang eLocationDuration = 1.0); bool setCurrentLandscapeName(const QString& name, const double chang eLocationDuration = 1.0);
//! Get the current landscape object. //! Get the current landscape object.
Landscape* getCurrentLandscape() const { return landscape; } Landscape* getCurrentLandscape() const { return landscape; }
//! Get the default landscape ID. //! Get the default landscape ID.
const QString& getDefaultLandscapeID() const {return defaultLandscap eID;} const QString getDefaultLandscapeID() const {return defaultLandscape ID;}
//! Change the default landscape to the landscape with the ID specif ied. //! Change the default landscape to the landscape with the ID specif ied.
//! @param id the ID of the landscape to use by default //! @param id the ID of the landscape to use by default
//! @return false if the new landscape could not be set (e.g. no lan dscape of that ID was found). True on success. //! @return false if the new landscape could not be set (e.g. no lan dscape of that ID was found). True on success.
bool setDefaultLandscapeID(const QString& id); bool setDefaultLandscapeID(const QString& id);
//! Return a pseudo HTML formatted string with all informations on t he current landscape //! Return a pseudo HTML formatted string with all informations on t he current landscape
QString getCurrentLandscapeHtmlDescription() const; QString getCurrentLandscapeHtmlDescription() const;
//! Return a pseudo HTML formatted string with information from desc ription or ini file //! Return a pseudo HTML formatted string with information from desc ription or ini file
QString getDescription() const; QString getDescription() const;
skipping to change at line 413 skipping to change at line 411
//! @param altitude in degrees //! @param altitude in degrees
float getLandscapeOpacity(float azimuth, float altitude) const { float getLandscapeOpacity(float azimuth, float altitude) const {
Vec3d azalt; Vec3d azalt;
StelUtils::spheToRect((180.0f-azimuth)*M_PI/180.0, altitude* M_PI/180.0, azalt); StelUtils::spheToRect((180.0f-azimuth)*M_PI/180.0, altitude* M_PI/180.0, azalt);
return landscape->getOpacity(azalt); return landscape->getOpacity(azalt);
} }
signals: signals:
void atmosphereDisplayedChanged(const bool displayed); void atmosphereDisplayedChanged(const bool displayed);
void cardinalsPointsDisplayedChanged(const bool displayed); void cardinalsPointsDisplayedChanged(const bool displayed);
void cardinalsPointsColorChanged(const Vec3f & newColor) const;
void fogDisplayedChanged(const bool displayed); void fogDisplayedChanged(const bool displayed);
void landscapeDisplayedChanged(const bool displayed); void landscapeDisplayedChanged(const bool displayed);
void illuminationDisplayedChanged(const bool displayed); void illuminationDisplayedChanged(const bool displayed);
void labelsDisplayedChanged(const bool displayed); void labelsDisplayedChanged(const bool displayed);
void lightPollutionUsageChanged(const bool usage); void lightPollutionUsageChanged(const bool usage);
void flagLandscapeAutoSelectionChanged(const bool value); void flagLandscapeAutoSelectionChanged(const bool value);
void flagLandscapeSetsLocationChanged(const bool value); void flagLandscapeSetsLocationChanged(const bool value);
void flagLandscapeUseMinimalBrightnessChanged(const bool value); void flagLandscapeUseMinimalBrightnessChanged(const bool value);
void flagLandscapeSetsMinimalBrightnessChanged(const bool value); void flagLandscapeSetsMinimalBrightnessChanged(const bool value);
void defaultMinimalBrightnessChanged(const double value); void defaultMinimalBrightnessChanged(const double value);
 End of changes. 16 change blocks. 
35 lines changed or deleted 34 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/