SolarSystemEditor.hpp   SolarSystemEditor.hpp 
/* /*
* Solar System editor plug-in for Stellarium * Solar System editor plug-in for Stellarium
* *
* Copyright (C) 2010 Bogdan Marinov * Copyright (C) 2010 Bogdan Marinov
* Copyright (C) 2017 Georg Zotti (changes for 0.16)
* *
* 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.
skipping to change at line 37 skipping to change at line 38
#include <QHash> #include <QHash>
#include <QList> #include <QList>
#include <QString> #include <QString>
#include <QVariant> #include <QVariant>
class SolarSystemManagerWindow; class SolarSystemManagerWindow;
class SolarSystem; class SolarSystem;
class QSettings; class QSettings;
//! Convenience type for storage of SSO properties in ssystem.ini format. //! Convenience type for storage of SSO properties in ssystem_minor.ini for mat.
//! This is an easy way of storing data in the format used in Stellarium's //! This is an easy way of storing data in the format used in Stellarium's
//! solar system configuration file. //! solar system configuration file.
//! What would be key/value pairs in a section in the ssystem.ini file //! What would be key/value pairs in a section in the ssystem_minor.ini fil e
//! are key/value pairs in the hash. The section name is stored with key //! are key/value pairs in the hash. The section name is stored with key
//! "section_name". //! "section_name".
//! As it is a hash, key names are not stored alphabetically. This allows //! As it is a hash, key names are not stored alphabetically. This allows
//! for rapid addition and look-up of values, unlike a real QSettings //! for rapid addition and look-up of values, unlike a real QSettings
//! object in StelIniFormat. //! object in StelIniFormat.
//! Also, using this way may allow scripts to define SSOs. //! Also, using this way may allow scripts to define SSOs.
//! \todo Better name. //! \todo Better name.
typedef QHash<QString, QVariant> SsoElements; typedef QHash<QString, QVariant> SsoElements;
/*! /*!
\class SolarSystemEditor \class SolarSystemEditor
\brief Main class of the Solar System Editor plug-in. \brief Main class of the Solar System Editor plug-in which allows editing
\author Bogdan Marinov (add, delete, update) of the minor bodies.
\author Bogdan Marinov, Georg Zotti (0.16 changes)
Solar System bodies are identified by their names in Stellarium, but entri es Solar System bodies are identified by their names in Stellarium, but entri es
in the configuration file are identified by their group (section) names. in the configuration file are identified by their group (section) names.
This makes more difficult the detection of duplicates. This makes the detection of duplicates more difficult.
*/ */
class SolarSystemEditor : public StelModule class SolarSystemEditor : public StelModule
{ {
Q_OBJECT Q_OBJECT
public: public:
SolarSystemEditor(); SolarSystemEditor();
virtual ~SolarSystemEditor(); virtual ~SolarSystemEditor();
//////////////////////////////////////////////////////////////////// /////// //////////////////////////////////////////////////////////////////// ///////
// Methods inherited from the StelModule class // Methods inherited from the StelModule class
//! called when the plug-in is loaded. //! called when the plug-in is loaded.
//! All initializations should be done here. //! All initializations should be done here.
virtual void init(); virtual void init();
//! called before the plug-in is un-loaded. //! called before the plug-in is un-loaded.
//! Useful for stopping processes, unloading textures, etc. //! Useful for stopping processes, unloading textures, etc.
virtual void deinit(); virtual void deinit(){}
virtual void update(double deltaTime); //! Does nothing.
virtual void update(double deltaTime){Q_UNUSED(deltaTime)}
//! draws on the view port. //! draws on the view port.
//! Dialog windows don't need explicit drawing, it's done automatica lly. //! Dialog windows don't need explicit drawing, it's done automatica lly.
//! If a plug-in draws on the screen, it should be able to respect virtual void draw(StelCore * core){Q_UNUSED(core)}
//! the night vision mode.
virtual void draw(StelCore * core);
virtual double getCallOrder(StelModuleActionName actionName) const; virtual double getCallOrder(StelModuleActionName actionName) const;
//! called when the "configure" button in the "Plugins" tab is press ed //! called when the "configure" button in the "Plugins" tab is press ed
virtual bool configureGui(bool show); virtual bool configureGui(bool show);
//! Reads a single comet's orbital elements from a string. //! Reads a single comet's orbital elements from a string.
//! This function converts a line of comet orbital elements in MPC f ormat //! This function converts a line of comet orbital elements in MPC f ormat
//! to a hash in Stellarium's ssystem.ini format. //! to a hash in Stellarium's ssystem.ini format.
//! The MPC's one-line orbital elements format for comets //! The MPC's one-line orbital elements format for comets
//! is described on their website: //! is described on their website:
//! http://www.minorplanetcenter.org/iau/info/CometOrbitFormat.html //! http://www.minorplanetcenter.org/iau/info/CometOrbitFormat.html
//! \returns an empty hash if there is an error or the source string is not //! \returns an empty hash if there is an error or the source string is not
//! a valid line in MPC format. //! a valid line in MPC format.
//! \todo Recognise the long form packed designations (to handle fra gments) //! \todo Recognise the long form packed designations (to handle fra gments)
//! \todo Handle better any unusual symbols in section names (URL en coding?) //! \todo Handle better any unusual symbols in section names (URL en coding?)
//! \todo Use column cuts intead of a regular expression? //! \todo Use column cuts intead of a regular expression?
SsoElements readMpcOneLineCometElements(QString oneLineElements); SsoElements readMpcOneLineCometElements(QString oneLineElements) con st;
//! Reads a single minor planet's orbital elements from a string. //! Reads a single minor planet's orbital elements from a string.
//! This function converts a line of minor planet orbital elements i n //! This function converts a line of minor planet orbital elements i n
//! MPC format to a hash in Stellarium's ssystem.ini format. //! MPC format to a hash in Stellarium's ssystem.ini format.
//! The MPC's one-line orbital elements format for minor planets //! The MPC's one-line orbital elements format for minor planets
//! is described on their website: //! is described on their website:
//! http://www.minorplanetcenter.org/iau/info/MPOrbitFormat.html //! http://www.minorplanetcenter.org/iau/info/MPOrbitFormat.html
//! \returns an empty hash if there is an error or the source string is not //! \returns an empty hash if there is an error or the source string is not
//! a valid line in MPC format. //! a valid line in MPC format.
//! \todo Handle better any unusual symbols in section names (URL en coding?) //! \todo Handle better any unusual symbols in section names (URL en coding?)
SsoElements readMpcOneLineMinorPlanetElements(QString oneLineElement SsoElements readMpcOneLineMinorPlanetElements(QString oneLineElement
s); s) const;
/* DEAD CODE. MAYBE REACTIVATE as scripting function (public slot)?
//! Reads a single object's orbital elements from a string. //! Reads a single object's orbital elements from a string.
//! This function converts a line of orbital elements in XEphem form at //! This function converts a line of orbital elements in XEphem form at
//! to a hash in Stellarium's ssystem.ini format. //! to a hash in Stellarium's ssystem.ini format.
//! http://www.clearskyinstitute.com/xephem/help/xephem.html#mozTocI d468501 //! http://www.clearskyinstitute.com/xephem/help/xephem.html#mozTocI d468501
//! It recognises only the 'e', 'h' and 'p' types of orbits in XEphe m's //! It recognises only the 'e', 'h' and 'p' types of orbits in XEphe m's
//! format (comets and minor planets). It is used in handling on-lin e search //! format (comets and minor planets). It is used in handling on-lin e search
//! queries to the MPC's Minor Planet and Comet Ephemeris System, as //! queries to the MPC's Minor Planet and Comet Ephemeris System, as
//! using the MPC format causes long object names to be truncated //! using the MPC format causes long object names to be truncated
//! due to the fixed width of the columns. //! due to the fixed width of the columns.
//! An object's type (comet or asteroid) is determined based on its name. //! An object's type (comet or asteroid) is determined based on its name.
SsoElements readXEphemOneLineElements(QString oneLineElements); SsoElements readXEphemOneLineElements(QString oneLineElements);
*/
//! Reads a list of comet orbital elements from a file. //! Reads a list of comet orbital elements from a file.
//! This function reads a list of comet orbital elements in MPC's on e-line //! This function reads a list of comet orbital elements in MPC's on e-line
//! format from a file (one comet per line) and converts it to a lis t of //! format from a file (one comet per line) and converts it to a lis t of
//! hashes in Stellarium's ssystem.ini format. //! hashes in Stellarium's ssystem.ini format.
//! Example source file is the list of observable comets on the MPC' s site: //! Example source file is the list of observable comets on the MPC' s site:
//! http://www.minorplanetcenter.org/iau/Ephemerides/Comets/Soft00Cm t.txt //! http://www.minorplanetcenter.org/iau/Ephemerides/Comets/Soft00Cm t.txt
//! readMpcOneLineCometElements() is used internally to parse each l ine. //! readMpcOneLineCometElements() is used internally to parse each l ine.
QList<SsoElements> readMpcOneLineCometElementsFromFile(QString fileP ath); QList<SsoElements> readMpcOneLineCometElementsFromFile(QString fileP ath) const;
//! Reads a list of minor planet orbital elements from a file. //! Reads a list of minor planet orbital elements from a file.
//! This function reads a list of minor planets orbital elements in MPC's //! This function reads a list of minor planets orbital elements in MPC's
//! one-line format from a file (one comet per line) and converts it to //! one-line format from a file (one comet per line) and converts it to
//! a list of hashes in Stellarium's ssystem.ini format. //! a list of hashes in Stellarium's ssystem.ini format.
//! Example source file is the list of bright asteroids on the MPC's site: //! Example source file is the list of bright asteroids on the MPC's site:
//! http://www.minorplanetcenter.org/iau/Ephemerides/Bright/2010/Sof t00Bright.txt //! http://www.minorplanetcenter.org/iau/Ephemerides/Bright/2010/Sof t00Bright.txt
//! readMpcOneLineMinorPlanetElements() is used internally to parse each line. //! readMpcOneLineMinorPlanetElements() is used internally to parse each line.
QList<SsoElements> readMpcOneLineMinorPlanetElementsFromFile(QString filePath); QList<SsoElements> readMpcOneLineMinorPlanetElementsFromFile(QString filePath) const;
/*
* GZ identified as DEAD CODE as of 0.16pre. Maybe reactivate as pub
lic slot for scripting use?
//! Reads a list of Solar System object orbital elements from a file . //! Reads a list of Solar System object orbital elements from a file .
//! This function reads a list of Solar System object orbital elemen ts in //! This function reads a list of Solar System object orbital elemen ts in
//! XEphem's one-line format (one object per line, comment lines sta rting //! XEphem's one-line format (one object per line, comment lines sta rting
//! with # are skipped) and converts it to a list of hashes in Stell arium's //! with # are skipped) and converts it to a list of hashes in Stell arium's
//! ssystem.ini format. XEphem's file format is described in its man ual: //! ssystem.ini format. XEphem's file format is described in its man ual:
//! http://www.clearskyinstitute.com/xephem/help/xephem.html#mozTocI d468501 //! http://www.clearskyinstitute.com/xephem/help/xephem.html#mozTocI d468501
//! Example source file can be any of the lists of objects on the MP C site: //! Example source file can be any of the lists of objects on the MP C site:
//! http://www.minorplanetcenter.org/iau/Ephemerides/Comets/Soft03Cm t.txt //! http://www.minorplanetcenter.org/iau/Ephemerides/Comets/Soft03Cm t.txt
//! http://www.minorplanetcenter.org/iau/Ephemerides/Bright/2010/Sof t03Bright.txt //! http://www.minorplanetcenter.org/iau/Ephemerides/Bright/2010/Sof t03Bright.txt
//! readXEphemOneLineElements() is used internally to parse each lin e. //! readXEphemOneLineElements() is used internally to parse each lin e.
QList<SsoElements> readXEphemOneLineElementsFromFile(QString filePat h); QList<SsoElements> readXEphemOneLineElementsFromFile(QString filePat h);
*/
//! Adds a new entry at the end of the user solar system configurati on file. //! Adds a new entry at the end of the user solar system configurati on file.
//! This function writes directly to the file. See the note on why Q Settings //! This function writes directly to the file. See the note on why Q Settings
//! was not used in the description of //! was not used in the description of
//! appendToSolarSystemConfigurationFile(QList<SsoElements>) //! appendToSolarSystemConfigurationFile(QList<SsoElements>)
//! Duplicates are removed: If any section in the file matches the //! Duplicates are removed: If any section in the file matches the
//! "section_name" value of the inserted entry, it is removed. //! "section_name" value of the inserted entry, it is removed.
bool appendToSolarSystemConfigurationFile(SsoElements object); bool appendToSolarSystemConfigurationFile(SsoElements object);
//! Adds new entries at the end of the user solar system configurati on file. //! Adds new entries at the end of the user solar system configurati on file.
//! This function writes directly to the file. QSettings was not use d, as: //! This function writes directly to the file. QSettings was not use d, as:
//! - Using QSettings with QSettings::IniFormat causes the list in the //! - Using QSettings with QSettings::IniFormat causes the list in the
//! "color" field (e.g. "1.0, 1.0, 1.0") to be wrapped in double quo //! "color" field (e.g. "1.0, 1.0, 1.0") to be wrapped in double
tation quotation
//! marks (Stellarium requires no quotation marks). //! marks (Stellarium requires no quotation marks).
//! (Has been fixed by using StelIniFormat)
//! - Using QSettings with StelIniFormat causes unaccepptable appen d times //! - Using QSettings with StelIniFormat causes unaccepptable appen d times
//! when the file grows (>~40 entries). This most probably happens b //! when the file grows (>~40 entries). This most probably happen
ecause s because
//! StelIniParser uses QMap internally for the entry list. QMap orde //! StelIniParser uses QMap internally for the entry list. QMap o
rs its rders its
//! keys (in the case of strings - alphabetically) and it has to fin //! keys (in the case of strings - alphabetically) and it has to
d find
//! the appropriate place in the ordering for every new key, which t //! the appropriate place in the ordering for every new key, whic
akes h takes
//! more and more time as the list grows. //! more and more time as the list grows.
//! (0.16pre: This problem seems to have been solved: I (GZ) have
changed
//! this plugin to use StelIniParser, and loading 1000comets tak
es about 4 seconds.
//! This is very acceptable, and avoids tons of problems with th
e default QSettings::IniFormat)
//! //!
//! Duplicates are removed: If any section in the file matches the //! Duplicates are removed: If any section in the file matches the
//! "section_name" value of a new entry, it is removed. //! "section_name" value of a new entry, it is removed.
//! Invalid entries in the list (that don't contain a value for //! Invalid entries in the list (that don't contain a value for
//! "section_name" or it is an empty string) are skipped and the pro cessing //! "section_name" or it is an empty string) are skipped and the pro cessing
//! continues from the next entry. //! continues from the next entry.
//! \todo Protect the default Solar System configuration? //! \todo Protect the default Solar System configuration?
//! \todo At least warn when overwriting old entries? //! \todo At least warn when overwriting old entries?
bool appendToSolarSystemConfigurationFile(QList<SsoElements>); bool appendToSolarSystemConfigurationFile(QList<SsoElements>);
skipping to change at line 195 skipping to change at line 202
UpdateMagnitudeParameters = 0x08 //!< Update the values in t he two parameter system, or add them if they are missing and the type allow s. UpdateMagnitudeParameters = 0x08 //!< Update the values in t he two parameter system, or add them if they are missing and the type allow s.
}; };
Q_DECLARE_FLAGS(UpdateFlags, UpdateFlag) Q_DECLARE_FLAGS(UpdateFlags, UpdateFlag)
//! Updates entries in the user solar system configuration file. //! Updates entries in the user solar system configuration file.
//! \param objects a list of data for already existing objects (non- existing ones are skipped); //! \param objects a list of data for already existing objects (non- existing ones are skipped);
//! \param flags flags controlling what is being updated. See Update Flag. //! \param flags flags controlling what is being updated. See Update Flag.
//! \returns false if the operation has failed completely for some r eason. //! \returns false if the operation has failed completely for some r eason.
bool updateSolarSystemConfigurationFile(QList<SsoElements> objects, UpdateFlags flags); bool updateSolarSystemConfigurationFile(QList<SsoElements> objects, UpdateFlags flags);
//! Returns the names of the objects listed in the default ssystem.i ni. //! Returns the names of the objects listed in the default ssystem_m ajor.ini.
//! The default solar system configuration file is assumed to be the one //! The default solar system configuration file is assumed to be the one
//! in the installation directory. //! in the installation directory.
QHash<QString,QString> getDefaultSsoIdentifiers() {return defaultSso Identifiers;} QHash<QString,QString> getDefaultSsoIdentifiers() const {return defa ultSsoIdentifiers;}
//! Lists the objects listed in the current user ssystem.ini. //! Lists the objects listed in the current user ssystem.ini.
//! As the name suggests, the list is compiled when the function is run. //! As the name suggests, the list is compiled when the function is run.
QHash<QString,QString> listAllLoadedSsoIdentifiers(); QHash<QString,QString> listAllLoadedSsoIdentifiers() const;
//! Removes an object from the user Solar System configuration file. //! Removes an object from the user Solar System configuration file.
//! Reloads the Solar System on successfull removal. //! Reloads the Solar System on successful removal.
//! \arg name true name of the object ("name" parameter in the confi guration file) //! \arg name true name of the object ("name" parameter in the confi guration file)
//! \returns true if the entry has been removed successfully or ther e is //! \returns true if the entry has been removed successfully or ther e is
//! no such entry //! no such entry
//! \returns false if there was an error //! \returns false if there was an error
bool removeSsoWithName(QString name); bool removeSsoWithName(QString name);
//! //! Export current minor bodies file from user data directory (if it exists) to filePath. Return true on success.
bool copySolarSystemConfigurationFileTo(QString filePath); bool copySolarSystemConfigurationFileTo(QString filePath);
//! //! Replace current minor bodies file in the user data directory.
//! Writes warning to logfile and returns false in case of problems.
bool replaceSolarSystemConfigurationFileWith(QString filePath); bool replaceSolarSystemConfigurationFileWith(QString filePath);
//! (new 0.16)
//! Loads all new objects from filePath (an .ini file).
//! Default proposal is ssystem_1000comsts.ini in the installation d
ir.
bool addFromSolarSystemConfigurationFile(QString filePath);
//! returns the path //! returns the path
QString getCustomSolarSystemFilePath() const {return customSolarSyst emFilePath;} QString getCustomSolarSystemFilePath() const {return customSolarSyst emFilePath;}
public slots: public slots:
//! Resets the Solar System configuration file and reloads the Solar System. //! Resets the Solar System configuration file and reloads the Solar System.
//! \todo Return a bool and make the GUI display a message if it was not successful. //! \todo Return a bool and make the GUI display a message if it was not successful.
void resetSolarSystemToDefault(); void resetSolarSystemToDefault();
signals: signals:
skipping to change at line 239 skipping to change at line 251
private slots: private slots:
void updateI18n(); void updateI18n();
private: private:
bool isInitialized; bool isInitialized;
//! Main window of the module's GUI //! Main window of the module's GUI
SolarSystemManagerWindow * mainWindow; SolarSystemManagerWindow * mainWindow;
QSettings * solarSystemConfigurationFile; QSettings * solarSystemConfigurationFile;
SolarSystem * solarSystemManager; SolarSystem * solarSystem;
QString customSolarSystemFilePath; QString customSolarSystemFilePath;
QString defaultSolarSystemFilePath; QString defaultSolarSystemFilePath;
QString majorSolarSystemFilePath; // install dir's ssystem_major.ini
//! A hash matching SSO names with the group names used to identify them //! A hash matching SSO names with the group names used to identify them
//! in the configuration file. //! in the configuration file.
//! The names and group names of all objects in the default ssystem. ini. //! The names and group names of all objects in the default ssystem_ major.ini.
//! The keys are the names, the values are the group names. //! The keys are the names, the values are the group names.
//! Initialized in init(). //! Initialized in init().
QHash<QString,QString> defaultSsoIdentifiers; QHash<QString,QString> defaultSsoIdentifiers;
//! Gets the names of the objects listed in a ssystem.ini-formatted file. //! Gets the names of the objects listed in a ssystem.ini-formatted file.
//! Used internally in readAllCurrentSsoNames() and in init() to ini tialize //! Used internally in readAllCurrentSsoNames() and in init() to ini tialize
//! defaultSsoNames. //! defaultSsoNames.
//! Does not check if the file exists. //! Does not check if the file exists.
QHash<QString,QString> listAllLoadedObjectsInFile(QString filePath); QHash<QString,QString> listAllLoadedObjectsInFile(QString filePath) const;
//! Creates a copy of the default ssystem.ini file in the user data directory. //! Creates a copy of the default ssystem.ini file in the user data directory.
//! \returns true if a file already exists or the copying has been s uccessful //! \returns true if a file already exists or the copying has been s uccessful
bool cloneSolarSystemConfigurationFile(); bool cloneSolarSystemConfigurationFile() const;
//! Replaces the user copy of ssystem.ini with the default one. //! Replaces the user copy of ssystem.ini with the default one.
//! This function simply deletes the file, if it exists, and calls //! This function simply deletes the file, if it exists, and calls
//! cloneSolarSystemConfigurationFile(). //! cloneSolarSystemConfigurationFile().
//! \returns true if the replacement has been successfull. //! \returns true if the replacement has been successfull.
bool resetSolarSystemConfigurationFile(); bool resetSolarSystemConfigurationFile() const;
//! Converts an alphanumeric digit as used in MPC packed dates to an integer. //! Converts an alphanumeric digit as used in MPC packed dates to an integer.
//! See http://www.minorplanetcenter.org/iau/info/PackedDates.html //! See http://www.minorplanetcenter.org/iau/info/PackedDates.html
//! Interprets the digits from 1 to 9 normally, and the capital lete rs //! Interprets the digits from 0 to 9 normally, and the capital lett ers
//! from A to V as numbers between 10 and 31. //! from A to V as numbers between 10 and 31.
//! \returns 0 if the digit is invalid (0 is also an invalid ordinal number //! \returns -1 if the digit is invalid (0 is also an invalid ordina l number
//! for a day or month, so this is not a problem) //! for a day or month, so this is not a problem)
int unpackDayOrMonthNumber (QChar digit); static int unpackDayOrMonthNumber (QChar digit);
//! Converts an alphanumeric year number as used in MPC packed dates to an integer. //! Converts an alphanumeric year number as used in MPC packed dates to an integer.
//! See http://www.minorplanetcenter.org/iau/info/PackedDates.html //! See http://www.minorplanetcenter.org/iau/info/PackedDates.html
//! Also used in packed provisional designations, see //! Also used in packed provisional designations, see
//! http://www.minorplanetcenter.org/iau/info/PackedDes.html //! http://www.minorplanetcenter.org/iau/info/PackedDes.html
int unpackYearNumber (QChar prefix, int lastTwoDigits); static int unpackYearNumber (QChar prefix, int lastTwoDigits);
//! Converts a two-character number used in MPC packed provisional d esignations. //! Converts a two-character number used in MPC packed provisional d esignations.
//! See http://www.minorplanetcenter.org/iau/info/PackedDes.html //! See http://www.minorplanetcenter.org/iau/info/PackedDes.html
//! This function is used for both asteroid and comet designations. //! This function is used for both asteroid and comet designations.
int unpackAlphanumericNumber (QChar prefix, int lastDigit); static int unpackAlphanumericNumber (QChar prefix, int lastDigit);
//TODO: This should be public and static, perhaps? //TODO: This should be public, perhaps?
//! Unpacks an MPC packed minor planet provisional designation. //! Unpacks an MPC packed minor planet provisional designation.
//! See http://www.minorplanetcenter.org/iau/info/PackedDes.html //! See http://www.minorplanetcenter.org/iau/info/PackedDes.html
//! \returns an empty string if the argument is not a valid packed //! \returns an empty string if the argument is not a valid packed
//! provisional designation. //! provisional designation.
QString unpackMinorPlanetProvisionalDesignation(QString packedDesign ation); static QString unpackMinorPlanetProvisionalDesignation(QString packe dDesignation);
//! Updates a value in a configuration file with a value with the sa me key in a SsoElements hash. //! Updates a value in a configuration file with a value with the sa me key in a SsoElements hash.
void updateSsoProperty(QSettings& configuration, SsoElements& proper ties, QString key); static void updateSsoProperty(QSettings& configuration, SsoElements& properties, QString key);
//! Converts an object name to a key (group) name in a configuration file. //! Converts an object name to a key (group) name in a configuration file.
QString convertToGroupName(QString& name, int minorPlanetNumber = 0) static QString convertToGroupName(QString& name, int minorPlanetNumb
; er = 0);
//! replaces "%25" by "%", then replaces "%28" by "(" and "%29" by "
)".
static QString fixGroupName(QString &name);
}; };
#include <QObject> #include <QObject>
#include "StelPluginInterface.hpp" #include "StelPluginInterface.hpp"
//! This class is used by Qt to manage a plug-in interface //! This class is used by Qt to manage a plug-in interface
class SolarSystemEditorStelPluginInterface : public QObject, public StelPlu ginInterface class SolarSystemEditorStelPluginInterface : public QObject, public StelPlu ginInterface
{ {
Q_OBJECT Q_OBJECT
Q_PLUGIN_METADATA(IID StelPluginInterface_iid) Q_PLUGIN_METADATA(IID StelPluginInterface_iid)
Q_INTERFACES(StelPluginInterface) Q_INTERFACES(StelPluginInterface)
public: public:
virtual StelModule* getStelModule() const; virtual StelModule* getStelModule() const;
virtual StelPluginInfo getPluginInfo() const; virtual StelPluginInfo getPluginInfo() const;
virtual QObjectList getExtensionList() const { return QObjectList(); }
}; };
#endif //_SOLAR_SYSTEM_EDITOR_HPP_ #endif //_SOLAR_SYSTEM_EDITOR_HPP_
 End of changes. 39 change blocks. 
50 lines changed or deleted 73 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/