Stellarium
0.22.2
|
#include <AngleSpinBox.hpp>
Public Types | |
enum | DisplayFormat { DMSLetters, DMSSymbols, DMSLettersUnsigned, DMSSymbolsUnsigned, HMSLetters, HMSSymbols, DecimalDeg } |
enum | PrefixType { Normal, NormalPlus, Longitude, Latitude, Unknown } |
Public Slots | |
virtual void | clear () Q_DECL_OVERRIDE |
Set the value to default 0 angle. | |
void | setRadians (double radians) |
Set the value of the spin box in radians. More... | |
void | setDegrees (double degrees) |
Set the value of the spin box in decimal degrees. More... | |
Signals | |
void | valueChanged () |
Emitted when the value changes. | |
void | valueChangedDeg (double) |
void | valueChangedRad (double) |
Public Member Functions | |
AngleSpinBox (QWidget *parent=Q_NULLPTR, DisplayFormat format=DMSSymbols, PrefixType prefix=Normal) | |
virtual void | stepBy (int steps) Q_DECL_OVERRIDE |
virtual QValidator::State | validate (QString &input, int &pos) const Q_DECL_OVERRIDE |
double | valueRadians () const |
Get the angle held in the AngleSpinBox. More... | |
double | valueDegrees () const |
Get the angle held in the AngleSpinBox. More... | |
void | setDecimals (int places) |
Set the number of decimal places to express float values to (e.g. More... | |
int | decimals () const |
Get the number of decimal places to express float values to (e.g. More... | |
void | setDisplayFormat (DisplayFormat format) |
Set the display format. More... | |
DisplayFormat | displayFormat () const |
Get the current display format. More... | |
void | setPrefixType (PrefixType prefix) |
Set the prefix type. More... | |
PrefixType | prefixType () const |
Get the current display format. More... | |
void | setMinimum (const double min, const bool isDegrees=false) |
Set the minimum value. More... | |
double | getMinimum (const bool isDegrees) const |
Get the minimum value. More... | |
void | setMaximum (const double max, const bool isDegrees=false) |
Set the maximum value. More... | |
double | getMaximum (const bool isDegrees) const |
Get the maximum value. More... | |
Protected Member Functions | |
virtual StepEnabled | stepEnabled () const Q_DECL_OVERRIDE |
A spin box for displaying/entering angular values. This class can accept angles in various formats commonly used in astronomy including decimal degrees, DMS and HMS. You should set upper and lower limits (maximum, minimum) and decide whether the values wrap around or are blocked at the limits (wrapping).
Used to decide how to display the angle.
Determines how positive and negative values are indicated.
|
inline |
seconds in DMSLetters format).
|
inline |
|
inline |
isDegrees | true if the maximum value is required in degrees, else max is returned as radians. |
|
inline |
isDegrees | true if the minimum value is required in degrees, else min is returned as radians. |
|
inline |
|
inline |
seconds in DMSLetters format).
places | the number of decimal places to use. |
|
slot |
degrees | the value to set, in decimal degrees. |
|
inline |
format | the new format to use. |
|
inline |
max | the new maximum value |
isDegrees | true if the new maximum value is given in degrees, else max is understood as radians. |
|
inline |
min | the new minimum value |
isDegrees | true if the new minimum value is given in degrees, else min is understood as radians. |
|
inline |
prefix | the new prefix type to use. |
|
slot |
radians | the value to set, in radians. |
double AngleSpinBox::valueDegrees | ( | ) | const |
double AngleSpinBox::valueRadians | ( | ) | const |