LandscapeMgr.hpp   LandscapeMgr.hpp 
skipping to change at line 69 skipping to change at line 69
//! Includes: //! Includes:
//! - Landscape, atmosphere and cardinal point on/off fading. //! - Landscape, atmosphere and cardinal point on/off fading.
//! - Atmophere colour calulation based on location, position of sun //! - Atmophere colour calulation based on location, position of sun
//! and moon. //! and moon.
//! - updates adaptation lumenescence lased on visible bright object s. //! - updates adaptation lumenescence lased on visible bright object s.
virtual void update(double deltaTime); virtual void update(double deltaTime);
//! Translate labels to new language settings. //! Translate labels to new language settings.
virtual void updateI18n(); virtual void updateI18n();
//! Called for all registered modules if the sky culture changes.
//! @param skyCultureDir the name of the directory containing the sk
y culture to use.
virtual void updateSkyCulture(const QString& skyCultureDir) {;}
//! Load a color scheme from a configuration object //! Load a color scheme from a configuration object
virtual void setStelStyle(const StelStyle& style); virtual void setStelStyle(const QString& section);
//! Get the order in which this module will draw it's objects relati ve to other modules. //! Get the order in which this module will draw it's objects relati ve 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, for being used e.g for se tting eye adaptation. //! Return the global landscape luminance, for being used e.g for se tting eye adaptation.
float getLuminance(void); float getLuminance();
//! 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 115 skipping to change at line 111
//! Retrieve list of the names of all the available landscape in the //! Retrieve list of the names of all the available landscape in the
//! file search path sub-directories of the landscape area //! 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 getAllLandscapeIDs() const; QStringList getAllLandscapeIDs() 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.
//! @param id the ID of the new landscape //! @param id the ID of the new landscape
//! @param inThread should be false when this is called from a scrip
t or a thread outside the main
//! program thread. Note that if inThread is false, the return valu
e will always be true. The
//! return value may be retrieved asynchronously by connecting the
//! requestCompleteSetCurrentLandscapeID signal to the calling code.
//! @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).
//! True on success or if inThread == false. bool setCurrentLandscapeID(const QString& id);
bool setCurrentLandscapeID(const QString& id, bool inThread=false);
//! 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.
//! @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 inThread should be false when this is called from a scrip bool setCurrentLandscapeName(const QString& name);
t or a thread outside the main
//! program thread. Note that if inThread is false, the return valu
e will always be true. The
//! return value may be retrieved asynchronously by connecting the
//! requestCompleteSetCurrentLandscapeID signal to the calling code.
//! @return false if the new landscape could not be set (e.g. no lan
dscape of that ID was found).
//! True on success or if inThread == false.
bool setCurrentLandscapeName(const QString& name, bool inThread=fals
e);
//! 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.
//! @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 formated string with all informations on th e current landscape //! Return a pseudo HTML formated string with all informations on th e current landscape
QString getCurrentLandscapeHtmlDescription() const; QString getCurrentLandscapeHtmlDescription() const;
skipping to change at line 182 skipping to change at line 168
void setFlagAtmosphere(bool b); void setFlagAtmosphere(bool b);
//! 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(float f); void setAtmosphereFadeDuration(float f);
//! Set the light pollution following the Bortle Scale //! Set the light pollution following the Bortle Scale
void setAtmosphereBortleLightPollution(int bIndex); void setAtmosphereBortleLightPollution(int bIndex);
//! Get the light pollution following the Bortle Scale //! Get the light pollution following the Bortle Scale
int getAtmosphereBortleLightPollution(void); int getAtmosphereBortleLightPollution();
//! 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(double d); void setZRotation(float d);
signals:
// used for multi-threaded mode callbacks
void requestSetCurrentLandscapeID(const QString& id);
void requestCompleteSetCurrentLandscapeID(bool success);
void requestSetCurrentLandscapeName(const QString& name);
void requestCompleteSetCurrentLandscapeName(bool success);
private slots:
// Callbacks for threaded mode landscape setting which use signals
//! Change the current landscape to the landscape with the ID specif
ied.
//! @param id the ID of the new landscape
//! @return false if the new landscape could not be set (e.g. no lan
dscape of that ID was found). True on success.
bool doSetCurrentLandscapeID(const QString& id);
//! Change the current landscape to the landscape with the name spec
ified.
//! @param name the name of the new landscape, as found in the lands
cape:name key of the landscape.ini file.
//! @return false if the new landscape could not be set (e.g. no lan
dscape of that name was found). True on success.
bool doSetCurrentLandscapeName(const QString& name);
private: private:
//! Get light pollution luminance level. //! Get light pollution luminance level.
double getAtmosphereLightPollutionLuminance() const; float getAtmosphereLightPollutionLuminance() const;
//! Set light pollution luminance level. //! Set light pollution luminance level.
void setAtmosphereLightPollutionLuminance(double f); void setAtmosphereLightPollutionLuminance(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); QString nameToID(const QString& name);
//! Create landscape from parameters passed in a hash.
//! This is similar in function to createFromFile, except the landsc
ape details
//! are passed in a hash rather than a ini parser object.
//! NOTE: maptex must be full path and filename
//! @param param an STL map of the keys and values which describe th
e landscape.
//! @return a pointer to the newly create landscape object.
Landscape* createFromHash(QMap<QString, QString>& param);
//! Return a map of landscape name to landscape ID (directory name). //! Return a map of landscape name to landscape ID (directory name).
QMap<QString,QString> getNameToDirMap(void) const; QMap<QString,QString> getNameToDirMap() 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"
// 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;
// The ID of the currently loaded landscape // The ID of the currently loaded landscape
QString currentLandscapeID; QString currentLandscapeID;
 End of changes. 12 change blocks. 
65 lines changed or deleted 10 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/