![]() |
Home · All Namespaces · All Classes · Functions · Coding Style · Plugins · File Structure |
#include <AngleSpinBox.hpp>
Public Types | |
enum | DisplayFormat { DMSLetters, DMSSymbols, HMSLetters, HMSSymbols, DecimalDeg } |
enum | PrefixType { Normal, NormalPlus, Longitude, Latitude, Unknown } |
Public Slots | |
virtual void | clear () |
void | setRadians (double radians) |
void | setDegrees (double degrees) |
Signals | |
void | valueChanged () |
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 () |
double | valueDegrees () |
void | setDecimals (int places) |
int | decimals () |
void | setDisplayFormat (DisplayFormat format) |
DisplayFormat | displayFormat () |
void | setPrefixType (PrefixType prefix) |
PrefixType | prefixType () |
Protected Member Functions | |
virtual StepEnabled | stepEnabled () const |
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.
double AngleSpinBox::valueRadians | ( | ) |
double AngleSpinBox::valueDegrees | ( | ) |
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. |
int AngleSpinBox::decimals | ( | ) | [inline] |
Get the number of decimal places to express float values to (e.g.
seconds in DMSLetters format).
void AngleSpinBox::setDisplayFormat | ( | DisplayFormat | format | ) | [inline] |
Set the display format.
format | the new format to use. |
DisplayFormat AngleSpinBox::displayFormat | ( | ) | [inline] |
Get the current display format.
void AngleSpinBox::setPrefixType | ( | PrefixType | prefix | ) | [inline] |
Set the prefix type.
prefix | the new prefix type to use. |
PrefixType AngleSpinBox::prefixType | ( | ) | [inline] |
Get the current display format.
virtual void AngleSpinBox::clear | ( | ) | [virtual, slot] |
Set the value to default 0 angle.
void AngleSpinBox::setRadians | ( | double | radians | ) | [slot] |
Set the value of the spin box in radians.
radians | the value to set, in radians. |
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::valueChanged | ( | ) | [signal] |
Emitted when the value changes.