LandscapeMgr.hpp   LandscapeMgr.hpp 
/* /*
* Stellarium * Stellarium
* Copyright (C) 2006 Fabien Chereau * Copyright (C) 2006 Fabien Chereau
* Copyright (C) 2010 Bogdan Marinov (add/remove landscapes feature) * Copyright (C) 2010 Bogdan Marinov (add/remove landscapes feature)
* Copyright (C) 2012 Timothy Reaves
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, U SA. * 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 <QMap> #include <QMap>
#include <QStringList> #include <QStringList>
skipping to change at line 43 skipping to change at line 44
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
{ {
Q_OBJECT Q_OBJECT
Q_PROPERTY(bool atmosphereDisplayed
READ getFlagAtmosphere
WRITE setFlagAtmosphere
NOTIFY atmosphereDisplayedChanged)
Q_PROPERTY(bool cardinalsPointsDisplayed
READ getFlagCardinalsPoints
WRITE setFlagCardinalsPoints
NOTIFY cardinalsPointsDisplayedChanged)
Q_PROPERTY(bool fogDisplayed
READ getFlagFog
WRITE setFlagFog
NOTIFY fogDisplayedChanged)
Q_PROPERTY(bool landscapeDisplayed
READ getFlagLandscape
WRITE setFlagLandscape
NOTIFY landscapeDisplayedChanged)
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
skipping to change at line 136 skipping to change at line 153
//! 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;
//! Return a pseudo HTML formated string with information from descr iption or ini file //! Return a pseudo HTML formated string with information from descr iption 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(bool b); void setFlagLandscape(const bool displayed);
//! 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(bool b); void setFlagFog(const bool displayed);
//! 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;}
//! 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(bool b); void setFlagCardinalsPoints(const bool displayed);
//! Get Cardinals Points color. //! Get Cardinals Points color.
Vec3f getColorCardinalPoints() const; Vec3f getColorCardinalPoints() const;
//! Set Cardinals Points color. //! Set Cardinals Points color.
void setColorCardinalPoints(const Vec3f& v); void setColorCardinalPoints(const Vec3f& v);
//! 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(bool b); 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(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(); int getAtmosphereBortleLightPollution();
skipping to change at line 254 skipping to change at line 271
//! error occurs //! error occurs
QString loadLandscapeName(QString landscapeID); QString loadLandscapeName(QString landscapeID);
//! This function calculates and returns a landscape's disc size in bytes. //! This function calculates and returns a landscape's disc size in bytes.
//! It adds up the sizes of all files in the landscape's folder. It assumes //! It adds up the sizes of all files in the landscape's folder. It assumes
//! that there are no sub-directories. (There shouldn't be any anywa y.) //! that there are no sub-directories. (There shouldn't be any anywa y.)
//! @param landscapeID an installed landscape's identifier (the fold er name) //! @param landscapeID an installed landscape's identifier (the fold er name)
quint64 loadLandscapeSize(QString landscapeID); quint64 loadLandscapeSize(QString landscapeID);
signals: signals:
void atmosphereDisplayedChanged(const bool displayed);
void cardinalsPointsDisplayedChanged(const bool displayed);
void fogDisplayedChanged(const bool displayed);
void landscapeDisplayedChanged(const bool displayed);
//! 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 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);
 End of changes. 8 change blocks. 
5 lines changed or deleted 27 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/