Stellarium 0.15.2
StelPluginInterface.hpp
1 /*
2  * Stellarium
3  * Copyright (C) 2006 Fabien Chereau
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU General Public License
7  * as published by the Free Software Foundation; either version 2
8  * of the License, or (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
18  */
19 
20 #ifndef _STELPLUGININTERFACE_HPP_
21 #define _STELPLUGININTERFACE_HPP_
22 
23 #include <QtPlugin>
24 #include <QImage>
25 
29 {
30  StelPluginInfo() : startByDefault(false) {;}
32  QString id;
34  QString displayedName;
36  QString authors;
38  QString contact;
40  QString description;
42  QString version;
45  QImage image;
48 };
49 
55 {
56 public:
57  virtual ~StelPluginInterface() {}
58 
60  virtual class StelModule* getStelModule() const = 0;
61 
63  virtual StelPluginInfo getPluginInfo() const = 0;
64 };
65 
66 #define StelPluginInterface_iid "org.stellarium.StelPluginInterface"
67 Q_DECLARE_INTERFACE(StelPluginInterface, StelPluginInterface_iid)
68 
69 #endif // _STELPLUGININTERFACE_HPP_
Define the interface to implement when creating a plugin.
QString description
The HTML description of the plugin.
QString displayedName
The displayed name, e.g. "Artificial Satellites".
QImage image
Logo or preview image to display in the information dialog or an invalid image if not applicable...
bool startByDefault
Whether the plugin should be started by default (if nothing specified in config.ini) ...
QString contact
The contact email or URL.
QString version
The version of the plugin, e.g. "1.0.0".
QString authors
The comma separated list of authors, e.g. "Fabien Chereau, Matthew Gates".
This is the common base class for all the main components of stellarium.
Definition: StelModule.hpp:49
QString id
The plugin ID. It MUST match the lib file name (case sensitive), e.g. "HelloStelModule".
Contains information about a Stellarium plugin.