Open 3D Engine AzQtComponents API Reference
24.09
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
|
#include <SpinBox.h>
Inherits QDoubleSpinBox.
Public Types | |
enum | Option { SHOW_ONE_DECIMAL_PLACE_ALWAYS } |
Display options for the DoubleSpinBox class. More... | |
Signals | |
void | valueChangeBegan () |
Triggered when the value begins changing, for example when the control starts being dragged. | |
void | valueChangeEnded () |
Triggered when the value stops changing, for example when the control is released. | |
void | globalUndoTriggered () |
Triggered when the global undo key sequence is pressed by the user while this control is focused. | |
void | globalRedoTriggered () |
Triggered when the global redo key sequence is pressed by the user while this control is focused. | |
void | cutTriggered () |
Triggered when the Cut key sequence is pressed by the user while this control is focused. | |
void | copyTriggered () |
Triggered when the Copy key sequence is pressed by the user while this control is focused. | |
void | pasteTriggered () |
Triggered when the Paste key sequence is pressed by the user while this control is focused. | |
void | deleteTriggered () |
Triggered when the Delete key sequence is pressed by the user while this control is focused. | |
void | contextMenuAboutToShow (QMenu *menu, QAction *undoAction, QAction *redoAction) |
Public Member Functions | |
DoubleSpinBox (QWidget *parent=nullptr) | |
void | setValue (double value) |
QSize | minimumSizeHint () const override |
Returns the recommended minimum size for this control. | |
QString | textFromValue (double value) const override |
Formats the value into a string according to the display options. | |
bool | isUndoAvailable () const |
Returns whether an undo value is available. | |
bool | isRedoAvailable () const |
Returns whether a redo value is available. | |
Options | options () const |
Returns this control's display options. | |
void | setOptions (Options options) |
Sets this control's display options. | |
int | displayDecimals () const |
Returns the setting for the number of decimals to display. | |
void | SetDisplayDecimals (int displayDecimals) |
Sets the setting for the number of decimals to display. | |
void | setDisplayDecimals (int displayDecimals) |
Sets the setting for the number of decimals to display. | |
bool | isEditing () const |
Returns whether this SpinBox is currently being edited. | |
void | setInitialValueWasSetting (bool b) |
Sets whether the initial value was initialized. False prompts reinitialization. | |
Protected Attributes | |
internal::SpinBoxLineEdit * | m_lineEdit = nullptr |
double | m_lastValue = 0.0 |
QString | m_lastSuffix |
QSize | m_lastMinimumSize |
int | m_displayDecimals |
Properties | |
bool | undoAvailable |
Whether an undo value is available. | |
bool | redoAvailable |
Whether a redo value is available. | |
Options | options |
Display options for the control. | |
int | displayDecimals |
The maximum number of decimal digits to display when the value is truncated for display. | |
Friends | |
class | SpinBoxWatcher |
Control for decimal number selection. Supports value editing via direct input, dragging, mouse scroll-wheel and UI arrows.
Display options for the DoubleSpinBox class.
Enumerator | |
---|---|
SHOW_ONE_DECIMAL_PLACE_ALWAYS | Show zeros even for values with no decimal part. |
|
signal |
Triggered before the context menu is shown. Connect to this signal in the main UI thread, with a direct connection. Do not use Qt::QueuedConnection or Qt::BlockingQueuedConnection as the parameters will only be valid for a short time
void AzQtComponents::DoubleSpinBox::setValue | ( | double | value | ) |
Sets the value of the SpinBox, with undo/redo support. Note that this is an override to a non-virtual function, so an explicit pointer to the DoubleSpinBox class must be used in place of QSpinBox for this to work properly.