Stellarium 0.15.2
ArchaeoLinesDialog.hpp
1 /*
2  * ArchaeoLines plug-in for Stellarium
3  *
4  * Copyright (C) 2014 Georg Zotti
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License
8  * as published by the Free Software Foundation; either version 2
9  * of the License, or (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program. If not, see <http://www.gnu.org/licenses/>.
18  */
19 
20 #ifndef _ARCHAEOLINESDIALOG_HPP_
21 #define _ARCHAEOLINESDIALOG_HPP_
22 
23 #include "StelDialog.hpp"
24 #include "StelGui.hpp"
25 #include "StelTranslator.hpp"
26 
27 #include <QString>
28 #include <QColor>
29 #include <QColorDialog>
30 
31 class Ui_archaeoLinesDialog;
32 class ArchaeoLines;
33 
37 {
38  Q_OBJECT
39 
40 public:
43 
44 public slots:
45  void retranslate();
46  // actions to be called by the color dialog
47  // These must also forward the colors in float format to the ArchaeoLines object.
48  void setEquinoxColor(QColor color){equinoxColor=color;}
49  void setSolsticeColor(QColor color){solsticeColor=color;}
50  void setCrossquarterColor(QColor color){crossquarterColor=color;}
51  void setMajorStandstillColor(QColor color){majorStandstillColor=color;}
52  void setMinorStandstillColor(QColor color){minorStandstillColor=color;}
53  void setZenithPassageColor(QColor color){zenithPassageColor=color;}
54  void setNadirPassageColor(QColor color){nadirPassageColor=color;}
55  void setCurrentSunColor(QColor color){currentSunColor=color;}
56  void setCurrentMoonColor(QColor color){currentMoonColor=color;}
57  void setCurrentPlanetColor(QColor color){currentPlanetColor=color;}
58  void setSelectedObjectColor(QColor color){selectedObjectColor=color;}
59  void setGeographicLocation1Color(QColor color){geographicLocation1Color=color;}
60  void setGeographicLocation2Color(QColor color){geographicLocation2Color=color;}
61  void setCustomAzimuth1Color(QColor color){customAzimuth1Color=color;}
62  void setCustomAzimuth2Color(QColor color){customAzimuth2Color=color;}
63  void setCustomDeclination1Color(QColor color){customDeclination1Color=color;}
64  void setCustomDeclination2Color(QColor color){customDeclination2Color=color;}
65  void askEquinoxColor();
66  void askSolsticeColor();
67  void askCrossquarterColor();
68  void askMajorStandstillColor();
69  void askMinorStandstillColor();
70  void askZenithPassageColor();
71  void askNadirPassageColor();
72  void askCurrentSunColor();
73  void askCurrentMoonColor();
74  void askCurrentPlanetColor();
75  void askSelectedObjectColor();
76  void askGeographicLocation1Color();
77  void askGeographicLocation2Color();
78  void askCustomAzimuth1Color();
79  void askCustomAzimuth2Color();
80  void askCustomDeclination1Color();
81  void askCustomDeclination2Color();
82 
83 protected:
84  void createDialogContent();
85 
86 private:
87  Ui_archaeoLinesDialog* ui;
88  ArchaeoLines* al;
89  // These are colors to be settable with a QColorDialog.
90  QColor equinoxColor;
91  QColor solsticeColor;
92  QColor crossquarterColor;
93  QColor majorStandstillColor;
94  QColor minorStandstillColor;
95  QColor zenithPassageColor;
96  QColor nadirPassageColor;
97  QColor currentSunColor;
98  QColor currentMoonColor;
99  QColor currentPlanetColor;
100  QColor selectedObjectColor;
101  QColor geographicLocation1Color;
102  QColor geographicLocation2Color;
103  QColor customAzimuth1Color;
104  QColor customAzimuth2Color;
105  QColor customDeclination1Color;
106  QColor customDeclination2Color;
107  QPixmap equinoxColorPixmap;
108  QPixmap solsticeColorPixmap;
109  QPixmap crossquarterColorPixmap;
110  QPixmap majorStandstillColorPixmap;
111  QPixmap minorStandstillColorPixmap;
112  QPixmap zenithPassageColorPixmap;
113  QPixmap nadirPassageColorPixmap;
114  QPixmap currentSunColorPixmap;
115  QPixmap currentMoonColorPixmap;
116  QPixmap currentPlanetColorPixmap;
117  QPixmap selectedObjectColorPixmap;
118  QPixmap geographicLocation1ColorPixmap;
119  QPixmap geographicLocation2ColorPixmap;
120  QPixmap customAzimuth1ColorPixmap;
121  QPixmap customAzimuth2ColorPixmap;
122  QPixmap customDeclination1ColorPixmap;
123  QPixmap customDeclination2ColorPixmap;
124  void setAboutHtml();
125 
126 private slots:
127  void resetArchaeoLinesSettings();
129  void setCurrentPlanetFromGUI(int index);
130  void setCurrentPlanetFromApp();
131 
132 };
133 
134 #endif /* _ARCHAEOLINESDIALOG_HPP_ */
Base class for all the GUI windows in Stellarium.
Definition: StelDialog.hpp:72
Main window of the ArchaeoLines plug-in.
Define some translation macros.
Main class of the ArchaeoLines plug-in.
void createDialogContent()
Initialize the dialog widgets and connect the signals/slots.