21 #ifndef _SOLAR_SYSTEM_EDITOR_HPP_
22 #define _SOLAR_SYSTEM_EDITOR_HPP_
24 #include "StelGui.hpp"
25 #include "StelModule.hpp"
48 typedef QHash<QString, QVariant> SsoElements;
75 virtual void update(
double deltaTime);
81 virtual double getCallOrder(StelModuleActionName actionName)
const;
190 bool updateSolarSystemConfigurationFile(QList<SsoElements> objects, UpdateFlags flags);
213 bool copySolarSystemConfigurationFileTo(QString filePath);
215 bool replaceSolarSystemConfigurationFileWith(QString filePath);
227 void solarSystemChanged();
238 QSettings * solarSystemConfigurationFile;
241 QString customSolarSystemFilePath;
242 QString defaultSolarSystemFilePath;
250 QHash<QString,QString> defaultSsoIdentifiers;
256 QHash<QString,QString> listAllLoadedObjectsInFile(QString filePath);
260 bool cloneSolarSystemConfigurationFile();
266 bool resetSolarSystemConfigurationFile();
274 int unpackDayOrMonthNumber (QChar digit);
279 int unpackYearNumber (QChar prefix,
int lastTwoDigits);
283 int unpackAlphanumericNumber (QChar prefix,
int lastDigit);
290 QString unpackMinorPlanetProvisionalDesignation(QString packedDesignation);
293 void updateSsoProperty(QSettings& configuration, SsoElements& properties, QString key);
296 QString convertToGroupName(QString& name,
int minorPlanetNumber = 0);
302 #include "StelPluginInterface.hpp"
308 Q_PLUGIN_METADATA(IID StelPluginInterface_iid)
315 #endif //_SOLAR_SYSTEM_EDITOR_HPP_
Update objects that lack the "type" parameter.
bool removeSsoWithName(QString name)
Removes an object from the user Solar System configuration file.
QHash< QString, QString > listAllLoadedSsoIdentifiers()
Lists the objects listed in the current user ssystem.ini.
QList< SsoElements > readMpcOneLineMinorPlanetElementsFromFile(QString filePath)
Reads a list of minor planet orbital elements from a file.
Update the orbital elements, including the orbit function.
QString getCustomSolarSystemFilePath() const
returns the path
void resetSolarSystemToDefault()
Resets the Solar System configuration file and reloads the Solar System.
QHash< QString, QString > getDefaultSsoIdentifiers()
Returns the names of the objects listed in the default ssystem.ini.
virtual StelPluginInfo getPluginInfo() const =0
QList< SsoElements > readXEphemOneLineElementsFromFile(QString filePath)
Reads a list of Solar System object orbital elements from a file.
SsoElements readXEphemOneLineElements(QString oneLineElements)
Reads a single object's orbital elements from a string.
virtual void deinit()
called before the plug-in is un-loaded.
Main class of the Solar System Editor plug-in.
virtual class StelModule * getStelModule() const =0
Main window for handling Solar System objects.
virtual bool configureGui(bool show)
called when the "configure" button in the "Plugins" tab is pressed
Update the values in the two parameter system, or add them if they are missing and the type allows...
QList< SsoElements > readMpcOneLineCometElementsFromFile(QString filePath)
Reads a list of comet orbital elements from a file.
Update the name and minor planet number, if any.
SsoElements readMpcOneLineMinorPlanetElements(QString oneLineElements)
Reads a single minor planet's orbital elements from a string.
virtual void draw(StelCore *core)
draws on the view port.
SsoElements readMpcOneLineCometElements(QString oneLineElements)
Reads a single comet's orbital elements from a string.
This class is used by Qt to manage a plug-in interface.
UpdateFlag
Flags to control the updateSolarSystemConfigurationFile() function.
virtual void init()
called when the plug-in is loaded.
Q_DECLARE_FLAGS(UpdateFlags, UpdateFlag) bool updateSolarSystemConfigurationFile(QList< SsoElements > objects
Updates entries in the user solar system configuration file.
bool appendToSolarSystemConfigurationFile(SsoElements object)
Adds a new entry at the end of the user solar system configuration file.