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 NOTIFY flagAngleMeasureChanged
78 Q_PROPERTY(
bool dmsFormat
81 Q_PROPERTY(
bool paDisplayed
83 WRITE showPositionAngle)
91 virtual void update(
double deltaTime);
94 virtual void handleKeys(
class QKeyEvent* event);
98 bool isEnabled()
const {
return flagShowAngleMeasure;}
99 bool isDmsFormat()
const {
return flagUseDmsFormat; }
100 bool isPaDisplayed()
const {
return flagShowPA; }
101 bool isEquatorial()
const {
return flagShowEquatorial; }
102 bool isHorizontal()
const {
return flagShowHorizontal; }
103 bool isHorizontalStartSkylinked()
const {
return flagShowHorizontalStartSkylinked; }
104 bool isHorizontalEndSkylinked()
const {
return flagShowHorizontalEndSkylinked; }
105 bool isHorPaDisplayed()
const {
return flagShowHorizontalPA; }
121 void flagAngleMeasureChanged(
bool b);
124 void enableAngleMeasure(
bool b);
125 void useDmsFormat(
bool b);
126 void showPositionAngle(
bool b);
127 void showPositionAngleHor(
bool b);
128 void showEquatorial(
bool b);
129 void showHorizontal(
bool b);
130 void showHorizontalStartSkylinked(
bool b);
131 void showHorizontalEndSkylinked(
bool b);
134 void updateMessageText();
139 bool flagShowAngleMeasure;
140 bool withDecimalDegree;
143 QTimer* messageTimer;
144 QString messageEnabled;
145 QString messageLeftButton;
146 QString messageRightButton;
151 Vec3d perp1StartPoint;
153 Vec3d perp2StartPoint;
158 bool flagUseDmsFormat;
160 bool flagShowEquatorial;
161 bool flagShowHorizontal;
162 bool flagShowHorizontalPA;
163 bool flagShowHorizontalStartSkylinked;
164 bool flagShowHorizontalEndSkylinked;
169 Vec3d perp1StartPointHor;
170 Vec3d perp1EndPointHor;
171 Vec3d perp2StartPointHor;
172 Vec3d perp2EndPointHor;
178 void calculateEnds();
179 void calculateEndsOneLine(
const Vec3d start,
const Vec3d end,
Vec3d &perp1Start,
Vec3d &perp1End,
Vec3d &perp2Start,
Vec3d &perp2End,
double &angle);
180 QString calculateAngle(
bool horizontal=
false)
const;
181 QString calculatePositionAngle(
const Vec3d p1,
const Vec3d p2)
const;
193 #include "StelPluginInterface.hpp" 199 Q_PLUGIN_METADATA(IID StelPluginInterface_iid)
virtual bool handleMouseMoves(int x, int y, Qt::MouseButtons b)
Handle mouse moves.
virtual void handleKeys(class QKeyEvent *event)
Handle key events.
Define the interface to implement when creating a plugin.
Implementation of StelFader which implements a linear transition.
Main class of the Angle Measure plug-in.
Main class for Stellarium core processing.
This class is used by Qt to manage a plug-in interface.
FrameType
Supported reference frame types.
virtual void init()
Initialize itself.
void restoreDefaultSettings()
Restore the plug-in's settings to the default state.
StelModuleActionName
Define the possible action for which an order is defined.
virtual double getCallOrder(StelModuleActionName actionName) const
Return the value defining the order of call for the given action For example if stars.callOrder[ActionDraw] == 10 and constellation.callOrder[ActionDraw] == 11, the stars module will be drawn before the constellations.
virtual void update(double deltaTime)
Update the module with respect to the time.
void loadSettings()
Load the plug-in's settings from the configuration file.
virtual void draw(StelCore *core)
Execute all the drawing functions for this module.
Main window of the Angle Measure plug-in.
virtual void handleMouseClicks(class QMouseEvent *event)
Handle mouse clicks.
A templatized 3d vector compatible with openGL.
RefractionMode
Available refraction mode.
virtual bool configureGui(bool show=true)
Detect or show the configuration GUI elements for the module.
This is the common base class for all the main components of stellarium.
Contains information about a Stellarium plugin.