20 #ifndef _ANGLESPINBOX_HPP_
21 #define _ANGLESPINBOX_HPP_
23 #include <QAbstractSpinBox>
63 virtual void stepBy(
int steps);
64 virtual QValidator::State validate(QString& input,
int& pos)
const;
114 virtual StepEnabled stepEnabled()
const;
118 void updateValue(
void);
128 double stringToDouble(QString input, QValidator::State* state,
PrefixType prefix=Unknown)
const;
131 enum AngleSpinboxSection
141 AngleSpinboxSection getCurrentSection()
const;
146 void formatText(
void);
148 static const QString positivePrefix(
PrefixType prefix);
149 static const QString negativePrefix(
PrefixType prefix);
158 #endif // _ANGLESPINBOX_HPP_
void valueChanged()
Emitted when the value changes.
Hours, minutes and seconds, e.g. 12h 4m 6s.
negative values have '-' prefix
void setDisplayFormat(DisplayFormat format)
Set the display format.
double valueRadians()
Get the angle held in the AngleSpinBox.
DisplayFormat
Used to decide how to display the angle.
Hours, minutes and seconds, e.g. 12h 4' 6s".
double valueDegrees()
Get the angle held in the AngleSpinBox.
positive values have 'E' prefix, negative values have 'W' prefix.
virtual void clear()
Set the value to default 0 angle.
Degrees, minutes and seconds, e.g. 180d 4m 8s, with negative values, [-360..360d].
Degrees, minutes and seconds, e.g. 180° 4' 8", [0..360°].
void setRadians(double radians)
Set the value of the spin box in radians.
Degrees, minutes and seconds, e.g. 180° 4' 8", with negative values, [-360..360°].
A spin box for displaying/entering angular values.
void setDegrees(double degrees)
Set the value of the spin box in decimal degrees.
void setDecimals(int places)
Set the number of decimal places to express float values to (e.g.
positive values have '+' prefix, negative values have '-' prefix.
Degrees, minutes and seconds, e.g. 180d 4m 8s, [0..360d].
positive values have 'N' prefix, negative values have 'S' prefix.
PrefixType prefixType()
Get the current display format.
void setPrefixType(PrefixType prefix)
Set the prefix type.
DisplayFormat displayFormat()
Get the current display format.
Decimal degrees, e.g. 180.06888.
int decimals()
Get the number of decimal places to express float values to (e.g.
PrefixType
Determines how positive and negative values are indicated.