Stellarium 0.13.1
StelGuiBase.hpp
1 /*
2  * Stellarium
3  * Copyright (C) 2009 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 _STELGUIBASE_HPP_
21 #define _STELGUIBASE_HPP_
22 
23 #include "StelObject.hpp"
24 
25 #include <QtPlugin>
26 
27 class QGraphicsWidget;
28 class QAction;
29 
33 {
34 public:
35  StelGuiBase();
36  virtual ~StelGuiBase() {;}
37 
38  virtual void init(QGraphicsWidget *atopLevelGraphicsWidget);
39 
41  virtual void setStelStyle(const QString& section) =0;
42 
44  virtual void setInfoTextFilters(const StelObject::InfoStringGroup& aflags) =0;
45  virtual const StelObject::InfoStringGroup& getInfoTextFilters() const =0;
46 
47  virtual void forceRefreshGui() {;}
48 
51  virtual void setVisible(bool b) =0;
53  virtual bool getVisible() const =0;
56  virtual bool isCurrentlyUsed() const =0;
57 };
58 
63 {
64 public:
65  virtual ~StelGuiPluginInterface() {}
66 
68  virtual class StelGuiBase* getStelGuiBase() const = 0;
69 };
70 Q_DECLARE_INTERFACE(StelGuiPluginInterface, "stellarium.StelGuiPluginInterface/1.0")
71 
72 
73 #endif // _STELGUIBASE_HPP_
virtual bool getVisible() const =0
Get the current visible status of the GUI.
virtual void setVisible(bool b)=0
Show whether the GUI is visible.
Define the interface to implement when creating a GUI plugin.
Definition: StelGuiBase.hpp:62
Abstract class defining the base interface for all GUIs.
Definition: StelGuiBase.hpp:32
virtual class StelGuiBase * getStelGuiBase() const =0
Get the instance of StelGuiBase implmenting the GUI.
virtual bool isCurrentlyUsed() const =0
Show wether the Gui is currently used.
virtual void setInfoTextFilters(const StelObject::InfoStringGroup &aflags)=0
Get a pointer on the info panel used to display selected object info.
virtual void setStelStyle(const QString &section)=0
Load color scheme matchin the section name.