StelSkyCultureMgr.hpp   StelSkyCultureMgr.hpp 
skipping to change at line 50 skipping to change at line 50
//! Manage sky cultures for stellarium. //! Manage sky cultures for stellarium.
//! Different human cultures have used different names for stars, and visua lised //! Different human cultures have used different names for stars, and visua lised
//! different constellations in the sky (and in different parts of the sky) . //! different constellations in the sky (and in different parts of the sky) .
//! In the installation data directory and user data directory are the "sky cultures" //! In the installation data directory and user data directory are the "sky cultures"
//! sub-directories containing one sub-directory per sky culture. //! sub-directories containing one sub-directory per sky culture.
//! This sub-directory name is that we refer to as sky culture ID here. //! This sub-directory name is that we refer to as sky culture ID here.
//! @author Fabien Chereau //! @author Fabien Chereau
class StelSkyCultureMgr : public QObject class StelSkyCultureMgr : public QObject
{ {
Q_OBJECT Q_OBJECT
Q_PROPERTY(QString currentSkyCultureID
READ getCurrentSkyCultureID
WRITE setCurrentSkyCultureID
NOTIFY currentSkyCultureChanged)
public: public:
StelSkyCultureMgr(); StelSkyCultureMgr();
~StelSkyCultureMgr(); ~StelSkyCultureMgr();
//! Initialize the StelSkyCultureMgr object. //! Initialize the StelSkyCultureMgr object.
//! Gets the default sky culture name from the application's setting s, //! Gets the default sky culture name from the application's setting s,
//! sets that sky culture by calling setCurrentSkyCultureID(). //! sets that sky culture by calling setCurrentSkyCultureID().
void init(); void init();
skipping to change at line 73 skipping to change at line 77
public slots: public slots:
//! Get the current sky culture English name. //! Get the current sky culture English name.
QString getCurrentSkyCultureEnglishName() const; QString getCurrentSkyCultureEnglishName() const;
//! Get the current sky culture translated name. //! Get the current sky culture translated name.
QString getCurrentSkyCultureNameI18() const; QString getCurrentSkyCultureNameI18() const;
//! Set the sky culture from i18n name. //! Set the sky culture from i18n name.
//! @return true on success; false and doesn't change if skyculture is invalid. //! @return true on success; false and doesn't change if skyculture is invalid.
bool setCurrentSkyCultureNameI18(const QString& cultureName) {return setCurrentSkyCultureID(skyCultureI18ToDirectory(cultureName));} bool setCurrentSkyCultureNameI18(const QString& cultureName) {return setCurrentSkyCultureID(skyCultureI18ToDirectory(cultureName));}
//! Get the current sky culture ID. //! Get the current sky culture ID.
QString getCurrentSkyCultureID() {return currentSkyCultureDir;} QString getCurrentSkyCultureID() const {return currentSkyCultureDir; }
//! Set the current sky culture from the ID. //! Set the current sky culture from the ID.
//! @param id the sky culture ID. //! @param id the sky culture ID.
//! @return true on success; else false. //! @return true on success; else false.
bool setCurrentSkyCultureID(const QString& id); bool setCurrentSkyCultureID(const QString& id);
//! Returns a localized HTML description for the current sky culture
.
//! @return a HTML description of the current sky culture, suitable
for display
QString getCurrentSkyCultureHtmlDescription() const;
//! Get the default sky culture ID //! Get the default sky culture ID
QString getDefaultSkyCultureID() {return defaultSkyCultureID;} QString getDefaultSkyCultureID() {return defaultSkyCultureID;}
//! Set the default sky culture from the ID. //! Set the default sky culture from the ID.
//! @param id the sky culture ID. //! @param id the sky culture ID.
//! @return true on success; else false. //! @return true on success; else false.
bool setDefaultSkyCultureID(const QString& id); bool setDefaultSkyCultureID(const QString& id);
//! Get a list of sky culture names in English. //! Get a list of sky culture names in English.
//! @return A new-line delimited list of English sky culture names. //! @return A new-line delimited list of English sky culture names.
QString getSkyCultureListEnglish(void); QString getSkyCultureListEnglish(void);
//! Get a list of sky culture names in the current language. //! Get a list of sky culture names in the current language.
//! @return A list of translated sky culture names. //! @return A list of translated sky culture names.
QStringList getSkyCultureListI18(void); QStringList getSkyCultureListI18(void);
//! Get a list of sky culture IDs //! Get a list of sky culture IDs
QStringList getSkyCultureListIDs(void); QStringList getSkyCultureListIDs(void);
//! Returns a map from sky culture IDs/folders to sky culture names.
QMap<QString, StelSkyCulture> getDirToNameMap() const { return dirTo
NameEnglish; }
signals:
//! Emitted whenever the default sky culture changed.
//! @see setDefaultSkyCultureID
void defaultSkyCultureChanged(const QString& id);
//! Emitted when the current sky culture changes
void currentSkyCultureChanged(const QString& id);
private: private:
//! Get the culture name in English associated with a specified dire ctory. //! Get the culture name in English associated with a specified dire ctory.
//! @param directory The directory name. //! @param directory The directory name.
//! @return The English name for the culture associated with directo ry. //! @return The English name for the culture associated with directo ry.
QString directoryToSkyCultureEnglish(const QString& directory); QString directoryToSkyCultureEnglish(const QString& directory);
//! Get the culture name translated to current language associated w ith //! Get the culture name translated to current language associated w ith
//! a specified directory. //! a specified directory.
//! @param directory The directory name. //! @param directory The directory name.
//! @return The translated name for the culture associated with dire ctory. //! @return The translated name for the culture associated with dire ctory.
 End of changes. 4 change blocks. 
1 lines changed or deleted 23 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/