19 #ifndef ARCHAEOLINES_HPP_
20 #define ARCHAEOLINES_HPP_
25 #include "VecMath.hpp"
26 #include "StelModule.hpp"
27 #include "StelFader.hpp"
28 #include "StelCore.hpp"
29 #include "StelObjectMgr.hpp"
78 Q_PROPERTY(Vec3f color READ getColor WRITE setColor)
79 Q_PROPERTY(
bool flagLabel READ isLabelVisible WRITE setLabelVisible)
100 ArchaeoLine(ArchaeoLine::Line lineType,
double declination);
102 void draw(
StelCore* core,
float intensity=1.0f)
const;
103 const Vec3f& getColor()
const {
return color;}
104 bool isDisplayed(
void)
const {
return fader;}
107 void setColor(
const Vec3f& c) {color = c;}
108 void update(
double deltaTime) {fader.update((
int)(deltaTime*1000));}
109 void setFadeDuration(
float duration) {fader.setDuration((
int)(duration*1000.f));}
110 void setDisplayed(
const bool displayed){fader = displayed;}
111 void setFontSize(
double newSize){font.setPixelSize(newSize);}
114 void setLabelVisible(
bool b){flagLabel=b;}
117 bool isLabelVisible()
const{
return flagLabel;}
118 void setLineType(ArchaeoLine::Line line) {lineType=line;
updateLabel();}
120 void setLabel(
const QString newLabel){label=newLabel;}
123 ArchaeoLine::Line lineType;
126 StelCore::FrameType frameType;
139 Q_PROPERTY(
bool enabled
141 WRITE enableArchaeoLines)
145 Q_PROPERTY(
bool flagShowEquinox
146 READ isEquinoxDisplayed
148 Q_PROPERTY(
bool flagShowSolstices
149 READ isSolsticesDisplayed
151 Q_PROPERTY(
bool flagShowCrossquarters
152 READ isCrossquartersDisplayed
153 WRITE showCrossquarters)
154 Q_PROPERTY(
bool flagShowMajorStandstills
155 READ isMajorStandstillsDisplayed
156 WRITE showMajorStandstills)
157 Q_PROPERTY(
bool flagShowMinorStandstills
158 READ isMinorStandstillsDisplayed
159 WRITE showMinorStandstills)
160 Q_PROPERTY(
bool flagShowZenithPassage
161 READ isZenithPassageDisplayed
162 WRITE showZenithPassage)
163 Q_PROPERTY(
bool flagShowNadirPassage
164 READ isNadirPassageDisplayed
165 WRITE showNadirPassage)
166 Q_PROPERTY(
bool flagShowSelectedObject
167 READ isSelectedObjectDisplayed
168 WRITE showSelectedObject)
169 Q_PROPERTY(
bool flagShowCurrentSun
170 READ isCurrentSunDisplayed
171 WRITE showCurrentSun)
172 Q_PROPERTY(
bool flagShowCurrentMoon
173 READ isCurrentMoonDisplayed
174 WRITE showCurrentMoon)
175 Q_PROPERTY(ArchaeoLine::Line enumShowCurrentPlanet
176 READ whichCurrentPlanetDisplayed
177 WRITE showCurrentPlanet)
188 virtual void update(
double deltaTime);
190 virtual double getCallOrder(StelModuleActionName actionName)
const;
191 virtual void handleKeys(
class QKeyEvent* event){
event->setAccepted(
false);}
192 virtual bool configureGui(
bool show=
true);
193 bool isEnabled()
const {
return flagShowArchaeoLines;}
194 bool isDmsFormat()
const {
return flagUseDmsFormat; }
195 bool isEquinoxDisplayed()
const {
return flagShowEquinox;}
196 bool isSolsticesDisplayed()
const {
return flagShowSolstices;}
197 bool isCrossquartersDisplayed()
const {
return flagShowCrossquarters;}
198 bool isMajorStandstillsDisplayed()
const {
return flagShowMajorStandstills;}
199 bool isMinorStandstillsDisplayed()
const {
return flagShowMinorStandstills;}
200 bool isZenithPassageDisplayed()
const {
return flagShowZenithPassage;}
201 bool isNadirPassageDisplayed()
const {
return flagShowNadirPassage;}
202 bool isSelectedObjectDisplayed()
const {
return flagShowSelectedObject;}
203 bool isCurrentSunDisplayed()
const {
return flagShowCurrentSun;}
204 bool isCurrentMoonDisplayed()
const {
return flagShowCurrentMoon;}
205 ArchaeoLine::Line whichCurrentPlanetDisplayed()
const {
return enumShowCurrentPlanet;}
222 void enableArchaeoLines(
bool b);
225 void showEquinox(
bool b);
226 void showSolstices(
bool b);
227 void showCrossquarters(
bool b);
228 void showMajorStandstills(
bool b);
229 void showMinorStandstills(
bool b);
230 void showZenithPassage(
bool b);
231 void showNadirPassage(
bool b);
232 void showSelectedObject(
bool b);
233 void showCurrentSun(
bool b);
234 void showCurrentMoon(
bool b);
235 void showCurrentPlanet(ArchaeoLine::Line l);
236 void showCurrentPlanet(QString planet);
239 void setLineColor(ArchaeoLine::Line whichLine, QColor color);
241 QColor getLineColor(ArchaeoLine::Line whichLine);
245 bool flagShowArchaeoLines;
246 bool withDecimalDegree;
247 bool flagUseDmsFormat;
251 Vec3f solsticesColor;
252 Vec3f crossquartersColor;
253 Vec3f majorStandstillColor;
254 Vec3f minorStandstillColor;
255 Vec3f zenithPassageColor;
256 Vec3f nadirPassageColor;
257 Vec3f selectedObjectColor;
258 Vec3f currentSunColor;
259 Vec3f currentMoonColor;
260 Vec3f currentPlanetColor;
264 bool flagShowEquinox;
265 bool flagShowSolstices;
266 bool flagShowCrossquarters;
267 bool flagShowMajorStandstills;
268 bool flagShowMinorStandstills;
269 bool flagShowZenithPassage;
270 bool flagShowNadirPassage;
271 bool flagShowSelectedObject;
272 bool flagShowCurrentSun;
273 bool flagShowCurrentMoon;
274 ArchaeoLine::Line enumShowCurrentPlanet;
319 #include "StelPluginInterface.hpp"
325 Q_PLUGIN_METADATA(IID StelPluginInterface_iid)
void setLabel(const QString newLabel)
change label. Used only for selected-object line - the other labels should not be changed! ...
void loadSettings()
Load the plug-in's settings from the configuration file.
void updateLabel()
Re-translates the label.
void setDeclination(double decl)
reset declination (degrees) of this small arc.
This class is used by Qt to manage a plug-in interface.
Class which manages a line (small circle) to display around the sky like the solstices line...
virtual StelPluginInfo getPluginInfo() const =0
Main window of the ArchaeoLines plug-in.
virtual class StelModule * getStelModule() const =0
Main class of the ArchaeoLines plug-in.
void restoreDefaultSettings()
Restore the plug-in's settings to the default state.