Stellarium 0.11.4 | |||
Home · All Namespaces · All Classes · Functions · Coding Style · Scripting · Plugins · File Structure |
A spin box for displaying/entering angular values. More...
#include <AngleSpinBox.hpp>
Public Types | |
enum | DisplayFormat { DMSLetters, DMSSymbols, HMSLetters, HMSSymbols, DecimalDeg } |
Used to decide how to display the angle. More... | |
enum | PrefixType { Normal, NormalPlus, Longitude, Latitude, Unknown } |
Determines how positive and negative values are indicated. More... | |
Public Slots | |
virtual void | clear () |
Set the value to default 0 angle. | |
void | setRadians (double radians) |
Set the value of the spin box in radians. | |
void | setDegrees (double degrees) |
Set the value of the spin box in decimal degrees. | |
Signals | |
void | valueChanged () |
Emitted when the value changes. | |
Public Member Functions | |
AngleSpinBox (QWidget *parent=0, DisplayFormat format=DMSSymbols, PrefixType prefix=Normal) | |
virtual void | stepBy (int steps) |
virtual QValidator::State | validate (QString &input, int &pos) const |
double | valueRadians () |
Get the angle held in the AngleSpinBox. | |
double | valueDegrees () |
Get the angle held in the AngleSpinBox. | |
void | setDecimals (int places) |
Set the number of decimal places to express float values to (e.g. | |
int | decimals () |
Get the number of decimal places to express float values to (e.g. | |
void | setDisplayFormat (DisplayFormat format) |
Set the display format. | |
DisplayFormat | displayFormat () |
Get the current display format. | |
void | setPrefixType (PrefixType prefix) |
Set the prefix type. | |
PrefixType | prefixType () |
Get the current display format. | |
Protected Member Functions | |
virtual StepEnabled | stepEnabled () const |
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.
Used to decide how to display the angle.
Determines how positive and negative values are indicated.
virtual void AngleSpinBox::clear | ( | ) | [virtual, slot] |
Set the value to default 0 angle.
int AngleSpinBox::decimals | ( | ) | [inline] |
Get the number of decimal places to express float values to (e.g.
seconds in DMSLetters format).
DisplayFormat AngleSpinBox::displayFormat | ( | ) | [inline] |
Get the current display format.
PrefixType AngleSpinBox::prefixType | ( | ) | [inline] |
Get the current display format.
void AngleSpinBox::setDecimals | ( | int | places | ) | [inline] |
Set the number of decimal places to express float values to (e.g.
seconds in DMSLetters format).
places | the number of decimal places to use. |
void AngleSpinBox::setDegrees | ( | double | degrees | ) | [slot] |
Set the value of the spin box in decimal degrees.
degrees | the value to set, in decimal degrees. |
void AngleSpinBox::setDisplayFormat | ( | DisplayFormat | format | ) | [inline] |
Set the display format.
format | the new format to use. |
void AngleSpinBox::setPrefixType | ( | PrefixType | prefix | ) | [inline] |
Set the prefix type.
prefix | the new prefix type to use. |
void AngleSpinBox::setRadians | ( | double | radians | ) | [slot] |
Set the value of the spin box in radians.
radians | the value to set, in radians. |
void AngleSpinBox::valueChanged | ( | ) | [signal] |
Emitted when the value changes.
double AngleSpinBox::valueDegrees | ( | ) |
Get the angle held in the AngleSpinBox.
double AngleSpinBox::valueRadians | ( | ) |
Get the angle held in the AngleSpinBox.