LandscapeMgr.hpp   LandscapeMgr.hpp 
skipping to change at line 64 skipping to change at line 64
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
READ getFlagLabels
WRITE setFlagLabels
NOTIFY labelsDisplayedChanged)
Q_PROPERTY(bool databaseUsage Q_PROPERTY(bool databaseUsage
READ getFlagUseLightPollutionFromDatabase READ getFlagUseLightPollutionFromDatabase
WRITE setFlagUseLightPollutionFromDatabase WRITE setFlagUseLightPollutionFromDatabase
NOTIFY lightPollutionUsageChanged) NOTIFY lightPollutionUsageChanged)
public: public:
LandscapeMgr(); LandscapeMgr();
virtual ~LandscapeMgr(); virtual ~LandscapeMgr();
//////////////////////////////////////////////////////////////////// /////// //////////////////////////////////////////////////////////////////// ///////
skipping to change at line 90 skipping to change at line 94
//! Draw the landscape graphics, cardinal points and atmosphere. //! Draw the landscape graphics, cardinal points and atmosphere.
virtual void draw(StelCore* core); virtual void draw(StelCore* core);
//! Update time-dependent state. //! Update time-dependent state.
//! Includes: //! Includes:
//! - Landscape, atmosphere and cardinal point on/off fading. //! - Landscape, atmosphere and cardinal point on/off fading.
//! - Atmophere colour calculation based on location, position of su n //! - Atmophere colour calculation based on location, position of su n
//! and moon. //! and moon.
//! - updates adaptation luminescence based on visible bright object s. //! - updates adaptation luminescence based on visible bright object s.
//! - Landscape and lightscape brightness computations based on sun position and whether atmosphere is on or off.
virtual void update(double deltaTime); virtual void update(double deltaTime);
//! Get the order in which this module will draw its objects relativ e to other modules. //! Get the order in which this module will draw its objects relativ e to other modules.
virtual double getCallOrder(StelModuleActionName actionName) const; virtual double getCallOrder(StelModuleActionName actionName) const;
//////////////////////////////////////////////////////////////////// /////// //////////////////////////////////////////////////////////////////// ///////
// Method specific to the landscape manager // Method specific to the landscape manager
//! Return the global landscape luminance [0..1], for being used e.g for setting eye adaptation. //! Return the global landscape luminance [0..1], for being used e.g for setting eye adaptation.
//! It returns 1 if atmosphere drawing is on and no eclipse underway , 0 if atmosphere is switched off. //! It returns 1 if atmosphere drawing is on and no eclipse underway , 0 if atmosphere is switched off.
//! The actual brightness is of no concern here. You may use getAtmo sphereAverageLuminance() for this. //! The actual brightness is of no concern here. You may use getAtmo sphereAverageLuminance() for this.
skipping to change at line 176 skipping to change at line 181
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;
//! Get flag for displaying Landscape. //! Get flag for displaying Landscape.
bool getFlagLandscape() const; bool getFlagLandscape() const;
//! Set flag for displaying Landscape. //! Set flag for displaying Landscape.
void setFlagLandscape(const bool displayed); void setFlagLandscape(const bool displayed);
//! Get whether the landscape is currently visible. If true, object below landscape must be rendered. //! Get whether the landscape is currently visible. If true, objects below landscape's limiting altitude limit can be omitted.
bool getIsLandscapeFullyVisible() const; bool getIsLandscapeFullyVisible() const;
//! Get the sine of current landscape's minimal altitude. Useful to
construct bounding caps.
float getLandscapeSinMinAltitudeLimit() const;
//! Get flag for displaying Fog. //! Get flag for displaying Fog.
bool getFlagFog() const; bool getFlagFog() const;
//! Set flag for displaying Fog. //! Set flag for displaying Fog.
void setFlagFog(const bool displayed); void setFlagFog(const bool displayed);
//! Get flag for displaying illumination layer //! Get flag for displaying illumination layer
bool getFlagIllumination() const; bool getFlagIllumination() const;
//! Set flag for displaying illumination layer //! Set flag for displaying illumination layer
void setFlagIllumination(const bool on); void setFlagIllumination(const bool on);
//! Get flag for displaying landscape labels
bool getFlagLabels() const;
//! Set flag for displaying landscape labels
void setFlagLabels(const bool on);
//! Return the value of the flag determining if a change of landscap e will update the observer location. //! Return the value of the flag determining if a change of landscap e will update the observer location.
bool getFlagLandscapeSetsLocation() const {return flagLandscapeSetsL ocation;} bool getFlagLandscapeSetsLocation() const {return flagLandscapeSetsL ocation;}
//! Set the value of the flag determining if a change of landscape w ill update the observer location. //! Set the value of the flag determining if a change of landscape w ill update the observer location.
void setFlagLandscapeSetsLocation(bool b) {flagLandscapeSetsLocation =b;} void setFlagLandscapeSetsLocation(bool b) {flagLandscapeSetsLocation =b;}
//! Return the value of the flag determining if a minimal brightness should be used to keep landscape visible. //! Return the value of the flag determining if a minimal brightness should be used to keep landscape visible.
bool getFlagLandscapeUseMinimalBrightness() const {return flagLandsc apeUseMinimalBrightness; } bool getFlagLandscapeUseMinimalBrightness() const {return flagLandsc apeUseMinimalBrightness; }
//! Set the value of the flag determining if a minimal brightness sh ould be used to keep landscape visible. //! Set the value of the flag determining if a minimal brightness sh ould be used to keep landscape visible.
void setFlagLandscapeUseMinimalBrightness(bool b) {flagLandscapeUseM inimalBrightness=b; } void setFlagLandscapeUseMinimalBrightness(bool b) {flagLandscapeUseM inimalBrightness=b; }
skipping to change at line 230 skipping to change at line 241
//! Get flag for displaying Atmosphere. //! Get flag for displaying Atmosphere.
bool getFlagAtmosphere() const; bool getFlagAtmosphere() const;
//! Set flag for displaying Atmosphere. //! Set flag for displaying Atmosphere.
void setFlagAtmosphere(const bool displayed); void setFlagAtmosphere(const bool displayed);
//! Get atmosphere fade duration in s. //! Get atmosphere fade duration in s.
float getAtmosphereFadeDuration() const; float getAtmosphereFadeDuration() const;
//! Set atmosphere fade duration in s. //! Set atmosphere fade duration in s.
void setAtmosphereFadeDuration(const float f); void setAtmosphereFadeDuration(const float f);
//! Set the light pollution following the Bortle Scale //! Set the light pollution following the Bortle Scale. Emits lightP ollutionChanged().
void setAtmosphereBortleLightPollution(const int bIndex); void setAtmosphereBortleLightPollution(const int bIndex);
//! Get the light pollution following the Bortle Scale //! Get the light pollution following the Bortle Scale
int getAtmosphereBortleLightPollution() const; int getAtmosphereBortleLightPollution() const;
//! Set the rotation of the landscape about the z-axis. //! Set the rotation of the landscape about the z-axis.
//! This is intended for special uses such as when the landscape con sists of //! This is intended for special uses such as when the landscape con sists of
//! a vehicle which might change orientation over time (e.g. a ship) . //! a vehicle which might change orientation over time (e.g. a ship) .
//! @param d the rotation angle in degrees as an offset from the ori ginally loaded value. //! @param d the rotation angle in degrees as an offset from the ori ginally loaded value.
void setZRotation(const float d); void setZRotation(const float d);
skipping to change at line 337 skipping to change at line 348
//! Forward opacity query to current landscape. //! Forward opacity query to current landscape.
//! @param azalt direction of view line to sample in azaltimuth coor dinates. //! @param azalt direction of view line to sample in azaltimuth coor dinates.
float getLandscapeOpacity(Vec3d azalt) const {return landscape->getO pacity(azalt);} float getLandscapeOpacity(Vec3d azalt) const {return landscape->getO pacity(azalt);}
signals: signals:
void atmosphereDisplayedChanged(const bool displayed); void atmosphereDisplayedChanged(const bool displayed);
void cardinalsPointsDisplayedChanged(const bool displayed); void cardinalsPointsDisplayedChanged(const bool displayed);
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 lightPollutionUsageChanged(const bool usage); void lightPollutionUsageChanged(const bool usage);
//! Emitted when a landscape has been installed or un-installed. //! Emitted when a landscape has been installed or un-installed.
//! For example, it is used to update the list of landscapes in //! For example, it is used to update the list of landscapes in
//! the Sky and viewing options window (the ViewDialog class) //! the Sky and viewing options window (the ViewDialog class)
void landscapesChanged(); void landscapesChanged();
//! emitted by setAtmosphereBortleLightPollution().
void lightPollutionChanged(); void lightPollutionChanged();
//! Emitted when installLandscapeFromArchive() can't read from, writ e to or //! Emitted when installLandscapeFromArchive() can't read from, writ e to or
//! create a file or a directory. //! create a file or a directory.
//! (A way of moving the need for translatable error messages to the GUI.) //! (A way of moving the need for translatable error messages to the GUI.)
//! \param path path to the file or directory //! \param path path to the file or directory
void errorUnableToOpen(QString path); void errorUnableToOpen(QString path);
//! Emitted when the file passed to installLandscapeFromArchive() is not a //! Emitted when the file passed to installLandscapeFromArchive() is not a
//! ZIP archive or does not contain a valid landscape. //! ZIP archive or does not contain a valid landscape.
//! (A way of moving the need for translatable error messages to the GUI.) //! (A way of moving the need for translatable error messages to the GUI.)
skipping to change at line 396 skipping to change at line 409
//! Returns the path to an installed landscape's directory. //! Returns the path to an installed landscape's directory.
//! It uses StelFileMgr to look for it in the possible directories. //! It uses StelFileMgr to look for it in the possible directories.
//! @param landscapeID an installed landscape's identifier (the fold er name) //! @param landscapeID an installed landscape's identifier (the fold er name)
//! @returns an empty string, if no such landscape was found. //! @returns an empty string, if no such landscape was found.
QString getLandscapePath(const QString landscapeID) const; QString getLandscapePath(const QString landscapeID) const;
Atmosphere* atmosphere; // Atmosphere Atmosphere* atmosphere; // Atmosphere
Cardinals* cardinalsPoints; // Cardinals points Cardinals* cardinalsPoints; // Cardinals points
Landscape* landscape; // The landscape i.e. the fo g, the ground and "decor" Landscape* landscape; // The landscape i.e. the fo g, the ground and "decor"
Landscape* oldLandscape; // Used only during transiti ons to newly loaded landscape.
// Define whether the observer location is to be updated when the la ndscape is updated. // Define whether the observer location is to be updated when the la ndscape is updated.
bool flagLandscapeSetsLocation; bool flagLandscapeSetsLocation;
bool flagLandscapeAutoSelection; bool flagLandscapeAutoSelection;
bool flagLightPollutionFromDatabase; bool flagLightPollutionFromDatabase;
//! Indicate use of the default minimal brightness value specified i n config.ini. //! Indicate use of the default minimal brightness value specified i n config.ini.
bool flagLandscapeUseMinimalBrightness; bool flagLandscapeUseMinimalBrightness;
skipping to change at line 421 skipping to change at line 435
bool flagAtmosphereAutoEnabling; bool flagAtmosphereAutoEnabling;
// The ID of the currently loaded landscape // The ID of the currently loaded landscape
QString currentLandscapeID; QString currentLandscapeID;
// The ID of the default landscape // The ID of the default landscape
QString defaultLandscapeID; QString defaultLandscapeID;
//! List of the IDs of the landscapes packaged by default with Stell arium. //! List of the IDs of the landscapes packaged by default with Stell arium.
//! (So that they can't be removed.) //! (So that they can't be removed.)
//! It is populated in LandscapeMgr() and has to be updated
//! manually on changes.
//! @todo Find a way to update it automatically.
QStringList packagedLandscapeIDs; QStringList packagedLandscapeIDs;
}; };
#endif // _LANDSCAPEMGR_HPP_ #endif // _LANDSCAPEMGR_HPP_
 End of changes. 10 change blocks. 
5 lines changed or deleted 17 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/