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" 83 Q_PROPERTY(
Vec3f color READ getColor WRITE setColor)
84 Q_PROPERTY(
bool flagLabel READ isLabelVisible WRITE setLabelVisible)
115 ArchaeoLine(ArchaeoLine::Line lineType,
double definingAngle);
117 void draw(
StelCore* core,
float intensity=1.0f)
const;
118 const Vec3f& getColor()
const {
return color;}
119 bool isDisplayed(
void)
const {
return fader;}
122 void setColor(
const Vec3f& c) {color = c;}
123 void update(
double deltaTime) {fader.update((
int)(deltaTime*1000));}
124 void setFadeDuration(
float duration) {fader.setDuration((
int)(duration*1000.f));}
125 void setDisplayed(
const bool displayed){fader = displayed;}
126 void setFontSize(
double newSize){font.setPixelSize(newSize);}
129 double getDefiningAngle(
void)
const {
return definingAngle;}
132 void setLabelVisible(
bool b){flagLabel=b;}
133 bool isLabelVisible()
const{
return flagLabel;}
134 void setLineType(ArchaeoLine::Line line) {lineType=line;
updateLabel();}
136 void setLabel(
const QString newLabel){label=newLabel;}
137 QString getLabel()
const {
return label;}
140 ArchaeoLine::Line lineType;
141 double definingAngle;
157 Q_PROPERTY(
bool enabled
159 WRITE enableArchaeoLines
160 NOTIFY archaeoLinesEnabledChanged)
161 Q_PROPERTY(
bool flagShowEquinox
162 READ isEquinoxDisplayed
164 NOTIFY showEquinoxChanged
166 Q_PROPERTY(
bool flagShowSolstices
167 READ isSolsticesDisplayed
169 NOTIFY showSolsticesChanged
171 Q_PROPERTY(
bool flagShowCrossquarters
172 READ isCrossquartersDisplayed
173 WRITE showCrossquarters
174 NOTIFY showCrossquartersChanged
176 Q_PROPERTY(
bool flagShowMajorStandstills
177 READ isMajorStandstillsDisplayed
178 WRITE showMajorStandstills
179 NOTIFY showMajorStandstillsChanged
181 Q_PROPERTY(
bool flagShowMinorStandstills
182 READ isMinorStandstillsDisplayed
183 WRITE showMinorStandstills
184 NOTIFY showMinorStandstillsChanged
186 Q_PROPERTY(
bool flagShowZenithPassage
187 READ isZenithPassageDisplayed
188 WRITE showZenithPassage
189 NOTIFY showZenithPassageChanged
191 Q_PROPERTY(
bool flagShowNadirPassage
192 READ isNadirPassageDisplayed
193 WRITE showNadirPassage
194 NOTIFY showNadirPassageChanged
196 Q_PROPERTY(
bool flagShowSelectedObject
197 READ isSelectedObjectDisplayed
198 WRITE showSelectedObject
199 NOTIFY showSelectedObjectChanged
201 Q_PROPERTY(
bool flagShowCurrentSun
202 READ isCurrentSunDisplayed
204 NOTIFY showCurrentSunChanged
206 Q_PROPERTY(
bool flagShowCurrentMoon
207 READ isCurrentMoonDisplayed
208 WRITE showCurrentMoon
209 NOTIFY showCurrentMoonChanged
211 Q_PROPERTY(ArchaeoLine::Line enumShowCurrentPlanet
212 READ whichCurrentPlanetDisplayed
213 WRITE showCurrentPlanet
214 NOTIFY currentPlanetChanged)
215 Q_PROPERTY(
bool flagShowGeographicLocation1
216 READ isGeographicLocation1Displayed
217 WRITE showGeographicLocation1
218 NOTIFY showGeographicLocation1Changed
220 Q_PROPERTY(
bool flagShowGeographicLocation2
221 READ isGeographicLocation2Displayed
222 WRITE showGeographicLocation2
223 NOTIFY showGeographicLocation2Changed
225 Q_PROPERTY(
double geographicLocation1Longitude
226 READ getGeographicLocation1Longitude
227 WRITE setGeographicLocation1Longitude
228 NOTIFY geographicLocation1Changed)
229 Q_PROPERTY(
double geographicLocation1Latitude
230 READ getGeographicLocation1Latitude
231 WRITE setGeographicLocation1Latitude
232 NOTIFY geographicLocation1Changed)
233 Q_PROPERTY(
double geographicLocation2Longitude
234 READ getGeographicLocation2Longitude
235 WRITE setGeographicLocation2Longitude
236 NOTIFY geographicLocation2Changed)
237 Q_PROPERTY(
double geographicLocation2Latitude
238 READ getGeographicLocation2Latitude
239 WRITE setGeographicLocation2Latitude
240 NOTIFY geographicLocation2Changed)
241 Q_PROPERTY(
bool flagShowCustomAzimuth1
242 READ isCustomAzimuth1Displayed
243 WRITE showCustomAzimuth1
244 NOTIFY showCustomAzimuth1Changed
246 Q_PROPERTY(
bool flagShowCustomAzimuth2
247 READ isCustomAzimuth2Displayed
248 WRITE showCustomAzimuth2
249 NOTIFY showCustomAzimuth2Changed
252 Q_PROPERTY(
double customAzimuth1
253 READ getCustomAzimuth1
254 WRITE setCustomAzimuth1
255 NOTIFY customAzimuth1Changed)
256 Q_PROPERTY(
double customAzimuth2
257 READ getCustomAzimuth2
258 WRITE setCustomAzimuth2
259 NOTIFY customAzimuth2Changed)
260 Q_PROPERTY(
bool flagShowCustomDeclination1
261 READ isCustomDeclination1Displayed
262 WRITE showCustomDeclination1
263 NOTIFY showCustomDeclination1Changed
265 Q_PROPERTY(
bool flagShowCustomDeclination2
266 READ isCustomDeclination2Displayed
267 WRITE showCustomDeclination2
268 NOTIFY showCustomDeclination2Changed
271 Q_PROPERTY(
double customDeclination1
272 READ getCustomDeclination1
273 WRITE setCustomDeclination1
274 NOTIFY customDeclination1Changed)
275 Q_PROPERTY(
double customDeclination2
276 READ getCustomDeclination2
277 WRITE setCustomDeclination2
278 NOTIFY customDeclination2Changed)
290 virtual void update(
double deltaTime);
293 virtual void handleKeys(
class QKeyEvent* event){
event->setAccepted(
false);}
294 virtual bool configureGui(
bool show=
true);
303 void restoreDefaultSettings();
313 void archaeoLinesEnabledChanged(
bool on);
314 void showEquinoxChanged(
bool on);
315 void showSolsticesChanged(
bool on);
316 void showCrossquartersChanged(
bool on);
317 void showMajorStandstillsChanged(
bool on);
318 void showMinorStandstillsChanged(
bool on);
319 void showZenithPassageChanged(
bool on);
320 void showNadirPassageChanged(
bool on);
321 void showSelectedObjectChanged(
bool on);
322 void showCurrentSunChanged(
bool on);
323 void showCurrentMoonChanged(
bool on);
324 void showGeographicLocation1Changed(
bool on);
325 void showGeographicLocation2Changed(
bool on);
326 void geographicLocation1Changed();
327 void geographicLocation2Changed();
328 void showCustomAzimuth1Changed(
bool on);
329 void showCustomAzimuth2Changed(
bool on);
330 void customAzimuth1Changed(
double az);
331 void customAzimuth2Changed(
double az);
332 void showCustomDeclination1Changed(
bool on);
333 void showCustomDeclination2Changed(
bool on);
334 void customDeclination1Changed(
double dec);
335 void customDeclination2Changed(
double dec);
336 void currentPlanetChanged(ArchaeoLine::Line l);
339 void enableArchaeoLines(
bool b);
342 bool isEnabled()
const {
return flagShowArchaeoLines;}
343 bool isEquinoxDisplayed()
const {
return flagShowEquinox;}
344 bool isSolsticesDisplayed()
const {
return flagShowSolstices;}
345 bool isCrossquartersDisplayed()
const {
return flagShowCrossquarters;}
346 bool isMajorStandstillsDisplayed()
const {
return flagShowMajorStandstills;}
347 bool isMinorStandstillsDisplayed()
const {
return flagShowMinorStandstills;}
348 bool isZenithPassageDisplayed()
const {
return flagShowZenithPassage;}
349 bool isNadirPassageDisplayed()
const {
return flagShowNadirPassage;}
350 bool isSelectedObjectDisplayed()
const {
return flagShowSelectedObject;}
351 bool isCurrentSunDisplayed()
const {
return flagShowCurrentSun;}
352 bool isCurrentMoonDisplayed()
const {
return flagShowCurrentMoon;}
353 ArchaeoLine::Line whichCurrentPlanetDisplayed()
const {
return enumShowCurrentPlanet;}
354 bool isGeographicLocation1Displayed()
const {
return flagShowGeographicLocation1;}
355 bool isGeographicLocation2Displayed()
const {
return flagShowGeographicLocation2;}
356 bool isCustomAzimuth1Displayed()
const {
return flagShowCustomAzimuth1;}
357 bool isCustomAzimuth2Displayed()
const {
return flagShowCustomAzimuth2;}
358 bool isCustomDeclination1Displayed()
const {
return flagShowCustomDeclination1;}
359 bool isCustomDeclination2Displayed()
const {
return flagShowCustomDeclination2;}
362 void showEquinox(
bool b);
363 void showSolstices(
bool b);
364 void showCrossquarters(
bool b);
365 void showMajorStandstills(
bool b);
366 void showMinorStandstills(
bool b);
367 void showZenithPassage(
bool b);
368 void showNadirPassage(
bool b);
369 void showSelectedObject(
bool b);
370 void showCurrentSun(
bool b);
371 void showCurrentMoon(
bool b);
372 void showCurrentPlanet(ArchaeoLine::Line l);
373 void showCurrentPlanetNamed(QString planet);
374 void showGeographicLocation1(
bool b);
375 void showGeographicLocation2(
bool b);
376 void setGeographicLocation1Longitude(
double lng);
377 void setGeographicLocation1Latitude(
double lat);
378 void setGeographicLocation2Longitude(
double lng);
379 void setGeographicLocation2Latitude(
double lat);
380 void setGeographicLocation1Label(QString label);
381 void setGeographicLocation2Label(QString label);
382 double getGeographicLocation1Longitude()
const {
return geographicLocation1Longitude; }
383 double getGeographicLocation1Latitude()
const {
return geographicLocation1Latitude; }
384 double getGeographicLocation2Longitude()
const {
return geographicLocation2Longitude; }
385 double getGeographicLocation2Latitude()
const {
return geographicLocation2Latitude; }
386 void showCustomAzimuth1(
bool b);
387 void showCustomAzimuth2(
bool b);
388 void setCustomAzimuth1(
double az);
389 double getCustomAzimuth1()
const {
return customAzimuth1Line->getDefiningAngle(); }
390 void setCustomAzimuth2(
double az);
391 double getCustomAzimuth2()
const {
return customAzimuth2Line->getDefiningAngle(); }
392 void setCustomAzimuth1Label(QString label);
393 void setCustomAzimuth2Label(QString label);
394 void showCustomDeclination1(
bool b);
395 void showCustomDeclination2(
bool b);
396 void setCustomDeclination1(
double dec);
397 double getCustomDeclination1()
const {
return customDeclination1Line->getDefiningAngle(); }
398 void setCustomDeclination2(
double dec);
399 double getCustomDeclination2()
const {
return customDeclination2Line->getDefiningAngle(); }
400 void setCustomDeclination1Label(QString label);
401 void setCustomDeclination2Label(QString label);
404 void setLineColor(ArchaeoLine::Line whichLine, QColor color);
406 QColor getLineColor(ArchaeoLine::Line whichLine);
408 double getLineAngle(ArchaeoLine::Line whichLine);
409 QString getLineLabel(ArchaeoLine::Line whichLine);
415 double getAzimuthForLocation(
double longObs,
double latObs,
double longTarget,
double latTarget)
const;
419 bool flagShowArchaeoLines;
425 Vec3f solsticesColor;
426 Vec3f crossquartersColor;
427 Vec3f majorStandstillColor;
428 Vec3f minorStandstillColor;
429 Vec3f zenithPassageColor;
430 Vec3f nadirPassageColor;
431 Vec3f selectedObjectColor;
432 Vec3f currentSunColor;
433 Vec3f currentMoonColor;
434 Vec3f currentPlanetColor;
435 Vec3f geographicLocation1Color;
436 Vec3f geographicLocation2Color;
437 Vec3f customAzimuth1Color;
438 Vec3f customAzimuth2Color;
439 Vec3f customDeclination1Color;
440 Vec3f customDeclination2Color;
442 bool flagShowEquinox;
443 bool flagShowSolstices;
444 bool flagShowCrossquarters;
445 bool flagShowMajorStandstills;
446 bool flagShowMinorStandstills;
447 bool flagShowZenithPassage;
448 bool flagShowNadirPassage;
449 bool flagShowSelectedObject;
450 bool flagShowCurrentSun;
451 bool flagShowCurrentMoon;
452 ArchaeoLine::Line enumShowCurrentPlanet;
453 bool flagShowGeographicLocation1;
454 double geographicLocation1Longitude;
455 double geographicLocation1Latitude;
456 bool flagShowGeographicLocation2;
457 double geographicLocation2Longitude;
458 double geographicLocation2Latitude;
459 bool flagShowCustomAzimuth1;
460 bool flagShowCustomAzimuth2;
461 bool flagShowCustomDeclination1;
462 bool flagShowCustomDeclination2;
504 #include "StelPluginInterface.hpp" 510 Q_PLUGIN_METADATA(IID StelPluginInterface_iid)
Store the informations for a location on a planet.
Define the interface to implement when creating a plugin.
void setLabel(const QString newLabel)
change label. Used only for selected-object line - the other labels should not be changed! ...
Implementation of StelFader which implements a linear transition.
void updateLabel()
Re-translates the label.
Main class for Stellarium core processing.
This class is used by Qt to manage a plug-in interface.
void setDefiningAngle(double angle)
reset declination/azimuth angle (degrees) of this arc.
Class which manages a line (small circle) to display around the sky like the solstices line...
Main window of the ArchaeoLines plug-in.
FrameType
Supported reference frame types.
virtual void handleKeys(class QKeyEvent *event)
Handle key events.
Manage the selection and queries on one or more StelObjects.
StelModuleActionName
Define the possible action for which an order is defined.
Main class of the ArchaeoLines plug-in.
This is the common base class for all the main components of stellarium.
Contains information about a Stellarium plugin.