Open 3D Engine AzQtComponents API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AzQtComponents::VectorElement Class Reference

All flexible vector GUI's are constructed using a number vector elements. Each Vector element contains a label and a double spin box which show the label and the value respectively. More...

#include <VectorInput.h>

Inherits QWidget.

Public Types

enum class  Coordinate { X , Y , Z , W }
 

Public Slots

void onValueChanged (double newValue)
 

Signals

void valueChanged (double)
 
void editingFinished ()
 

Public Member Functions

 VectorElement (QWidget *parent=nullptr)
 
void SetLabel (const char *label)
 
void setLabel (const QString &label)
 
const QString & label () const
 
QLabel * GetLabel () const
 
QLabel * getLabelWidget () const
 
void SetValue (double newValue)
 
void setValue (double newValue)
 
double GetValue () const
 
double getValue () const
 
void setCoordinate (Coordinate coord)
 
AzQtComponents::DoubleSpinBoxGetSpinBox () const
 
AzQtComponents::DoubleSpinBoxgetSpinBox () const
 
bool WasValueEditedByUser () const
 
bool wasValueEditedByUser () const
 
QSize sizeHint () const override
 

Protected Member Functions

void resizeLabel ()
 
void onSpinBoxEditingFinished ()
 

Static Protected Member Functions

static void layout (QWidget *element, QAbstractSpinBox *spinBox, QLabel *label, bool ui20)
 
static QRect editFieldRect (const QProxyStyle *style, const QStyleOptionComplex *option, const QWidget *widget, const SpinBox::Config &config)
 
static bool polish (QProxyStyle *style, QWidget *widget, const SpinBox::Config &config)
 
static bool unpolish (QProxyStyle *style, QWidget *widget, const SpinBox::Config &config)
 
static void initStaticVars (int labelSize)
 

Friends

class Style
 

Detailed Description

All flexible vector GUI's are constructed using a number vector elements. Each Vector element contains a label and a double spin box which show the label and the value respectively.

Member Function Documentation

◆ SetLabel()

void AzQtComponents::VectorElement::SetLabel ( const char *  label)

Sets the label for this vector element

Parameters
labelThe new label

◆ SetValue()

void AzQtComponents::VectorElement::SetValue ( double  newValue)
inline

Sets the value for the spinbox in this vector element

Parameters
newValueThe new value

The documentation for this class was generated from the following file: