~ubuntu-branches/ubuntu/precise/stellarium/precise

« back to all changes in this revision

Viewing changes to plugins/CompassMarks/src/CompassMarks.hpp

  • Committer: Bazaar Package Importer
  • Author(s): Scott Howard
  • Date: 2010-02-15 20:48:39 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20100215204839-u3qgbv60rho997yk
Tags: 0.10.3-0ubuntu1
* New upstream release.
  - fixes intel rendering bug (LP: #480553)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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., 59 Temple Place - Suite 330, Boston, MA  02111-1307, 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
 
 
30
//! This is an example of a plug-in which can be dynamically loaded into stellarium
 
31
class CompassMarks : public StelModule
 
32
{
 
33
        Q_OBJECT
 
34
public:
 
35
        CompassMarks();
 
36
        virtual ~CompassMarks();
 
37
        
 
38
        ///////////////////////////////////////////////////////////////////////////
 
39
        // Methods defined in the StelModule class
 
40
        virtual void init();
 
41
        virtual void update(double deltaTime);
 
42
        virtual void draw(StelCore* core);
 
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
 
 
67
//! This class is used by Qt to manage a plug-in interface
 
68
class CompassMarksStelPluginInterface : public QObject, public StelPluginInterface
 
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_*/