LandscapeMgr.hpp   LandscapeMgr.hpp 
skipping to change at line 27 skipping to change at line 27
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA. * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
*/ */
#ifndef _LANDSCAPEMGR_HPP_ #ifndef _LANDSCAPEMGR_HPP_
#define _LANDSCAPEMGR_HPP_ #define _LANDSCAPEMGR_HPP_
#include "StelModule.hpp" #include "StelModule.hpp"
#include "StelUtils.hpp" #include "StelUtils.hpp"
#include "Landscape.hpp"
#include <QMap> #include <QMap>
#include <QStringList> #include <QStringList>
class Landscape;
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.
class LandscapeMgr : public StelModule class LandscapeMgr : public StelModule
skipping to change at line 119 skipping to change at line 119
//! 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.
//! @param landscapeId This is the landscape ID, which is also the n ame of the //! @param landscapeId This is the landscape ID, which is also the n ame of the
//! 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 // 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 script and GUI
//! 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;
skipping to change at line 144 skipping to change at line 144
//! 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.
//! @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
//! @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); 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.
//! @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.
bool setCurrentLandscapeName(const QString& name); //! @param changeLocationDuration the duration of the transition ani
mation
bool setCurrentLandscapeName(const QString& name, const double chang
eLocationDuration = 1.0);
//! Get the current landscape object.
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.
//! @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;
skipping to change at line 322 skipping to change at line 327
//! Get flag for autoselect of landscapes for planets. //! Get flag for autoselect of landscapes for planets.
bool getFlagLandscapeAutoSelection() const; bool getFlagLandscapeAutoSelection() const;
//! Set flag for autoselect of landscapes for planets. //! Set flag for autoselect of landscapes for planets.
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.
//! @param azalt direction of view line to sample in azaltimuth coor
dinates.
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 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
 End of changes. 7 change blocks. 
4 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/