Stellarium 0.12.3
CompassMarks.hpp
1 /*
2  * Copyright (C) 2009 Matthew Gates
3  *
4  * This program is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU General Public License
6  * as published by the Free Software Foundation; either version 2
7  * of the License, or (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
17  */
18 
19 #ifndef COMPASSMARKS_HPP_
20 #define COMPASSMARKS_HPP_
21 
22 #include "VecMath.hpp"
23 #include "StelModule.hpp"
24 #include "StelFader.hpp"
25 #include <QFont>
26 
27 class QPixmap;
28 class StelButton;
29 
31 class CompassMarks : public StelModule
32 {
33  Q_OBJECT
34 public:
35  CompassMarks();
36  virtual ~CompassMarks();
37 
39  // Methods defined in the StelModule class
40  virtual void init();
41  virtual void update(double deltaTime);
42  virtual void draw(StelCore* core, class StelRenderer* renderer);
43  virtual double getCallOrder(StelModuleActionName actionName) const;
44 
45 public slots:
46  void setCompassMarks(bool b);
47 
48 private slots:
49  void cardinalPointsChanged(bool b);
50 
51 private:
52  // Font used for displaying our text
53  QFont font;
54  Vec3f markColor;
55  LinearFader markFader;
56  QPixmap* pxmapGlow;
57  QPixmap* pxmapOnIcon;
58  QPixmap* pxmapOffIcon;
59  StelButton* toolbarButton;
60  bool cardinalPointsState;
61 };
62 
63 #include "fixx11h.h"
64 #include <QObject>
65 #include "StelPluginInterface.hpp"
66 
69 {
70  Q_OBJECT
71  Q_INTERFACES(StelPluginInterface)
72 public:
73  virtual StelModule* getStelModule() const;
74  virtual StelPluginInfo getPluginInfo() const;
75 
76 };
77 
78 #endif /*COMPASSMARKS_HPP_*/