summaryrefslogtreecommitdiff
path: root/src/OpenSkyPlanetarium.hpp~
blob: a982888ad8ef0a0bb0e6826c27db912e93f28e31 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
/*
 * Copyright (C) 2016 Dhiraj Salian
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA  02110-1335, USA.
 */

#ifndef OPENSKYPLANETARIUM_HPP_
#define OPENSKYPLANETARIUM_HPP_

#include "StelModule.hpp"
#include "StelGui.hpp"
#include<QString>
#include <QFont>

class OSPMainDialog;

//! This is used to dynamically load Open Sky Planetarium plugin into stellarium
class OpenSkyPlanetarium :public StelModule
{
	Q_OBJECT
public:

	/**
	*	Class constructor.
	*/
	OpenSkyPlanetarium();
	
	/**
	*	Class destructor.
	*/
	~OpenSkyPlanetarium();

	///////////////////////////////////////////////////////////////////////////
	// Methods defined in the StelModule class

	/**
	*	Init Open Sky Planetarium module
	*/
	virtual void init();
	
	/**
	*	This method is used to delete the instance of main Window
	*/
	virtual void deinit();
	virtual void update(double) {;}

	/**
	*	This method is used to reimplement the getCallOrder method
	*/
	virtual double getCallOrder(StelModuleActionName actionName) const;

	/**
	*	This method is used to show the plugin interface
	*/
	virtual bool configureGui(bool show);
private:
	QFont *font;
	OSPMainDialog *mainDialog;
	StelButton* toolbarButton;	
};


#include <QObject>
#include "StelPluginInterface.hpp"

//! This class is used by Qt to manage a plug-in interface
class OpenSkyPlanetariumPluginInterface : public QObject, public StelPluginInterface
{
	Q_OBJECT
	Q_PLUGIN_METADATA(IID StelPluginInterface_iid)
	Q_INTERFACES(StelPluginInterface)
public:

	/**
	*	 This method is the one called automatically by the StelModuleMgr just after loading the dynamic library
	*/
	virtual StelModule* getStelModule() const;

	/**
	*	This method is used to pass the information about the OpenSky Planetarium plugin.
	*/
	virtual StelPluginInfo getPluginInfo() const;
};

#endif /*OPENSKYPLANETARIUM_HPP_*/