3ds Max C++ API Reference
QmaxLightingSpinBox Class Reference

A special QmaxDoubleSpinBox that displays its value using the current lighting units. More...

#include <QmaxSpinBox.h>

+ Inheritance diagram for QmaxLightingSpinBox:

Public Types

enum  QuantityType { Luminance , Illuminance }
 
using UnitSystem = ILightingUnits::LightingSystems
 

Public Member Functions

 QmaxLightingSpinBox (QWidget *parent=nullptr)
 
QuantityType quantityType () const
 
void setQuantityType (const QuantityType val)
 
UnitSystem internalUnitSystem () const
 
void setInternalUnitSystem (const UnitSystem val)
 
double valueFromText (const QString &text) const override
 
QString textFromValue (double val) const override
 
void fixup (QString &str) const override
 
- Public Member Functions inherited from QmaxDoubleSpinBox
 QmaxDoubleSpinBox (QWidget *parent=nullptr)
 
virtual ~QmaxDoubleSpinBox ()
 
double resetValue () const
 The reset value of this component. More...
 
bool hasAnimationKeyBrackets () const
 Determines if the animation key brackets around the component should be shown. More...
 
bool isIndeterminate () const
 Determines if the control should be shown in an indeterministic state. More...
 
bool isInteractive () const
 Determines whether this component is in interactive mode. More...
 
int visibleDigits () const
 The number of digits (before the period and the decimals) used for the calculation of the minimum width of the component. More...
 
void setDecimals (int decimals)
 Sets the number of decimals used. More...
 
QValidator::State validate (QString &input, int &pos) const override
 
void stepBy (int steps) override
 
QSize sizeHint () const override
 
QSize minimumSizeHint () const override
 

Properties

QuantityType quantityType
 
UnitSystem internalUnitSystem
 
- Properties inherited from QmaxDoubleSpinBox
double resetValue
 The reset value of this Component. More...
 
bool animationKeyBrackets
 Show the animation key brackets around the component. More...
 
bool indeterminate
 Draws '—' instead of the value to show the indeterministic state. More...
 
bool interactive
 Determines whether this component is in interactive mode. More...
 
int visibleDigits
 The number of digits used for the calculation of the minimum width of the component - values from -127 to +127 are valid, the default value is 6. More...
 

Additional Inherited Members

- Public Slots inherited from QmaxDoubleSpinBox
void setResetValue (double resetValue)
 Changes the reset value of this component. More...
 
void setAnimationKeyBrackets (bool animationKeyBrackets=true)
 Sets whether the animation key brackets around the component should be shown. More...
 
void setIndeterminate (bool indeterminate)
 Sets whether the control should be shown in an indeterministic state. More...
 
void setVisibleDigits (int visibleDigits)
 Sets the visibleDigits property. More...
 
void reset ()
 Resets this component's value to its resetValue. More...
 
- Signals inherited from QmaxDoubleSpinBox
void interactiveChanged (bool interactive, bool userCancelled=false)
 Gets emitted as soon the component's interactive mode changes. More...
 
void contextMenuCustomization (QMenu &contextMenu)
 Gets emitted when the context menu is shown. More...
 
void visibleDigitsChanged (int visibleDigits)
 Gets emitted when the visibleDigits have been changed. More...
 
- Protected Member Functions inherited from QmaxDoubleSpinBox
void mousePressEvent (QMouseEvent *event) override
 
void mouseMoveEvent (QMouseEvent *event) override
 
void mouseReleaseEvent (QMouseEvent *event) override
 
void timerEvent (QTimerEvent *event) override
 
void paintEvent (QPaintEvent *event) override
 
void contextMenuEvent (QContextMenuEvent *event) override
 
void keyPressEvent (QKeyEvent *event) override
 
void setInteractive (bool interactive, bool userCanceled=false)
 
QString textFromValue (double val) const override
 
double valueFromText (const QString &text) const override
 
 QmaxDoubleSpinBox (QmaxSpinBoxPrivate< double, QmaxDoubleSpinBox > *d, QWidget *parent=nullptr)
 
QmaxSpinBoxPrivate< double, QmaxDoubleSpinBox > * d_func ()
 
const QmaxSpinBoxPrivate< double, QmaxDoubleSpinBox > * d_func () const
 
- Protected Attributes inherited from QmaxDoubleSpinBox
QmaxSpinBoxPrivate< double, QmaxDoubleSpinBox > * d_ptr
 

Detailed Description

A special QmaxDoubleSpinBox that displays its value using the current lighting units.

It will follow the settings in the Lighting Units section of the Units Setup dialog of 3ds Max and should be used in every place a user is supposed to work with a value that represents some lighting unit.

See also
QmaxDoubleSpinBox, QmaxWorldSpinBox

Member Typedef Documentation

◆ UnitSystem

Member Enumeration Documentation

◆ QuantityType

Enumerator
Luminance 
Illuminance 
338  {
339  Luminance,
341  };
@ Luminance
Definition: QmaxSpinBox.h:339
@ Illuminance
Definition: QmaxSpinBox.h:340

Constructor & Destructor Documentation

◆ QmaxLightingSpinBox()

QmaxLightingSpinBox ( QWidget *  parent = nullptr)
explicit

Member Function Documentation

◆ quantityType()

QuantityType quantityType ( ) const

◆ setQuantityType()

void setQuantityType ( const QuantityType  val)

◆ internalUnitSystem()

UnitSystem internalUnitSystem ( ) const

◆ setInternalUnitSystem()

void setInternalUnitSystem ( const UnitSystem  val)

◆ valueFromText()

double valueFromText ( const QString &  text) const
override

◆ textFromValue()

QString textFromValue ( double  val) const
override

◆ fixup()

void fixup ( QString &  str) const
override

Property Documentation

◆ quantityType

QuantityType quantityType
readwrite

◆ internalUnitSystem

UnitSystem internalUnitSystem
readwrite