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 NOTIFY colorChanged)
84 Q_PROPERTY(
bool flagLabel READ isLabelVisible WRITE setLabelVisible NOTIFY flagLabelChanged)
85 Q_PROPERTY(
double definingAngle READ getDefiningAngle WRITE
setDefiningAngle NOTIFY definingAngleChanged)
116 ArchaeoLine(ArchaeoLine::Line lineType,
double definingAngle);
118 void draw(
StelCore* core,
float intensity=1.0f)
const;
119 const Vec3f& getColor()
const {
return color;}
120 bool isDisplayed(
void)
const {
return fader;}
122 void colorChanged(
Vec3f c);
123 void flagLabelChanged(
bool on);
124 void definingAngleChanged(
double angle);
126 void setColor(
const Vec3f& c);
127 void update(
double deltaTime) {fader.update((
int)(deltaTime*1000));}
128 void setFadeDuration(
float duration) {fader.setDuration((
int)(duration*1000.f));}
129 void setDisplayed(
const bool displayed){fader = displayed;}
130 void setFontSize(
double newSize){font.setPixelSize(newSize);}
133 double getDefiningAngle(
void)
const {
return definingAngle;}
136 void setLabelVisible(
bool b);
137 bool isLabelVisible()
const{
return flagLabel;}
138 void setLineType(ArchaeoLine::Line line) {lineType=line;
updateLabel();}
140 void setLabel(
const QString newLabel){label=newLabel;}
141 QString getLabel()
const {
return label;}
144 ArchaeoLine::Line lineType;
145 double definingAngle;
161 Q_PROPERTY(
bool enabled
163 WRITE enableArchaeoLines
164 NOTIFY archaeoLinesEnabledChanged)
165 Q_PROPERTY(
bool flagShowEquinox
166 READ isEquinoxDisplayed
168 NOTIFY showEquinoxChanged
170 Q_PROPERTY(
bool flagShowSolstices
171 READ isSolsticesDisplayed
173 NOTIFY showSolsticesChanged
175 Q_PROPERTY(
bool flagShowCrossquarters
176 READ isCrossquartersDisplayed
177 WRITE showCrossquarters
178 NOTIFY showCrossquartersChanged
180 Q_PROPERTY(
bool flagShowMajorStandstills
181 READ isMajorStandstillsDisplayed
182 WRITE showMajorStandstills
183 NOTIFY showMajorStandstillsChanged
185 Q_PROPERTY(
bool flagShowMinorStandstills
186 READ isMinorStandstillsDisplayed
187 WRITE showMinorStandstills
188 NOTIFY showMinorStandstillsChanged
190 Q_PROPERTY(
bool flagShowZenithPassage
191 READ isZenithPassageDisplayed
192 WRITE showZenithPassage
193 NOTIFY showZenithPassageChanged
195 Q_PROPERTY(
bool flagShowNadirPassage
196 READ isNadirPassageDisplayed
197 WRITE showNadirPassage
198 NOTIFY showNadirPassageChanged
200 Q_PROPERTY(
bool flagShowSelectedObject
201 READ isSelectedObjectDisplayed
202 WRITE showSelectedObject
203 NOTIFY showSelectedObjectChanged
205 Q_PROPERTY(
bool flagShowCurrentSun
206 READ isCurrentSunDisplayed
208 NOTIFY showCurrentSunChanged
210 Q_PROPERTY(
bool flagShowCurrentMoon
211 READ isCurrentMoonDisplayed
212 WRITE showCurrentMoon
213 NOTIFY showCurrentMoonChanged
215 Q_PROPERTY(ArchaeoLine::Line enumShowCurrentPlanet
216 READ whichCurrentPlanetDisplayed
217 WRITE showCurrentPlanet
218 NOTIFY currentPlanetChanged)
219 Q_PROPERTY(
bool flagShowGeographicLocation1
220 READ isGeographicLocation1Displayed
221 WRITE showGeographicLocation1
222 NOTIFY showGeographicLocation1Changed
224 Q_PROPERTY(
bool flagShowGeographicLocation2
225 READ isGeographicLocation2Displayed
226 WRITE showGeographicLocation2
227 NOTIFY showGeographicLocation2Changed
229 Q_PROPERTY(
double geographicLocation1Longitude
230 READ getGeographicLocation1Longitude
231 WRITE setGeographicLocation1Longitude
232 NOTIFY geographicLocation1Changed)
233 Q_PROPERTY(
double geographicLocation1Latitude
234 READ getGeographicLocation1Latitude
235 WRITE setGeographicLocation1Latitude
236 NOTIFY geographicLocation1Changed)
237 Q_PROPERTY(
double geographicLocation2Longitude
238 READ getGeographicLocation2Longitude
239 WRITE setGeographicLocation2Longitude
240 NOTIFY geographicLocation2Changed)
241 Q_PROPERTY(
double geographicLocation2Latitude
242 READ getGeographicLocation2Latitude
243 WRITE setGeographicLocation2Latitude
244 NOTIFY geographicLocation2Changed)
245 Q_PROPERTY(
bool flagShowCustomAzimuth1
246 READ isCustomAzimuth1Displayed
247 WRITE showCustomAzimuth1
248 NOTIFY showCustomAzimuth1Changed
250 Q_PROPERTY(
bool flagShowCustomAzimuth2
251 READ isCustomAzimuth2Displayed
252 WRITE showCustomAzimuth2
253 NOTIFY showCustomAzimuth2Changed
256 Q_PROPERTY(
double customAzimuth1
257 READ getCustomAzimuth1
258 WRITE setCustomAzimuth1
259 NOTIFY customAzimuth1Changed)
260 Q_PROPERTY(
double customAzimuth2
261 READ getCustomAzimuth2
262 WRITE setCustomAzimuth2
263 NOTIFY customAzimuth2Changed)
264 Q_PROPERTY(
bool flagShowCustomDeclination1
265 READ isCustomDeclination1Displayed
266 WRITE showCustomDeclination1
267 NOTIFY showCustomDeclination1Changed
269 Q_PROPERTY(
bool flagShowCustomDeclination2
270 READ isCustomDeclination2Displayed
271 WRITE showCustomDeclination2
272 NOTIFY showCustomDeclination2Changed
275 Q_PROPERTY(
double customDeclination1
276 READ getCustomDeclination1
277 WRITE setCustomDeclination1
278 NOTIFY customDeclination1Changed)
279 Q_PROPERTY(
double customDeclination2
280 READ getCustomDeclination2
281 WRITE setCustomDeclination2
282 NOTIFY customDeclination2Changed)
285 Q_PROPERTY(QString geographicLocation1Label READ getGeographicLocation1Label WRITE setGeographicLocation1Label NOTIFY geographicLocation1LabelChanged)
286 Q_PROPERTY(QString geographicLocation2Label READ getGeographicLocation2Label WRITE setGeographicLocation2Label NOTIFY geographicLocation2LabelChanged)
287 Q_PROPERTY(QString customAzimuth1Label READ getCustomAzimuth1Label WRITE setCustomAzimuth1Label NOTIFY customAzimuth1LabelChanged)
288 Q_PROPERTY(QString customAzimuth2Label READ getCustomAzimuth2Label WRITE setCustomAzimuth2Label NOTIFY customAzimuth2LabelChanged)
289 Q_PROPERTY(QString customDeclination1Label READ getCustomDeclination1Label WRITE setCustomDeclination1Label NOTIFY customDeclination1LabelChanged)
290 Q_PROPERTY(QString customDeclination2Label READ getCustomDeclination2Label WRITE setCustomDeclination2Label NOTIFY customDeclination2LabelChanged)
300 virtual void update(
double deltaTime);
303 virtual void handleKeys(
class QKeyEvent* event){
event->setAccepted(
false);}
304 virtual bool configureGui(
bool show=
true);
313 void restoreDefaultSettings();
323 void archaeoLinesEnabledChanged(
bool on);
324 void showEquinoxChanged(
bool on);
325 void showSolsticesChanged(
bool on);
326 void showCrossquartersChanged(
bool on);
327 void showMajorStandstillsChanged(
bool on);
328 void showMinorStandstillsChanged(
bool on);
329 void showZenithPassageChanged(
bool on);
330 void showNadirPassageChanged(
bool on);
331 void showSelectedObjectChanged(
bool on);
332 void showCurrentSunChanged(
bool on);
333 void showCurrentMoonChanged(
bool on);
334 void showGeographicLocation1Changed(
bool on);
335 void showGeographicLocation2Changed(
bool on);
336 void geographicLocation1Changed();
337 void geographicLocation2Changed();
338 void showCustomAzimuth1Changed(
bool on);
339 void showCustomAzimuth2Changed(
bool on);
340 void customAzimuth1Changed(
double az);
341 void customAzimuth2Changed(
double az);
342 void showCustomDeclination1Changed(
bool on);
343 void showCustomDeclination2Changed(
bool on);
344 void customDeclination1Changed(
double dec);
345 void customDeclination2Changed(
double dec);
346 void currentPlanetChanged(ArchaeoLine::Line l);
347 void geographicLocation1LabelChanged(QString label);
348 void geographicLocation2LabelChanged(QString label);
349 void customAzimuth1LabelChanged(QString label);
350 void customAzimuth2LabelChanged(QString label);
351 void customDeclination1LabelChanged(QString label);
352 void customDeclination2LabelChanged(QString label);
355 void enableArchaeoLines(
bool b);
358 bool isEnabled()
const {
return flagShowArchaeoLines;}
359 bool isEquinoxDisplayed()
const {
return flagShowEquinox;}
360 bool isSolsticesDisplayed()
const {
return flagShowSolstices;}
361 bool isCrossquartersDisplayed()
const {
return flagShowCrossquarters;}
362 bool isMajorStandstillsDisplayed()
const {
return flagShowMajorStandstills;}
363 bool isMinorStandstillsDisplayed()
const {
return flagShowMinorStandstills;}
364 bool isZenithPassageDisplayed()
const {
return flagShowZenithPassage;}
365 bool isNadirPassageDisplayed()
const {
return flagShowNadirPassage;}
366 bool isSelectedObjectDisplayed()
const {
return flagShowSelectedObject;}
367 bool isCurrentSunDisplayed()
const {
return flagShowCurrentSun;}
368 bool isCurrentMoonDisplayed()
const {
return flagShowCurrentMoon;}
369 ArchaeoLine::Line whichCurrentPlanetDisplayed()
const {
return enumShowCurrentPlanet;}
370 bool isGeographicLocation1Displayed()
const {
return flagShowGeographicLocation1;}
371 bool isGeographicLocation2Displayed()
const {
return flagShowGeographicLocation2;}
372 bool isCustomAzimuth1Displayed()
const {
return flagShowCustomAzimuth1;}
373 bool isCustomAzimuth2Displayed()
const {
return flagShowCustomAzimuth2;}
374 bool isCustomDeclination1Displayed()
const {
return flagShowCustomDeclination1;}
375 bool isCustomDeclination2Displayed()
const {
return flagShowCustomDeclination2;}
378 void showEquinox(
bool b);
379 void showSolstices(
bool b);
380 void showCrossquarters(
bool b);
381 void showMajorStandstills(
bool b);
382 void showMinorStandstills(
bool b);
383 void showZenithPassage(
bool b);
384 void showNadirPassage(
bool b);
385 void showSelectedObject(
bool b);
386 void showCurrentSun(
bool b);
387 void showCurrentMoon(
bool b);
388 void showCurrentPlanet(ArchaeoLine::Line l);
389 void showCurrentPlanetNamed(QString planet);
390 void showGeographicLocation1(
bool b);
391 void showGeographicLocation2(
bool b);
392 void setGeographicLocation1Longitude(
double lng);
393 void setGeographicLocation1Latitude(
double lat);
394 void setGeographicLocation2Longitude(
double lng);
395 void setGeographicLocation2Latitude(
double lat);
396 void setGeographicLocation1Label(QString label);
397 void setGeographicLocation2Label(QString label);
398 QString getGeographicLocation1Label(){
return geographicLocation1Line->getLabel();}
399 QString getGeographicLocation2Label(){
return geographicLocation2Line->getLabel();}
400 double getGeographicLocation1Longitude()
const {
return geographicLocation1Longitude; }
401 double getGeographicLocation1Latitude()
const {
return geographicLocation1Latitude; }
402 double getGeographicLocation2Longitude()
const {
return geographicLocation2Longitude; }
403 double getGeographicLocation2Latitude()
const {
return geographicLocation2Latitude; }
404 void showCustomAzimuth1(
bool b);
405 void showCustomAzimuth2(
bool b);
406 void setCustomAzimuth1(
double az);
407 double getCustomAzimuth1()
const {
return customAzimuth1Line->getDefiningAngle(); }
408 void setCustomAzimuth2(
double az);
409 double getCustomAzimuth2()
const {
return customAzimuth2Line->getDefiningAngle(); }
410 void setCustomAzimuth1Label(QString label);
411 void setCustomAzimuth2Label(QString label);
412 QString getCustomAzimuth1Label(){
return customAzimuth1Line->getLabel();}
413 QString getCustomAzimuth2Label(){
return customAzimuth2Line->getLabel();}
414 void showCustomDeclination1(
bool b);
415 void showCustomDeclination2(
bool b);
416 void setCustomDeclination1(
double dec);
417 double getCustomDeclination1()
const {
return customDeclination1Line->getDefiningAngle(); }
418 void setCustomDeclination2(
double dec);
419 double getCustomDeclination2()
const {
return customDeclination2Line->getDefiningAngle(); }
420 void setCustomDeclination1Label(QString label);
421 void setCustomDeclination2Label(QString label);
422 QString getCustomDeclination1Label(){
return customDeclination1Line->getLabel();}
423 QString getCustomDeclination2Label(){
return customDeclination2Line->getLabel();}
426 void setLineColor(ArchaeoLine::Line whichLine, QColor color);
428 QColor getLineColor(ArchaeoLine::Line whichLine)
const;
430 double getLineAngle(ArchaeoLine::Line whichLine)
const;
431 QString getLineLabel(ArchaeoLine::Line whichLine)
const;
437 static double getAzimuthForLocation(
double longObs,
double latObs,
double longTarget,
double latTarget);
441 bool flagShowArchaeoLines;
447 Vec3f solsticesColor;
448 Vec3f crossquartersColor;
449 Vec3f majorStandstillColor;
450 Vec3f minorStandstillColor;
451 Vec3f zenithPassageColor;
452 Vec3f nadirPassageColor;
453 Vec3f selectedObjectColor;
454 Vec3f currentSunColor;
455 Vec3f currentMoonColor;
456 Vec3f currentPlanetColor;
457 Vec3f geographicLocation1Color;
458 Vec3f geographicLocation2Color;
459 Vec3f customAzimuth1Color;
460 Vec3f customAzimuth2Color;
461 Vec3f customDeclination1Color;
462 Vec3f customDeclination2Color;
464 bool flagShowEquinox;
465 bool flagShowSolstices;
466 bool flagShowCrossquarters;
467 bool flagShowMajorStandstills;
468 bool flagShowMinorStandstills;
469 bool flagShowZenithPassage;
470 bool flagShowNadirPassage;
471 bool flagShowSelectedObject;
472 bool flagShowCurrentSun;
473 bool flagShowCurrentMoon;
474 ArchaeoLine::Line enumShowCurrentPlanet;
475 bool flagShowGeographicLocation1;
476 double geographicLocation1Longitude;
477 double geographicLocation1Latitude;
478 bool flagShowGeographicLocation2;
479 double geographicLocation2Longitude;
480 double geographicLocation2Latitude;
481 bool flagShowCustomAzimuth1;
482 bool flagShowCustomAzimuth2;
483 bool flagShowCustomDeclination1;
484 bool flagShowCustomDeclination2;
526 #include "StelPluginInterface.hpp" 532 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! ...
A simple line class, identified by a point and a direction vector.
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.
virtual QObjectList getExtensionList() const
A mechanism to provide abitrary QObjects to the StelModuleMgr.
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.