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)
91 static QSettings* appSettings();
104 virtual void handleKeys(
class QKeyEvent* event);
107 double ccdRotationAngle()
const;
109 QString getDimensionsString(
double fovX,
double fovY)
const;
110 QString getFOVString(
double fov)
const;
117 void ccdRotationReset();
118 void decrementCCDIndex();
119 void decrementOcularIndex();
120 void decrementTelescopeIndex();
121 void decrementLensIndex();
122 void displayPopupMenu();
125 void enableOcular(
bool b);
126 bool getEnableOcular()
const {
return flagShowOculars; }
127 void incrementCCDIndex();
128 void incrementOcularIndex();
129 void incrementTelescopeIndex();
130 void incrementLensIndex();
141 bool getEnableCCD()
const {
return flagShowCCD; }
142 void toggleCrosshairs(
bool show =
true);
143 bool getEnableCrosshairs()
const {
return flagShowCrosshairs; }
146 bool getEnableTelrad()
const {
return flagShowTelrad; }
149 void enableGuiPanel(
bool enable =
true);
151 void setFlagDecimalDegrees(
const bool b);
152 bool getFlagDecimalDegrees(
void)
const;
154 void setFlagLimitMagnitude(
const bool b);
155 bool getFlagLimitMagnitude(
void)
const;
157 void setFlagInitFovUsage(
const bool b);
158 bool getFlagInitFovUsage(
void)
const;
160 void setFlagInitDirectionUsage(
const bool b);
161 bool getFlagInitDirectionUsage(
void)
const;
163 void setFlagAutosetMountForCCD(
const bool b);
164 bool getFlagAutosetMountForCCD(
void)
const;
166 void setFlagUseSemiTransparency(
const bool b);
167 bool getFlagUseSemiTransparency(
void)
const;
169 void setFlagHideGridsLines(
const bool b);
170 bool getFlagHideGridsLines(
void)
const;
173 void enableOcularChanged(
bool value);
174 void enableCrosshairsChanged(
bool value);
175 void enableCCDChanged(
bool value);
176 void enableTelradChanged(
bool value);
177 void selectedCCDChanged();
178 void selectedOcularChanged();
179 void selectedTelescopeChanged();
180 void selectedLensChanged();
184 void instrumentChanged();
185 void determineMaxEyepieceAngle();
186 void setRequireSelection(
bool state);
187 void setScaleImageCircle(
bool state);
188 void setScreenFOVForCCD();
189 void retranslateGui();
190 void updateOcularReticle(
void);
194 void initializeActivationActions();
197 bool isBinocularDefined();
200 void paintCCDBounds();
202 void paintCrosshairs();
204 void paintOcularMask(
const StelCore * core);
210 void paintText(
const StelCore * core);
221 void validateAndLoadIniFile();
226 void zoom(
bool zoomedIn);
231 void hideUsageMessageIfDisplayed();
234 QMenu* addLensSubmenu(QMenu* parent);
237 QMenu* addTelescopeSubmenu(QMenu* parent);
240 Lens* selectedLens();
244 QList<Ocular *> oculars;
245 QList<Telescope *> telescopes;
248 int selectedCCDIndex;
249 int selectedOcularIndex;
250 int selectedTelescopeIndex;
251 int selectedLensIndex;
255 bool flagShowOculars;
256 bool flagShowCrosshairs;
258 int usageMessageLabelID;
260 bool flagAzimuthalGrid;
261 bool flagGalacticGrid;
262 bool flagSupergalacticGrid;
263 bool flagEquatorJ2000Grid;
264 bool flagEquatorGrid;
265 bool flagEquatorJ2000Line;
266 bool flagEquatorLine;
267 bool flagEclipticJ2000Line;
268 bool flagEclipticLine;
269 bool flagEclipticJ2000Grid;
270 bool flagEclipticGrid;
271 bool flagMeridianLine;
272 bool flagLongitudeLine;
273 bool flagHorizonLine;
274 bool flagGalacticEquatorLine;
275 bool flagSupergalacticEquatorLine;
276 bool flagPrimeVerticalLine;
277 bool flagColureLines;
278 bool flagCircumpolarCircles;
279 bool flagPrecessionCircles;
281 bool flagCardinalPoints;
282 bool flagCelestialJ2000Poles;
283 bool flagCelestialPoles;
284 bool flagZenithNadirPoints;
285 bool flagEclipticJ2000Poles;
286 bool flagEclipticPoles;
287 bool flagGalacticPoles;
288 bool flagSupergalacticPoles;
289 bool flagEquinoxJ2000Points;
290 bool flagEquinoxPoints;
291 bool flagSolsticeJ2000Points;
292 bool flagSolsticePoints;
300 bool flagLimitPlanets;
301 float magLimitPlanets;
305 double maxEyepieceAngle;
306 bool requireSelection;
307 bool flagLimitMagnitude;
308 bool useMaxEyepieceAngle;
309 bool guiPanelEnabled;
311 bool flagDecimalDegrees;
312 bool flagSemiTransporency;
313 bool flagHideGridsLines;
317 QSignalMapper * ccdRotationSignalMapper;
318 QSignalMapper * ccdsSignalMapper;
319 QSignalMapper * ocularsSignalMapper;
320 QSignalMapper * telescopesSignalMapper;
321 QSignalMapper * lenseSignalMapper;
325 QPixmap * pxmapOnIcon;
326 QPixmap * pxmapOffIcon;
349 bool flagInitFOVUsage;
350 bool flagInitDirectionUsage;
351 bool flagAutosetMountForCCD;
352 bool equatorialMountEnabled;
353 double reticleRotation;
359 #include "StelPluginInterface.hpp" 365 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.