LandscapeMgr.hpp   LandscapeMgr.hpp 
skipping to change at line 41 skipping to change at line 41
class Atmosphere; class Atmosphere;
class Cardinals; class Cardinals;
class QSettings; class QSettings;
//! @class LandscapeMgr //! @class LandscapeMgr
//! Manages all the rendering at the level of the observer's surroundings. //! Manages all the rendering at the level of the observer's surroundings.
//! This includes landscape textures, fog, atmosphere and cardinal points. //! This includes landscape textures, fog, atmosphere and cardinal points.
//! I decided to put all these elements together in a single class because they are //! I decided to put all these elements together in a single class because they are
//! inherently linked, especially when we start moving the observer in alti tude. //! inherently linked, especially when we start moving the observer in alti tude.
//! \note
//! The Bortle scale index setting was removed from this class, because it
was duplicated
//! from StelSkyDrawer, complicating code that changes it.
//! It is now only in StelSkyDrawer and can be accessed with
//! with \link StelSkyDrawer::getBortleScaleIndex getBortleScaleIndex \endl
ink
//! and \link StelSkyDrawer::setBortleScaleIndex setBortleScaleIndex \endli
nk.
//! Slots setAtmosphereBortleLightPollution and getAtmosphereBortleLightPol
lution
//! in this class have been removed/made private.
//! If script access is desired, use
//! \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
skipping to change at line 72 skipping to change at line 82
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
READ getFlagLandscapeAutoSelection
WRITE setFlagLandscapeAutoSelection
NOTIFY flagLandscapeAutoSelectionChanged)
Q_PROPERTY(bool flagLandscapeSetsLocation
READ getFlagLandscapeSetsLocation
WRITE setFlagLandscapeSetsLocation
NOTIFY flagLandscapeSetsLocationChanged
)
Q_PROPERTY(bool flagLandscapeUseMinimalBrightness
READ getFlagLandscapeUseMinimalBrightness
WRITE setFlagLandscapeUseMinimalBrightness
NOTIFY flagLandscapeUseMinimalBrightnessChanged
)
Q_PROPERTY(bool flagLandscapeSetsMinimalBrightness
READ getFlagLandscapeSetsMinimalBrightness
WRITE setFlagLandscapeSetsMinimalBrightness
NOTIFY flagLandscapeSetsMinimalBrightnessChanged
)
Q_PROPERTY(double defaultMinimalBrightness
READ getDefaultMinimalBrightness
WRITE setDefaultMinimalBrightness
NOTIFY defaultMinimalBrightnessChanged
)
Q_PROPERTY(bool flagAtmosphereAutoEnabling
READ getFlagAtmosphereAutoEnable
WRITE setFlagAtmosphereAutoEnable
NOTIFY setFlagAtmosphereAutoEnableChanged
)
Q_PROPERTY(QString currentLandscapeID
READ getCurrentLandscapeID
WRITE setCurrentLandscapeID
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 101 skipping to change at line 144
//! - 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. //! - 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 // Methods specific to the landscape manager
//! 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.
//! The actual brightness is of no concern here. You may use getAtmo
sphereAverageLuminance() for this.
float getLuminance() const;
//! return average luminance [cd/m^2] of atmosphere. Around 10 at su
nset, 6400 in daylight, >0 in dark night.
float getAtmosphereAverageLuminance() const;
//! Load a landscape based on a hash of parameters mirroring the lan dscape.ini //! Load a landscape based on a hash of parameters mirroring the lan dscape.ini
//! file and make it the current landscape. //! file and make it the current landscape.
bool loadLandscape(QMap<QString, QString>& param); bool loadLandscape(QMap<QString, QString>& param);
//! Create a new landscape from the files which describe it. //! Create a new landscape from the files which describe it.
//! Reads a landscape.ini file which is passed as the first paramete r, determines //! Reads a landscape.ini file which is passed as the first paramete r, determines
//! the landscape type, and creates a new object for the landscape o f the proper //! the landscape type, and creates a new object for the landscape o f the proper
//! type. The load member is then called, passing both parameters. //! type. The load member is then called, passing both parameters.
//! @param landscapeFile This is the path to a landscape.ini file. //! @param landscapeFile This is the path to a landscape.ini file.
skipping to change at line 129 skipping to change at line 166
//! directory in which the files (textures and so on) for the landsc ape reside. //! directory in which the files (textures and so on) for the landsc ape reside.
//! @return A pointer to the newly created landscape object. //! @return A pointer to the newly created landscape object.
Landscape* createFromFile(const QString& landscapeFile, const QStrin g& landscapeId); Landscape* createFromFile(const QString& landscapeFile, const QStrin g& landscapeId);
// GZ: implement StelModule's method. For test purposes only, we imp lement a manual transparency sampler. // GZ: implement StelModule's method. For test purposes only, we imp lement a manual transparency sampler.
// TODO: comment this away for final builds. Please leave it in unti l this feature is finished. // TODO: comment this away for final builds. Please leave it in unti l this feature is finished.
// virtual void handleMouseClicks(class QMouseEvent*); // virtual void handleMouseClicks(class QMouseEvent*);
public slots: public slots:
//////////////////////////////////////////////////////////////////// /////// //////////////////////////////////////////////////////////////////// ///////
// Methods callable from script and GUI // Methods callable from scripts and GUI
//! 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.
//! The actual brightness is of no concern here. You may use getAtmo
sphereAverageLuminance() for this.
float getLuminance() const;
//! return average luminance [cd/m^2] of atmosphere. Expect 10 at su
nset, 6400 in daylight, >0 in dark night.
float getAtmosphereAverageLuminance() const;
//! Override autocomputed value and set average luminance [cd/m^2] o
f atmosphere. This is around 10 at sunset, 6400 in daylight, >0 in dark ni
ght.
//! Usually there is no need to call this, the luminance is properly
computed. This is a function which can be
//! useful in rare cases, e.g. in scripts when you want to create im
ages of adjacent sky regions with the same brightness setting,
//! or for creation of a virtual camera which can deliberately show
over- or underexposure.
//! For these cases, it is advisable to first center the brightest l
uminary (sun or moon), call getAtmosphereAverageLuminance() and then set
//! this value explicitly to freeze it during image export. To unfre
eze, call this again with any negative value.
void setAtmosphereAverageLuminance(const float overrideLuminance);
//! Return a map of landscape name to landscape ID (directory name).
QMap<QString,QString> getNameToDirMap() const;
//! Retrieve a list of the names of all the available landscapes in //! Retrieve a list of the names of all the available landscapes in
//! the file search path sub-directories of the landscape area //! the file search path sub-directories of the landscape area
//! @return the names of the landscapes, which are the values of the name parameter in the landscape.ini files //! @return the names of the landscapes, which are the values of the name parameter in the landscape.ini files
QStringList getAllLandscapeNames() const; QStringList getAllLandscapeNames() const;
//! Retrieve a list of the identifiers of all the available landscap es in //! Retrieve a list of the identifiers of all the available landscap es in
//! 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 currentLandscap eID;}
//! 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)
//! @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)
//! @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 defaultLandscap eID;}
//! Change the default landscape to the landscape with the ID specif ied. //! Change the default landscape to the landscape with the ID specif ied.
skipping to change at line 202 skipping to change at line 259
//! 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 //! Get flag for displaying landscape labels
bool getFlagLabels() const; bool getFlagLabels() const;
//! Set flag for displaying landscape labels //! Set flag for displaying landscape labels
void setFlagLabels(const bool on); 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) {if(b!=flagLandscapeSetsLo cation){ flagLandscapeSetsLocation=b; emit flagLandscapeSetsLocationChanged (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) {if(b!=flagLandsca peUseMinimalBrightness){ flagLandscapeUseMinimalBrightness=b; emit flagLand scapeUseMinimalBrightnessChanged(b);}}
//! Return the value of the flag determining if the minimal brightne ss should be taken from landscape.ini //! Return the value of the flag determining if the minimal brightne ss should be taken from landscape.ini
bool getFlagLandscapeSetsMinimalBrightness() const {return flagLands capeSetsMinimalBrightness;} bool getFlagLandscapeSetsMinimalBrightness() const {return flagLands capeSetsMinimalBrightness;}
//! Sets the value of the flag determining if the minimal brightness should be taken from landscape.ini //! Sets the value of the flag determining if the minimal brightness should be taken from landscape.ini
void setFlagLandscapeSetsMinimalBrightness(bool b) {flagLandscapeSet sMinimalBrightness=b;} void setFlagLandscapeSetsMinimalBrightness(bool b) {if(b!=flagLandsc apeSetsMinimalBrightness){ flagLandscapeSetsMinimalBrightness=b; emit flagL andscapeSetsMinimalBrightnessChanged(b);}}
//! Return the minimal brightness value of the landscape //! Return the minimal brightness value of the landscape
double getDefaultMinimalBrightness() const {return defaultMinimalBri ghtness;} double getDefaultMinimalBrightness() const {return defaultMinimalBri ghtness;}
//! Set the minimal brightness value of the landscape. //! Set the minimal brightness value of the landscape.
void setDefaultMinimalBrightness(const double b) {defaultMinimalBrig htness=b;} void setDefaultMinimalBrightness(const double b) {if(b!=defaultMinim alBrightness){ defaultMinimalBrightness=b; emit defaultMinimalBrightnessCha nged(b);}}
//! Sets the value of the flag usage light pollution (and bortle ind ex) from locations database. //! Sets the value of the flag usage light pollution (and bortle ind ex) from locations database.
void setFlagUseLightPollutionFromDatabase(const bool usage); void setFlagUseLightPollutionFromDatabase(const bool usage);
//! Return the value of flag usage light pollution (and bortle index ) from locations database. //! Return the value of flag usage light pollution (and bortle index ) from locations database.
bool getFlagUseLightPollutionFromDatabase() const; bool getFlagUseLightPollutionFromDatabase() const;
//! Get flag for displaying Cardinals Points. //! Get flag for displaying Cardinals Points.
bool getFlagCardinalsPoints() const; bool getFlagCardinalsPoints() const;
//! Set flag for displaying Cardinals Points. //! Set flag for displaying Cardinals Points.
void setFlagCardinalsPoints(const bool displayed); void setFlagCardinalsPoints(const bool displayed);
skipping to change at line 241 skipping to change at line 298
//! 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. Emits lightP /*
ollutionChanged(). //This method has been removed, use StelSkyDrawer::getBortleScaleInd
void setAtmosphereBortleLightPollution(const int bIndex); ex instead, or StelMainScriptAPI::getBortleScaleIndex in scripts
//! Get the light pollution following the Bortle Scale //Also, if required, please use StelSkyDrawer::setBortleScaleIndex o
r StelMainScriptAPI::setBortleScaleIndex instead of LandscapeMgr::setAtmosp
hereBortleLightPollution
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);
//! Install a landscape from a ZIP archive. //! Install a landscape from a ZIP archive.
//! This function searches for a file named "landscape.ini" in the r oot //! This function searches for a file named "landscape.ini" in the r oot
//! directory of the archive. If it is not found there, the function //! directory of the archive. If it is not found there, the function
skipping to change at line 341 skipping to change at line 399
void setFlagLandscapeAutoSelection(bool enableAutoSelect); void setFlagLandscapeAutoSelection(bool enableAutoSelect);
//! Get flag for auto-enable of atmospheres for planets. //! Get flag for auto-enable of atmospheres for planets.
bool getFlagAtmosphereAutoEnable() const; bool getFlagAtmosphereAutoEnable() const;
//! Set flag for auto-enable atmosphere for planets with atmospheres in location window //! Set flag for auto-enable atmosphere for planets with atmospheres in location window
void setFlagAtmosphereAutoEnable(bool b); void setFlagAtmosphereAutoEnable(bool b);
//! 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);}
// This variant is required for scripting!
float getLandscapeOpacity(Vec3f azalt) const {return landscape->getO
pacity(Vec3d(azalt[0], azalt[1], azalt[2]));}
//! Forward opacity query to current landscape. //! Forward opacity query to current landscape.
//! @param azimuth in degrees //! @param azimuth in degrees
//! @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 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 flagLandscapeSetsLocationChanged(const bool value);
void flagLandscapeUseMinimalBrightnessChanged(const bool value);
void flagLandscapeSetsMinimalBrightnessChanged(const bool value);
void defaultMinimalBrightnessChanged(const double value);
void setFlagAtmosphereAutoEnableChanged(const bool enabled);
//! Emitted whenever the default landscape is changed
//! @param id the landscape id of the new default landscape
void defaultLandscapeChanged(const QString& id);
//! 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();
//! 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.)
void errorNotArchive(); void errorNotArchive();
//! Emitted when installLandscapeFromArchive() tries to install a la ndscape //! Emitted when installLandscapeFromArchive() tries to install a la ndscape
//! with the same name or identifier as an already installed one. //! with the same name or identifier as an already installed one.
//! (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 nameOrID the name or the identifier of the landscape //! \param nameOrID the name or the identifier of the landscape
void errorNotUnique(QString nameOrID); void errorNotUnique(QString nameOrID);
//! Emitted when removeLandscape() is unable to remove all the files of //! Emitted when removeLandscape() is unable to remove all the files of
//! a landscape. //! a 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.)
//! \param path the path to the landscape's directory //! \param path the path to the landscape's directory
void errorRemoveManually(QString path); void errorRemoveManually(QString path);
//! Emitted when the current landscape was changed
//! \param currentLandscapeID the ID of the new landscape
//! \param currentLandscapeName the name of the new landscape
void currentLandscapeChanged(QString currentLandscapeID,QString curr
entLandscapeName);
private slots: private slots:
//! Load a color scheme from a configuration object //! Set the light pollution following the Bortle Scale.
void setStelStyle(const QString& section); //! This should not be called from script code, use StelMainScriptAP
I::setBortleScaleIndex if you want to change the light pollution.
void setAtmosphereBortleLightPollution(const int bIndex);
//! Reacts to StelCore::locationChanged, and changes the light pollu
tion if the flagLightPollutionFromDatabase is true
void updateLocationBasedPollution(StelLocation loc);
//! Translate labels to new language settings. //! Translate labels to new language settings.
void updateI18n(); void updateI18n();
private: private:
//! Get light pollution luminance level. //! Get light pollution luminance level.
float getAtmosphereLightPollutionLuminance() const; float getAtmosphereLightPollutionLuminance() const;
//! Set light pollution luminance level. //! Set light pollution luminance level.
void setAtmosphereLightPollutionLuminance(const float f); void setAtmosphereLightPollutionLuminance(const float f);
//! For a given landscape name, return the landscape ID. //! For a given landscape name, return the landscape ID.
//! This takes a name of the landscape, as described in the landscap e:name item in the //! This takes a name of the landscape, as described in the landscap e:name item in the
//! landscape.ini, and returns the landscape ID which corresponds to that name. //! landscape.ini, and returns the landscape ID which corresponds to that name.
QString nameToID(const QString& name) const; QString nameToID(const QString& name) const;
//! Return a map of landscape name to landscape ID (directory name).
QMap<QString,QString> getNameToDirMap() const;
//! 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. Landscape* oldLandscape; // Used only during transiti ons to newly loaded landscape.
skipping to change at line 429 skipping to change at line 502
// 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;
//! A minimal brightness value to keep landscape visible. //! A minimal brightness value to keep landscape visible.
float defaultMinimalBrightness; double defaultMinimalBrightness;
//! Indicate use of the minimal brightness value specified in the cu rrent landscape.ini, if present. //! Indicate use of the minimal brightness value specified in the cu rrent landscape.ini, if present.
bool flagLandscapeSetsMinimalBrightness; bool flagLandscapeSetsMinimalBrightness;
//! Indicate auto-enable atmosphere for planets with atmospheres in location window //! Indicate auto-enable atmosphere for planets with atmospheres in location window
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;
 End of changes. 19 change blocks. 
30 lines changed or deleted 122 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/