|
cut 3.4.1-rc1
|
Spin box widget for editing angular values in various units. More...
#include <CutWidgets.h>
Public Types | |
| enum class | Units { SEXAGESIMAL , RADIANS , HMS , DMS } |
| Angular unit formats. More... | |
Public Slots | |
| void | setUnit (Units unit) |
| Set the display unit format. | |
| void | setUnits (Units unit) |
| Set the display unit format. | |
| void | setPrecision (int newValue) |
| Set the precision for subsecond display. | |
| void | setRadians (double newValue) |
| Set the angle value in radians. | |
| void | setUnitsInt (int unit) |
| Convenience method to set Units using its integer representation. | |
| void | setMinimum (double newValue) |
| Set the minimum allowable value. | |
| void | setMaximum (double newValue) |
| Set the maximum allowable value. | |
Signals | |
| void | unitChanged (Units newUnit) |
| Emitted when the display unit changes. | |
| void | validationStateChanged (QValidator::State state) |
| Emitted when the input validation state changes. | |
| void | radiansChanged (double radians) |
| Emitted when the radian value changes. | |
| void | precisionChanged (int precision) |
| Emitted when the precision changes. | |
| void | minimumChanged (double minimum) |
| Emitted when the minimum value changes. | |
| void | maximumChanged (double maximum) |
| Emitted when the maximum value changes. | |
Public Member Functions | |
| QeAngleLineEdit (QWidget *parent=nullptr) | |
| Construct a QeAngleLineEdit widget. | |
| Units | getUnit () const |
| Get the current unit format. | |
| Units | getUnits () const |
| Get the current unit format. | |
| int | getPrecision () |
| Get the precision (number of decimals) for subsecond display. | |
| double | getRadians () |
| Get the current angle value in radians. | |
| double | getMinimum () |
| Get the minimum allowable value. | |
| double | getMaximum () |
| Get the maximum allowable value. | |
Protected Member Functions | |
| QString | textFromValue (double value) const override |
| Convert an internal radian value to display text. | |
| double | valueFromText (const QString &text) const override |
| Parse display text back to an internal radian value. | |
| QValidator::State | validate (QString &input, int &pos) const override |
| Validate user input. | |
| void | handleState (QValidator::State state) |
| Handle a change in validation state. | |
Properties | |
| Units | unit |
| Enum value to determine which units should be used to represent displayed value. | |
| double | radians |
| Value to represent in radians. | |
| int | precision |
| Precision used in the subsecond section of the label. | |
| double | minimum |
| Bottom range value that can be set. | |
| double | maximum |
| Top range value that can be set. | |
Spin box widget for editing angular values in various units.
Extends QDoubleSpinBox to support multiple angular unit formats: radians, sexagesimal (degrees), HMS (hours/minutes/seconds), and DMS (degrees/minutes/seconds). The internal value is always stored in radians.
|
strong |
|
explicit |
Construct a QeAngleLineEdit widget.
| parent | Parent widget. |
| double QeAngleLineEdit::getMaximum | ( | ) |
Get the maximum allowable value.
| double QeAngleLineEdit::getMinimum | ( | ) |
Get the minimum allowable value.
| int QeAngleLineEdit::getPrecision | ( | ) |
Get the precision (number of decimals) for subsecond display.
| double QeAngleLineEdit::getRadians | ( | ) |
Get the current angle value in radians.
| Units QeAngleLineEdit::getUnit | ( | ) | const |
Get the current unit format.
| Units QeAngleLineEdit::getUnits | ( | ) | const |
Get the current unit format.
|
protected |
Handle a change in validation state.
| state | The new validator state. |
|
signal |
Emitted when the maximum value changes.
| maximum | The new maximum value. |
|
signal |
Emitted when the minimum value changes.
| minimum | The new minimum value. |
|
signal |
Emitted when the precision changes.
| precision | The new precision value. |
|
signal |
Emitted when the radian value changes.
| radians | The new value in radians. |
|
slot |
Set the maximum allowable value.
| newValue | The new maximum value. |
|
slot |
Set the minimum allowable value.
| newValue | The new minimum value. |
|
slot |
Set the precision for subsecond display.
| newValue | Number of decimal places. |
|
slot |
Set the angle value in radians.
| newValue | The new value in radians. |
|
slot |
Set the display unit format.
| unit | The new Units enum value. |
|
slot |
Set the display unit format.
| unit | The new Units enum value. |
|
slot |
|
overrideprotected |
Convert an internal radian value to display text.
| value | The value in radians. |
|
signal |
Emitted when the display unit changes.
| newUnit | The new Units value. |
|
overrideprotected |
Validate user input.
| input | The input string to validate. |
| pos | Reference to the cursor position. |
|
signal |
Emitted when the input validation state changes.
| state | The new validator state. |
|
overrideprotected |
Parse display text back to an internal radian value.
| text | The formatted text string. |
|
readwrite |
Top range value that can be set.
|
readwrite |
Bottom range value that can be set.
|
readwrite |
Precision used in the subsecond section of the label.
By default, millisecond precision is used.
|
readwrite |
Value to represent in radians.
|
readwrite |
Enum value to determine which units should be used to represent displayed value.