Stellarium
0.17.0
|
Data Structures | |
class | CCD |
class | OcularDialog |
class | OcularsGuiPanel |
A screen widget similar to InfoPanel. More... | |
class | PropertyBasedTableModel |
This class provides a table model for just about any QObject. More... | |
class | Lens |
class | Ocular |
class | Telescope |
class | Oculars |
Main class of the Oculars plug-in. More... | |
This plugin serves several purposes:
None of these activities can take the place of hands-on experience, but they are a good way to supplement your visual astronomy interests.
class CCD |
Public Member Functions | |
Q_INVOKABLE | CCD (const QObject &other) |
void | writeToSettings (QSettings *settings, const int index) |
QString | name () const |
void | setName (QString name) |
int | getCCDID () |
int | resolutionX () const |
void | setResolutionX (int resolution) |
int | resolutionY () const |
void | setResolutionY (int resolution) |
double | chipWidth () const |
void | setChipWidth (double width) |
double | chipHeight () const |
void | setChipHeight (double height) |
double | pixelWidth () const |
void | setPixelWidth (double width) |
double | pixelHeight () const |
void | setPixelHeight (double height) |
double | chipRotAngle () const |
void | setChipRotAngle (double angle) |
int | binningX () const |
void | setBinningX (int binning) |
int | binningY () const |
void | setBinningY (int binning) |
bool | hasOAG () const |
void | setHasOAG (bool oag) |
double | prismDistance () const |
void | setPrismDistance (double distance) |
double | prismHeight () const |
void | setPrismHeight (double height) |
double | prismWidth () const |
void | setPrismWidth (double width) |
double | prismPosAngle () const |
void | setPrismPosAngle (double angle) |
double | getActualFOVx (Telescope *telescope, Lens *lens) const |
The formula for this calculation comes from the Yerkes observatory. More... | |
double | getActualFOVy (Telescope *telescope, Lens *lens) const |
double | getInnerOAGRadius (Telescope *telescope, Lens *lens) const |
double | getOuterOAGRadius (Telescope *telescope, Lens *lens) const |
double | getOAGActualFOVx (Telescope *telescope, Lens *lens) const |
QMap< int, QString > | propertyMap () |
Static Public Member Functions | |
static CCD * | ccdFromSettings (QSettings *settings, int ccdIndex) |
static CCD * | ccdModel () |
Properties | |
QString | name |
int | resolutionX |
int | resolutionY |
double | chipWidth |
double | chipHeight |
double | pixelWidth |
double | pixelHeight |
double | chipRotAngle |
int | binningX |
int | binningY |
double | hasOAG |
double | prismHeight |
double | prismWidth |
double | prismDistance |
double | prismPosAngle |
class OcularDialog |
Public Slots | |
void | closeWindow () |
void | deleteSelectedCCD () |
void | deleteSelectedOcular () |
void | deleteSelectedTelescope () |
void | deleteSelectedLens () |
void | insertNewCCD () |
void | insertNewOcular () |
void | insertNewTelescope () |
void | insertNewLens () |
void | moveUpSelectedSensor () |
void | moveUpSelectedOcular () |
void | moveUpSelectedTelescope () |
void | moveUpSelectedLens () |
void | moveDownSelectedSensor () |
void | moveDownSelectedOcular () |
void | moveDownSelectedTelescope () |
void | moveDownSelectedLens () |
void | retranslate () |
Public Slots inherited from StelDialog | |
virtual void | retranslate ()=0 |
Retranslate the content of the dialog. More... | |
void | setVisible (bool) |
On the first call with "true" populates the window contents. | |
void | close () |
Closes the window (the window widget is not deleted, just not visible). | |
void | handleMovedTo (QPoint newPos) |
Adds dialog location to config.ini; should be connected in createDialogContent() | |
virtual void | handleDialogSizeChanged (QSizeF size) |
Stores dialog sizes into config.ini; should be connected from the proxy. More... | |
QString | getDialogName () |
Public Member Functions | |
OcularDialog (Oculars *plugin, QList< CCD * > *ccds, QList< Ocular * > *oculars, QList< Telescope * > *telescopes, QList< Lens * > *lenses) | |
Public Member Functions inherited from StelDialog | |
StelDialog (QString dialogName="Default", QObject *parent=Q_NULLPTR) | |
bool | visible () const |
Returns true if the dialog contents have been constructed and are currently shown. | |
Protected Member Functions | |
virtual void | createDialogContent () |
Initialize the dialog widgets and connect the signals/slots. | |
Protected Attributes | |
Ui_ocularDialogForm * | ui |
Protected Attributes inherited from StelDialog | |
QWidget * | dialog |
The main dialog. | |
class CustomProxy * | proxy |
QString | dialogName |
The name should be set in derived classes' constructors and can be used to store and retrieve the panel locations. | |
Additional Inherited Members | |
Signals inherited from StelDialog | |
void | visibleChanged (bool) |
Static Protected Member Functions inherited from StelDialog | |
static void | connectCheckBox (QAbstractButton *checkBox, const QString &actionName) |
Helper function to connect a checkbox to the StelAction with the specified name. | |
static void | connectCheckBox (QAbstractButton *checkBox, StelAction *action) |
Helper function to connect a checkbox to the given StelAction. | |
static void | connectIntProperty (QSpinBox *spinBox, const QString &propName) |
Helper function to connect a QSpinBox to an integer StelProperty. More... | |
static void | connectIntProperty (QComboBox *comboBox, const QString &propName) |
Helper function to connect a QComboBox to an integer StelProperty. More... | |
static void | connectIntProperty (QSlider *slider, const QString &propName, int minValue, int maxValue) |
Helper function to connect a QSlider to an double or float StelProperty. More... | |
static void | connectDoubleProperty (QDoubleSpinBox *spinBox, const QString &propName) |
Helper function to connect a QDoubleSpinBox to an double or float StelProperty. More... | |
static void | connectDoubleProperty (QSlider *slider, const QString &propName, double minValue, double maxValue) |
Helper function to connect a QSlider to an double or float StelProperty. More... | |
static void | connectBoolProperty (QAbstractButton *checkBox, const QString &propName) |
Helper function to connect a checkbox to a bool StelProperty. More... | |
Properties inherited from StelDialog | |
bool | visible |
class OcularsGuiPanel |
Contains controls and information.
Public Slots | |
void | showOcularGui () |
Show only the controls used with an ocular overlay. | |
void | showCcdGui () |
Show only the controls used with a CCD overlay. | |
void | foldGui () |
Hide the controls, leaving only the button bar. | |
Public Member Functions | |
OcularsGuiPanel (Oculars *ocularsPlugin, QGraphicsWidget *parent=Q_NULLPTR, Qt::WindowFlags wFlags=0) | |
class PropertyBasedTableModel |
It it nice, as a table model implementation per class is not required. It does this by using the Qt meta object system.
To use this class, your domain objects basically just need to use properties (for any properties you want to make available to the model), and have a Q_INVOKABLE copy constructor. Then, when you instantiate an instance, you must call the init methd. The init method takes the data to model, as well as an instance of your model class (to use as a model for creating new instances), and a map to know the ordering of the properties to their position (as you want them displayed).
Public Member Functions | |
PropertyBasedTableModel (QObject *parent=Q_NULLPTR) | |
void | init (QList< QObject * > *content, QObject *model, QMap< int, QString > mappings) |
Initializes this instance for use. More... | |
virtual QVariant | data (const QModelIndex &item, int role=Qt::DisplayRole) const |
virtual int | rowCount (const QModelIndex &parent=QModelIndex()) const |
virtual int | columnCount (const QModelIndex &parent=QModelIndex()) const |
virtual Qt::ItemFlags | flags (const QModelIndex &index) const |
virtual bool | insertRows (int position, int rows, const QModelIndex &index=QModelIndex()) |
virtual bool | setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) |
virtual bool | removeRows (int position, int rows, const QModelIndex &index=QModelIndex()) |
void | moveRowUp (int position) |
void | moveRowDown (int position) |
void PropertyBasedTableModel::init | ( | QList< QObject * > * | content, |
QObject * | model, | ||
QMap< int, QString > | mappings | ||
) |
If you do not call this method, and use this class, your app will crash.
content | the domain objects you want to model. They should all be the same type. This isnstance does not take ownership of content, or the elements in it. |
model | an instance of the same type as in content, this instance is used to create new instances of your domain objects by calling the model objects copy constructor. This instance takes ownership of model. |
mappings | mas an integer positional index to the property. |
class Lens |
Public Member Functions | |
Q_INVOKABLE | Lens (const QObject &other) |
void | writeToSettings (QSettings *settings, const int index) |
double | getMultipler () const |
void | setMultipler (double theValue) |
const QString | getName () const |
void | setName (const QString &theValue) |
QMap< int, QString > | propertyMap () |
Static Public Member Functions | |
static Lens * | lensFromSettings (QSettings *theSettings, int lensIndex) |
static Lens * | lensModel () |
Properties | |
QString | name |
double | multipler |
class Ocular |
Public Member Functions | |
Q_INVOKABLE | Ocular (const QObject &other) |
void | writeToSettings (QSettings *settings, const int index) |
bool | isBinoculars (void) const |
void | setBinoculars (const bool flag) |
bool | hasPermanentCrosshair (void) const |
void | setPermanentCrosshair (const bool flag) |
double | appearentFOV (void) const |
void | setAppearentFOV (const double fov) |
double | effectiveFocalLength (void) const |
void | setEffectiveFocalLength (const double fl) |
double | fieldStop (void) const |
void | setFieldStop (const double fs) |
QString | name (void) const |
void | setName (const QString aName) |
QString | reticlePath (void) const |
void | setReticlePath (const QString path) |
double | actualFOV (const Telescope *telescope, const Lens *lens) const |
double | magnification (const Telescope *telescope, const Lens *lens) const |
QMap< int, QString > | propertyMap (void) |
Static Public Member Functions | |
static Ocular * | ocularFromSettings (const QSettings *theSettings, const int ocularIndex) |
static Ocular * | ocularModel (void) |
Properties | |
bool | binoculars |
bool | permanentCrosshair |
double | appearentFOV |
double | effectiveFocalLength |
double | fieldStop |
QString | name |
QString | reticlePath |
class Telescope |
Public Member Functions | |
Q_INVOKABLE | Telescope (const QObject &other) |
void | writeToSettings (QSettings *settings, const int index) |
double | diameter () const |
void | setDiameter (double theValue) |
double | focalLength () const |
void | setFocalLength (double theValue) |
const QString | name () const |
void | setName (QString theValue) |
bool | isHFlipped () const |
void | setHFlipped (bool flipped) |
bool | isVFlipped () const |
void | setVFlipped (bool flipped) |
bool | isEquatorial () const |
void | setEquatorial (bool eq) |
QMap< int, QString > | propertyMap () |
Static Public Member Functions | |
static Telescope * | telescopeFromSettings (QSettings *theSettings, int telescopeIndex) |
static Telescope * | telescopeModel () |
Properties | |
QString | name |
double | diameter |
double | focalLength |
bool | hFlipped |
bool | vFlipped |
bool | equatorial |
class Oculars |
Public Slots | |
void | updateLists () |
Update the ocular, telescope and sensor lists after the removal of a member. More... | |
void | ccdRotationReset () |
void | decrementCCDIndex () |
void | decrementOcularIndex () |
void | decrementTelescopeIndex () |
void | decrementLensIndex () |
void | displayPopupMenu () |
void | enableOcular (bool b) |
This method is called with we detect that our hot key is pressed. More... | |
bool | getEnableOcular () const |
void | incrementCCDIndex () |
void | incrementOcularIndex () |
void | incrementTelescopeIndex () |
void | incrementLensIndex () |
void | disableLens () |
void | rotateCCD (int amount) |
amount must be a number. This adds to the current rotation. | |
double | getSelectedCCDRotationAngle (void) const |
get rotation angle from currently selected CCD | |
void | setSelectedCCDRotationAngle (double angle) |
set rotation angle for currently selected CCD | |
void | selectCCDAtIndex (int index) |
index in the range of -1:ccds.count(), else call is ignored | |
int | getSelectedCCDIndex () const |
void | selectOcularAtIndex (int index) |
index in the range of -1:oculars.count(), else call is ignored | |
int | getSelectedOcularIndex () const |
void | selectTelescopeAtIndex (int index) |
index in the range of -1:telescopes.count(), else call is ignored | |
int | getSelectedTelescopeIndex () const |
void | selectLensAtIndex (int index) |
index in the range -1:lenses.count(), else call is ignored | |
int | getSelectedLensIndex () const |
void | toggleCCD (bool show) |
Toggles the sensor frame overlay. | |
void | toggleCCD () |
Toggles the sensor frame overlay (overloaded for blind switching). | |
bool | getEnableCCD () const |
void | toggleCrosshairs (bool show=true) |
bool | getEnableCrosshairs () const |
void | toggleTelrad (bool show) |
Toggles the Telrad sight overlay. | |
bool | getEnableTelrad () const |
void | toggleTelrad () |
Toggles the Telrad sight overlay (overloaded for blind switching). | |
void | enableGuiPanel (bool enable=true) |
bool | getFlagGuiPanelEnabled (void) const |
void | setFlagDMSDegrees (const bool b) |
bool | getFlagDMSDegrees (void) const |
void | setFlagRequireSelection (const bool b) |
bool | getFlagRequireSelection (void) const |
void | setFlagLimitMagnitude (const bool b) |
bool | getFlagLimitMagnitude (void) const |
void | setFlagInitFovUsage (const bool b) |
bool | getFlagInitFovUsage (void) const |
void | setFlagInitDirectionUsage (const bool b) |
bool | getFlagInitDirectionUsage (void) const |
void | setFlagAutosetMountForCCD (const bool b) |
bool | getFlagAutosetMountForCCD (void) const |
void | setFlagUseSemiTransparency (const bool b) |
bool | getFlagUseSemiTransparency (void) const |
void | setFlagShowResolutionCriterions (const bool b) |
bool | getFlagShowResolutionCriterions (void) const |
void | setArrowButtonScale (const double val) |
double | getArrowButtonScale () const |
void | setFlagHideGridsLines (const bool b) |
bool | getFlagHideGridsLines (void) const |
void | setFlagScaleImageCircle (bool state) |
bool | getFlagScaleImageCircle (void) const |
Signals | |
void | enableOcularChanged (bool value) |
void | enableCrosshairsChanged (bool value) |
void | enableCCDChanged (bool value) |
void | enableTelradChanged (bool value) |
void | selectedCCDChanged (int value) |
void | selectedOcularChanged (int value) |
void | selectedTelescopeChanged (int value) |
void | selectedLensChanged (int value) |
void | selectedCCDRotationAngleChanged (double value) |
void | flagGuiPanelEnabledChanged (bool value) |
void | flagHideGridsLinesChanged (bool value) |
void | flagAutosetMountForCCDChanged (bool value) |
void | flagUseSemiTransparencyChanged (bool value) |
void | flagShowResolutionCriterionsChanged (bool value) |
void | arrowButtonScaleChanged (double value) |
void | flagInitDirectionUsageChanged (bool value) |
void | flagInitFOVUsageChanged (bool value) |
void | flagRequireSelectionChanged (bool value) |
void | flagLimitMagnitudeChanged (bool value) |
void | flagDMSDegreesChanged (bool value) |
void | flagScaleImageCircleChanged (bool value) |
Public Member Functions | |
virtual void | init () |
Initialize itself. More... | |
virtual void | deinit () |
Called before the module will be delete, and before the openGL context is suppressed. More... | |
virtual bool | configureGui (bool show=true) |
Detect or show the configuration GUI elements for the module. More... | |
virtual void | draw (StelCore *core) |
Execute all the drawing functions for this module. More... | |
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. More... | |
virtual void | handleKeys (class QKeyEvent *event) |
Returns the module-specific style sheet. More... | |
virtual void | handleMouseClicks (class QMouseEvent *event) |
Handle mouse clicks. More... | |
virtual void | update (double) |
Update the module with respect to the time. More... | |
QString | getDimensionsString (double fovX, double fovY) const |
QString | getFOVString (double fov) const |
Public Member Functions inherited from StelModule | |
virtual QString | getModuleVersion () const |
Get the version of the module, default is stellarium main version. | |
virtual QString | getAuthorName () const |
Get the name of the module author. | |
virtual QString | getAuthorEmail () const |
Get the email adress of the module author. | |
virtual void | handleMouseWheel (class QWheelEvent *) |
Handle mouse wheel. More... | |
virtual bool | handleMouseMoves (int x, int y, Qt::MouseButtons b) |
Handle mouse moves. More... | |
virtual bool | handlePinch (qreal scale, bool started) |
Handle pinch gesture events. More... | |
Static Public Member Functions | |
static QSettings * | appSettings () |
Properties | |
bool | enableOcular |
bool | enableCrosshairs |
bool | enableCCD |
bool | enableTelrad |
int | selectedCCDIndex |
index of the current CCD, in the range of -1:ccds.count(). -1 means no CCD is selected. | |
int | selectedOcularIndex |
index of the current ocular, in the range of -1:oculars.count(). -1 means no ocular is selected. | |
int | selectedTelescopeIndex |
index of the current telescope, in the range of -1:telescopes.count(). -1 means none is selected. | |
int | selectedLensIndex |
index of the current lens, in the range of -1:lense.count(). -1 means no lens is selected | |
double | selectedCCDRotationAngle |
allows rotating via property/remotecontrol API | |
bool | flagGuiPanelEnabled |
Display the GUI control panel. | |
bool | flagInitFOVUsage |
Flag used to track if we use default initial FOV (value at the startup of planetarium). | |
bool | flagInitDirectionUsage |
Flag used to track if we use default initial direction (value at the startup of planetarium). | |
bool | flagShowResolutionCriterions |
bool | flagRequireSelection |
Read from the ini file, whether an object is required to be selected to zoom in. | |
bool | flagLimitMagnitude |
Read from the ini file, whether a magnitude is required to be limited. | |
bool | flagHideGridsLines |
Switch off all grids and lines of GridMgr while in Ocular view. | |
bool | flagScaleImageCircle |
Read from the ini file, whether to scale the mask based aFOV. | |
bool | flagSemiTransparency |
Draw the area outside the ocular circle not black but let some stars through. | |
bool | flagDMSDegrees |
Use decimal degrees in CCD frame display. | |
bool | flagAutosetMountForCCD |
Flag used to track if we use automatic switch to type of mount for CCD frame. | |
double | arrowButtonScale |
allows scaling of the GUI "previous/next" Ocular/CCD/Telescope etc. buttons | |
Friends | |
class | OcularsGuiPanel |
Additional Inherited Members | |
Public Types inherited from StelModule | |
enum | StelModuleSelectAction { AddToSelection, ReplaceSelection, RemoveFromSelection } |
Enum used when selecting objects to define whether to add to, replace, or remove from the existing selection list. More... | |
enum | StelModuleActionName { ActionDraw, ActionUpdate, ActionHandleMouseClicks, ActionHandleMouseMoves, ActionHandleKeys } |
Define the possible action for which an order is defined. More... | |
Protected Member Functions inherited from StelModule | |
class StelAction * | addAction (const QString &id, const QString &groupId, const QString &text, QObject *target, const char *slot, const QString &shortcut="", const QString &altShortcut="") |
convenience methods to add an action (call to slot) to the StelActionMgr object. More... | |
class StelAction * | addAction (const QString &id, const QString &groupId, const QString &text, const char *slot, const QString &shortcut="", const QString &altShortcut="") |
convenience methods to add an action (call to own slot) to the StelActionMgr object. More... | |
|
virtual |
This is to be used with plugins to display a configuration dialog from the plugin list window.
show | if true, make the configuration GUI visible. If false, hide the config GUI if there is one. |
Reimplemented from StelModule.
|
virtual |
Deinitialize all openGL texture in this method.
Reimplemented from StelModule.
|
virtual |
core | the core to use for the drawing |
Reimplemented from StelModule.
|
slot |
It handles determining if we should do anything - based on a selected object.
|
virtual |
actionName | the name of the action for which we want the call order |
Reimplemented from StelModule.
|
virtual |
This method is needed because the MovementMgr classes handleKeys() method consumes the event. Because we want the ocular view to track, we must intercept & process ourselves. Only called while flagShowOculars or flagShowCCD == true.
Reimplemented from StelModule.
|
virtual |
Please note that most of the interactions will be done through the GUI module.
Reimplemented from StelModule.
|
virtual |
If the initialization takes significant time, the progress should be displayed on the loading bar.
Implements StelModule.
|
inlinevirtual |
deltaTime | the time increment in second since last call. |
Implements StelModule.
|
slot |
Necessary because of the way model/view management in the OcularDialog is implemented.