26 #include "OcularDialog.hpp" 27 #include "StelModule.hpp" 28 #include "StelTexture.hpp" 29 #include "Telescope.hpp" 30 #include "VecMath.hpp" 35 #define MIN_OCULARS_INI_VERSION 3.1f 79 Q_PROPERTY(
bool enableOcular READ getEnableOcular WRITE enableOcular NOTIFY enableOcularChanged)
80 Q_PROPERTY(
bool enableCrosshairs READ getEnableCrosshairs WRITE toggleCrosshairs NOTIFY enableCrosshairsChanged)
81 Q_PROPERTY(
bool enableCCD READ getEnableCCD WRITE
toggleCCD NOTIFY enableCCDChanged)
82 Q_PROPERTY(
bool enableTelrad READ getEnableTelrad WRITE
toggleTelrad NOTIFY enableTelradChanged)
83 Q_PROPERTY(
bool flagHideGridsLines READ getFlagHideGridsLines WRITE setFlagHideGridsLines NOTIFY hideGridsLinesChanged)
92 static QSettings* appSettings();
105 virtual void handleKeys(
class QKeyEvent* event);
108 double ccdRotationAngle()
const;
110 QString getDimensionsString(
double fovX,
double fovY)
const;
111 QString getFOVString(
double fov)
const;
118 void ccdRotationReset();
119 void decrementCCDIndex();
120 void decrementOcularIndex();
121 void decrementTelescopeIndex();
122 void decrementLensIndex();
123 void displayPopupMenu();
126 void enableOcular(
bool b);
127 bool getEnableOcular()
const {
return flagShowOculars; }
128 void incrementCCDIndex();
129 void incrementOcularIndex();
130 void incrementTelescopeIndex();
131 void incrementLensIndex();
142 bool getEnableCCD()
const {
return flagShowCCD; }
143 void toggleCrosshairs(
bool show =
true);
144 bool getEnableCrosshairs()
const {
return flagShowCrosshairs; }
147 bool getEnableTelrad()
const {
return flagShowTelrad; }
150 void enableGuiPanel(
bool enable =
true);
152 void setFlagDecimalDegrees(
const bool b);
153 bool getFlagDecimalDegrees(
void)
const;
155 void setFlagLimitMagnitude(
const bool b);
156 bool getFlagLimitMagnitude(
void)
const;
158 void setFlagInitFovUsage(
const bool b);
159 bool getFlagInitFovUsage(
void)
const;
161 void setFlagInitDirectionUsage(
const bool b);
162 bool getFlagInitDirectionUsage(
void)
const;
164 void setFlagAutosetMountForCCD(
const bool b);
165 bool getFlagAutosetMountForCCD(
void)
const;
167 void setFlagUseSemiTransparency(
const bool b);
168 bool getFlagUseSemiTransparency(
void)
const;
170 void setFlagShowResolutionCriterions(
const bool b);
171 bool getFlagShowResolutionCriterions(
void)
const;
173 void setFlagHideGridsLines(
const bool b);
174 bool getFlagHideGridsLines(
void)
const;
177 void enableOcularChanged(
bool value);
178 void enableCrosshairsChanged(
bool value);
179 void enableCCDChanged(
bool value);
180 void enableTelradChanged(
bool value);
181 void selectedCCDChanged();
182 void selectedOcularChanged();
183 void selectedTelescopeChanged();
184 void selectedLensChanged();
185 void hideGridsLinesChanged(
bool value);
189 void instrumentChanged();
190 void determineMaxEyepieceAngle();
191 void setRequireSelection(
bool state);
192 void setScaleImageCircle(
bool state);
193 void setScreenFOVForCCD();
194 void retranslateGui();
195 void updateOcularReticle(
void);
199 void initializeActivationActions();
202 bool isBinocularDefined();
205 void paintCCDBounds();
207 void paintCrosshairs();
209 void paintOcularMask(
const StelCore * core);
215 void paintText(
const StelCore * core);
226 void validateAndLoadIniFile();
232 void zoom(
bool zoomedIn);
237 void hideUsageMessageIfDisplayed();
240 QMenu* addLensSubmenu(QMenu* parent);
243 QMenu* addTelescopeSubmenu(QMenu* parent);
246 Lens* selectedLens();
250 QList<Ocular *> oculars;
251 QList<Telescope *> telescopes;
252 QList<Lens *> lenses;
254 int selectedCCDIndex;
255 int selectedOcularIndex;
256 int selectedTelescopeIndex;
257 int selectedLensIndex;
261 bool flagShowOculars;
262 bool flagShowCrosshairs;
264 int usageMessageLabelID;
266 bool flagCardinalPoints;
273 bool flagLimitPlanets;
274 float magLimitPlanets;
275 float relativeStarScaleMain;
276 float absoluteStarScaleMain;
277 float relativeStarScaleOculars;
278 float absoluteStarScaleOculars;
279 float relativeStarScaleCCD;
280 float absoluteStarScaleCCD;
283 double maxEyepieceAngle;
284 bool requireSelection;
285 bool flagLimitMagnitude;
286 bool useMaxEyepieceAngle;
287 bool guiPanelEnabled;
289 bool flagDecimalDegrees;
290 bool flagSemiTransparency;
291 bool flagHideGridsLines;
292 bool flagGridLinesDisplayedMain;
293 bool flagConstellationLines;
294 bool flagAsterismLines;
298 QSignalMapper * ccdRotationSignalMapper;
299 QSignalMapper * ccdsSignalMapper;
300 QSignalMapper * ocularsSignalMapper;
301 QSignalMapper * telescopesSignalMapper;
302 QSignalMapper * lensesSignalMapper;
306 QPixmap * pxmapOnIcon;
307 QPixmap * pxmapOffIcon;
330 bool flagInitFOVUsage;
331 bool flagInitDirectionUsage;
332 bool flagAutosetMountForCCD;
333 bool flagShowResolutionCriterions;
334 bool equatorialMountEnabled;
335 double reticleRotation;
341 #include "StelPluginInterface.hpp" 347 Q_PLUGIN_METADATA(IID StelPluginInterface_iid)
virtual bool configureGui(bool show=true)
Detect or show the configuration GUI elements for the module.
Define the interface to implement when creating a plugin.
void rotateCCD(QString amount)
amount must be a number.
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.
void selectTelescopeAtIndex(QString indexString)
indexString must be an integer, in the range of -1:telescopes.count()
Main class for Stellarium core processing.
void toggleTelrad()
Toggles the Telrad sight overlay (overloaded for blind switching).
virtual void draw(StelCore *core)
Execute all the drawing functions for this module.
virtual void handleKeys(class QKeyEvent *event)
Returns the module-specific style sheet.
void toggleCCD()
Toggles the sensor frame overlay (overloaded for blind switching).
virtual void update(double)
Update the module with respect to the time.
void selectCCDAtIndex(QString indexString)
indexString must be an integer, in the range of -1:ccds.count()
void updateLists()
Update the ocular, telescope and sensor lists after the removal of a member.
Wrapper around an argumentless QObject slot or a bool Q_PROPERTY with WRITE method, allowing the slot to be called/property to be toggled using this action object.
A screen widget similar to InfoPanel.
void selectLensAtIndex(QString indexString)
indexString must be an integer, in the range -1:lense.count<()
void selectOcularAtIndex(QString indexString)
indexString must be an integer, in the range of -1:oculars.count()
virtual void deinit()
Called before the module will be delete, and before the openGL context is suppressed.
StelModuleActionName
Define the possible action for which an order is defined.
virtual void init()
Initialize itself.
Main class of the Oculars plug-in.
QSharedPointer< StelTexture > StelTextureSP
Use shared pointer to simplify memory managment.
virtual void handleMouseClicks(class QMouseEvent *event)
Handle mouse clicks.
This is the common base class for all the main components of stellarium.
Contains information about a Stellarium plugin.