20 #ifndef ANGLEMEASURE_HPP_
21 #define ANGLEMEASURE_HPP_
24 #include "VecMath.hpp"
25 #include "StelModule.hpp"
26 #include "StelFader.hpp"
27 #include "StelCore.hpp"
73 Q_PROPERTY(
bool enabled
75 WRITE enableAngleMeasure)
76 Q_PROPERTY(
bool dmsFormat
79 Q_PROPERTY(
bool paDisplayed
81 WRITE showPositionAngle)
89 virtual void update(
double deltaTime);
91 virtual double getCallOrder(StelModuleActionName actionName)
const;
92 virtual void handleKeys(
class QKeyEvent* event);
93 virtual void handleMouseClicks(
class QMouseEvent* event);
94 virtual bool handleMouseMoves(
int x,
int y, Qt::MouseButtons b);
95 virtual bool configureGui(
bool show=
true);
96 bool isEnabled()
const {
return flagShowAngleMeasure;}
97 bool isDmsFormat()
const {
return flagUseDmsFormat; }
98 bool isPaDisplayed()
const {
return flagShowPA; }
99 bool isEquatorial()
const {
return flagShowEquatorial; }
100 bool isHorizontal()
const {
return flagShowHorizontal; }
101 bool isHorizontalStartSkylinked()
const {
return flagShowHorizontalStartSkylinked; }
102 bool isHorizontalEndSkylinked()
const {
return flagShowHorizontalEndSkylinked; }
103 bool isHorPaDisplayed()
const {
return flagShowHorizontalPA; }
128 void enableAngleMeasure(
bool b);
129 void useDmsFormat(
bool b);
130 void showPositionAngle(
bool b);
131 void showPositionAngleHor(
bool b);
132 void showEquatorial(
bool b);
133 void showHorizontal(
bool b);
134 void showHorizontalStartSkylinked(
bool b);
135 void showHorizontalEndSkylinked(
bool b);
138 void updateMessageText();
143 bool flagShowAngleMeasure;
144 bool withDecimalDegree;
147 QTimer* messageTimer;
148 QString messageEnabled;
149 QString messageLeftButton;
150 QString messageRightButton;
155 Vec3d perp1StartPoint;
157 Vec3d perp2StartPoint;
162 bool flagUseDmsFormat;
164 bool flagShowEquatorial;
165 bool flagShowHorizontal;
166 bool flagShowHorizontalPA;
167 bool flagShowHorizontalStartSkylinked;
168 bool flagShowHorizontalEndSkylinked;
173 Vec3d perp1StartPointHor;
174 Vec3d perp1EndPointHor;
175 Vec3d perp2StartPointHor;
176 Vec3d perp2EndPointHor;
182 void calculateEnds();
183 void calculateEndsOneLine(
const Vec3d start,
const Vec3d end, Vec3d &perp1Start, Vec3d &perp1End, Vec3d &perp2Start, Vec3d &perp2End,
double &angle);
184 QString calculateAngle(
bool horizontal=
false)
const;
185 QString calculatePositionAngle(
const Vec3d p1,
const Vec3d p2)
const;
186 void drawOne(
StelCore *core,
const StelCore::FrameType frameType,
const StelCore::RefractionMode refractionMode,
const Vec3f txtColor,
const Vec3f lineColor);
197 #include "StelPluginInterface.hpp"
203 Q_PLUGIN_METADATA(IID StelPluginInterface_iid)
Main class of the Angle Measure plug-in.
This class is used by Qt to manage a plug-in interface.
virtual StelPluginInfo getPluginInfo() const =0
void restoreDefaultSettings()
Restore the plug-in's settings to the default state.
void saveSettings()
Save the plug-in's settings to the configuration file.
virtual class StelModule * getStelModule() const =0
void loadSettings()
Load the plug-in's settings from the configuration file.
Main window of the Angle Measure plug-in.