22 #ifndef _SOLAR_SYSTEM_EDITOR_HPP_ 23 #define _SOLAR_SYSTEM_EDITOR_HPP_ 25 #include "StelGui.hpp" 26 #include "StelModule.hpp" 49 typedef QHash<QString, QVariant> SsoElements;
77 virtual void update(
double deltaTime){Q_UNUSED(deltaTime)}
239 void solarSystemChanged();
250 QSettings * solarSystemConfigurationFile;
253 QString customSolarSystemFilePath;
254 QString defaultSolarSystemFilePath;
255 QString majorSolarSystemFilePath;
263 QHash<QString,QString> defaultSsoIdentifiers;
269 QHash<QString,QString> listAllLoadedObjectsInFile(QString filePath)
const;
273 bool cloneSolarSystemConfigurationFile()
const;
279 bool resetSolarSystemConfigurationFile()
const;
287 static int unpackDayOrMonthNumber (QChar digit);
292 static int unpackYearNumber (QChar prefix,
int lastTwoDigits);
296 static int unpackAlphanumericNumber (QChar prefix,
int lastDigit);
303 static QString unpackMinorPlanetProvisionalDesignation(QString packedDesignation);
306 static void updateSsoProperty(QSettings& configuration, SsoElements& properties, QString key);
309 static QString convertToGroupName(QString& name,
int minorPlanetNumber = 0);
311 static QString fixGroupName(QString &name);
317 #include "StelPluginInterface.hpp" 323 Q_PLUGIN_METADATA(IID StelPluginInterface_iid)
331 #endif //_SOLAR_SYSTEM_EDITOR_HPP_ Update objects that lack the "type" parameter.
virtual double getCallOrder(StelModuleActionName actionName) const
Return the value defining the order of call for the given action For example if stars.callOrder[ActionDraw] == 10 and constellation.callOrder[ActionDraw] == 11, the stars module will be drawn before the constellations.
Define the interface to implement when creating a plugin.
virtual void update(double deltaTime)
Does nothing.
bool removeSsoWithName(QString name)
Removes an object from the user Solar System configuration file.
QList< SsoElements > readMpcOneLineCometElementsFromFile(QString filePath) const
Reads a list of comet orbital elements from a file.
QList< SsoElements > readMpcOneLineMinorPlanetElementsFromFile(QString filePath) const
Reads a list of minor planet orbital elements from a file.
bool copySolarSystemConfigurationFileTo(QString filePath)
Export current minor bodies file from user data directory (if it exists) to filePath. Return true on success.
Main class for Stellarium core processing.
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.
bool addFromSolarSystemConfigurationFile(QString filePath)
(new 0.16) Loads all new objects from filePath (an .ini file).
QHash< QString, QString > getDefaultSsoIdentifiers() const
Returns the names of the objects listed in the default ssystem_major.ini.
This StelObjectModule derivative is used to model SolarSystem bodies.
QHash< QString, QString > listAllLoadedSsoIdentifiers() const
Lists the objects listed in the current user ssystem.ini.
SsoElements readMpcOneLineCometElements(QString oneLineElements) const
Reads a single comet'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 which allows editing (add, delete, update) of the minor...
SsoElements readMpcOneLineMinorPlanetElements(QString oneLineElements) const
Reads a single minor planet's orbital elements from a string.
StelModuleActionName
Define the possible action for which an order is defined.
Main window for handling Solar System objects.
virtual bool configureGui(bool show)
called when the "configure" button in the "Plugins" tab is pressed
bool replaceSolarSystemConfigurationFileWith(QString filePath)
Replace current minor bodies file in the user data directory.
Update the values in the two parameter system, or add them if they are missing and the type allows...
Update the name and minor planet number, if any.
virtual QObjectList getExtensionList() const
A mechanism to provide abitrary QObjects to the StelModuleMgr.
virtual void draw(StelCore *core)
draws on the view port.
bool updateSolarSystemConfigurationFile(QList< SsoElements > objects, UpdateFlags flags)
Updates entries in the user solar system configuration file.
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.
This is the common base class for all the main components of stellarium.
Contains information about a Stellarium plugin.
bool appendToSolarSystemConfigurationFile(SsoElements object)
Adds a new entry at the end of the user solar system configuration file.