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 2
85 static QSettings* appSettings();
90 virtual void deinit();
91 virtual bool configureGui(
bool show=
true);
93 virtual double getCallOrder(StelModuleActionName actionName)
const;
100 virtual void handleKeys(
class QKeyEvent* event);
101 virtual void handleMouseClicks(
class QMouseEvent* event);
102 virtual void update(
double) {;}
103 double ccdRotationAngle()
const;
105 QString getDimensionsString(
double fovX,
double fovY)
const;
106 QString getFOVString(
double fov)
const;
113 void ccdRotationReset();
114 void decrementCCDIndex();
115 void decrementOcularIndex();
116 void decrementTelescopeIndex();
117 void decrementLensIndex();
118 void displayPopupMenu();
122 void incrementCCDIndex();
123 void incrementOcularIndex();
124 void incrementTelescopeIndex();
125 void incrementLensIndex();
136 void toggleCrosshairs(
bool show =
true);
141 void enableGuiPanel(
bool enable =
true);
143 void setFlagDecimalDegrees(
const bool b);
144 bool getFlagDecimalDegrees(
void)
const;
146 void setFlagLimitMagnitude(
const bool b);
147 bool getFlagLimitMagnitude(
void)
const;
149 void setFlagInitFovUsage(
const bool b);
150 bool getFlagInitFovUsage(
void)
const;
152 void setFlagUseFlipForCCD(
const bool b);
153 bool getFlagUseFlipForCCD(
void)
const;
155 void setFlagUseSemiTransparency(
const bool b);
156 bool getFlagUseSemiTransparency(
void)
const;
159 void selectedCCDChanged();
160 void selectedOcularChanged();
161 void selectedTelescopeChanged();
162 void selectedLensChanged();
166 void instrumentChanged();
167 void determineMaxEyepieceAngle();
168 void setRequireSelection(
bool state);
169 void setScaleImageCircle(
bool state);
170 void setScreenFOVForCCD();
171 void retranslateGui();
172 void setStelStyle(
const QString& style);
173 void updateOcularReticle(
void);
177 void initializeActivationActions();
180 bool isBinocularDefined();
183 void paintCCDBounds();
185 void paintCrosshairs();
187 void paintOcularMask(
const StelCore * core);
193 void paintText(
const StelCore * core);
204 void validateAndLoadIniFile();
209 void zoom(
bool zoomedIn);
214 void hideUsageMessageIfDisplayed();
217 QMenu* addLensSubmenu(QMenu* parent);
220 QMenu* addTelescopeSubmenu(QMenu* parent);
223 Lens* selectedLens();
227 QList<Ocular *> oculars;
228 QList<Telescope *> telescopes;
231 int selectedCCDIndex;
232 int selectedOcularIndex;
233 int selectedTelescopeIndex;
234 int selectedLensIndex;
238 bool flagShowOculars;
239 bool flagShowCrosshairs;
241 int usageMessageLabelID;
243 bool flagAzimuthalGrid;
244 bool flagGalacticGrid;
245 bool flagEquatorGrid;
246 bool flagEquatorJ2000Grid;
247 bool flagEquatorLine;
248 bool flagEclipticLine;
249 bool flagEclipticJ2000Grid;
250 bool flagMeridianLine;
251 bool flagLongitudeLine;
252 bool flagHorizonLine;
253 bool flagGalacticEquatorLine;
260 bool flagLimitPlanets;
261 float magLimitPlanets;
265 double maxEyepieceAngle;
266 bool requireSelection;
267 bool flagLimitMagnitude;
268 bool useMaxEyepieceAngle;
269 bool guiPanelEnabled;
271 bool flagDecimalDegrees;
272 bool flagSemiTransporency;
274 QSignalMapper * ccdRotationSignalMapper;
275 QSignalMapper * ccdsSignalMapper;
276 QSignalMapper * ocularsSignalMapper;
277 QSignalMapper * telescopesSignalMapper;
278 QSignalMapper * lenseSignalMapper;
282 QPixmap * pxmapOnIcon;
283 QPixmap * pxmapOffIcon;
303 QByteArray normalStyleSheet;
304 QByteArray nightStyleSheet;
310 bool flagInitFOVUsage;
311 bool flagUseFlipForCCD;
312 double reticleRotation;
318 #include "StelPluginInterface.hpp"
324 Q_PLUGIN_METADATA(IID StelPluginInterface_iid)
void rotateCCD(QString amount)
amount must be a number.
virtual const StelStyle getModuleStyleSheet(const StelStyle &style)
Returns the module-specific style sheet.
void selectTelescopeAtIndex(QString indexString)
indexString must be an integer, in the range of -1:telescopes.count()
void toggleTelrad()
Toggles the Telrad sight overlay (overloaded for blind switching).
virtual void handleKeys(class QKeyEvent *event)
This method is needed because the MovementMgr classes handleKeys() method consumes the event...
void enableOcular(bool b)
This method is called with we detect that our hot key is pressed.
void toggleCCD()
Toggles the sensor frame overlay (overloaded for blind switching).
virtual StelPluginInfo getPluginInfo() const =0
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.
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 class StelModule * getStelModule() const =0
Main class of the Oculars plug-in.
QSharedPointer< StelTexture > StelTextureSP