3ds Max C++ API Reference
|
#include <QmaxMultiSpinner.h>
Public Slots | |
void | setValue (const QVariant &value) |
Sets the value associated with this spinner control. | |
void | setResetValue (const QVariant &resetValue) |
Changes the reset value of this component. | |
void | setAnimationKeyBrackets (bool animationKeyBrackets=true) |
Sets whether the animation key brackets around the spinners should be shown. | |
void | reset () |
Resets this components value to its resetValue. | |
void | setVisibleDigits (int visibleDigits) |
Sets the visibleDigits property. | |
void | setStepType (QAbstractSpinBox::StepType stepType) |
Sets the step type of the spinners. | |
Signals | |
void | valueChanged (const QVariant &value) |
Emitted if the actual variant value has changed. | |
void | interactiveChanged (bool interactive, bool userCancelled=false) |
Emitted as soon as the components interactive mode changes. | |
void | visibleDigitsChanged (int visibleDigits) |
Gets emitted when the visibleDigits have been changed. | |
Public Member Functions | |
QmaxMultiSpinner (int numSpinners, int numCols, QWidget *parent=nullptr) | |
Constructs a multi-spinner control with a predefined number of spinners. | |
virtual | ~QmaxMultiSpinner () |
QVariant | value () const |
The 3ds Max type value wrapped in a variant associated with this spinner control. | |
QVariant | resetValue () const |
The reset value of this component. | |
bool | hasAnimationKeyBrackets () const |
Determines if the animation key brackets around the spinners should be shown. | |
bool | isInteractive () const |
Determines whether this component is in interactive mode. | |
double | singleStep () const |
Returns the step increment/decrement value of the spinners. | |
void | setSingleStep (double val) |
Sets the step increment/decrement value of the spinners. | |
double | minimum () const |
Returns the minimum value of the spinners. | |
void | setMinimum (double min) |
Sets the minimum value of the spinners. | |
double | maximum () const |
Returns the maximum value of the spinners. | |
void | setMaximum (double max) |
Sets the maximum value of the spinners. | |
QString | prefix () const |
Returns the prefix of the spinners. | |
void | setPrefix (const QString &prefix) |
Sets the prefix of the spinners. | |
QString | suffix () const |
Returns the suffix of the spinners. | |
void | setSuffix (const QString &suffix) |
Sets the suffix of the spinners. | |
int | decimals () const |
Returns the number of decimals of the spinners. | |
void | setDecimals (int decimals) |
Sets the step number of decimals of the spinners. | |
int | visibleDigits () const |
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. | |
int | numColumns () const |
Returns the number of layout columns in which the multiple spinners are arranged. | |
void | setNumColumns (int numCols) |
Sets the number of layout columns in which the multiple spinners should be arranged. | |
virtual QVector< double > | fromMaxTypeVariant (const QVariant &value) const =0 |
Creates a double array out of a variant with the subclass specific data structure. | |
virtual QVariant | toMaxTypeVariant (const QVector< double > &spinnerValues) const =0 |
Creates a variant with the subclass specific data structure out of the multiple spinners values. | |
QAbstractSpinBox::StepType | stepType () const |
Gets the step type of the spinners. | |
Properties | |
QVariant | value |
The 3ds Max type value wrapped in a variant associated with this spinner control. | |
QVariant | resetValue |
The reset value of this Component. | |
bool | animationKeyBrackets |
Indicates whether the animation key brackets are shown around the component. | |
double | minimum |
The minimum value of the spinners. | |
double | maximum |
The maximum value of the spinners. | |
double | singleStep |
The step increment/decrement value of the spinners. | |
QString | prefix |
The prefix of the spinners. | |
QString | suffix |
The suffix of the spinners. | |
int | decimals |
The decimals of the spinners. | |
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. | |
QAbstractSpinBox::StepType | stepType |
The step type of the spinners. | |
|
explicit |
Constructs a multi-spinner control with a predefined number of spinners.
numSpinners | The number of spinners the control should have. |
numCols | The number of layout columns in which the multiple spinners should be arranged. |
parent | The control's widget parent. |
|
virtual |
QVariant value | ( | ) | const |
The 3ds Max type value wrapped in a variant associated with this spinner control.
QVariant resetValue | ( | ) | const |
The reset value of this component.
If a user right-clicks the button-area of a spinner, it will be reset to this value.
bool hasAnimationKeyBrackets | ( | ) | const |
Determines if the animation key brackets around the spinners should be shown.
bool isInteractive | ( | ) | const |
Determines whether this component is in interactive mode.
A Component is in interactive mode if a user is changing its value in a continuous manner, that may be cancelled by the user at the end of the interaction. For the spinner this is while dragging the buttons to change the value or by holding down the left mouse-button over a button to increment or decrement the value over time.
The basic idea of having an interactive mode is to enable the undo/redo system to track those interactive continuous changes as ONE single change (or even just ignores the change on cancel).
Therefore the interactiveChanged signal that gets emitted as soon as the interactive mode changes has an additional param that is only meant to be meaningful on ending an interactive session: the userCancelled param.
double singleStep | ( | ) | const |
Returns the step increment/decrement value of the spinners.
void setSingleStep | ( | double | val | ) |
Sets the step increment/decrement value of the spinners.
double minimum | ( | ) | const |
Returns the minimum value of the spinners.
void setMinimum | ( | double | min | ) |
Sets the minimum value of the spinners.
double maximum | ( | ) | const |
Returns the maximum value of the spinners.
void setMaximum | ( | double | max | ) |
Sets the maximum value of the spinners.
QString prefix | ( | ) | const |
Returns the prefix of the spinners.
void setPrefix | ( | const QString & | prefix | ) |
Sets the prefix of the spinners.
QString suffix | ( | ) | const |
Returns the suffix of the spinners.
void setSuffix | ( | const QString & | suffix | ) |
Sets the suffix of the spinners.
int decimals | ( | ) | const |
Returns the number of decimals of the spinners.
Sets the step number of decimals of the spinners.
int visibleDigits | ( | ) | const |
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.
int numColumns | ( | ) | const |
Returns the number of layout columns in which the multiple spinners are arranged.
Sets the number of layout columns in which the multiple spinners should be arranged.
numCols | The number of layout columns. |
|
pure virtual |
Creates a double array out of a variant with the subclass specific data structure.
The implementation of this method should use the given variant, containing its subclass specific data structure, to create a double array which can be used to fill the spinner values of the control. For instance a QVariant with a Point2 value would construct and return a two value double array. The array order should match the order of the spinners in the UI.
value | A variant with the subclass specific data structure. |
Implemented in QmaxPoint2Spinner, QmaxPoint3Spinner, QmaxPoint4Spinner, and QmaxMatrix3Spinner.
|
pure virtual |
Creates a variant with the subclass specific data structure out of the multiple spinners values.
The implementation of this method should use the given double array values, which represent the spinner values as shown in UI, to construct a QVariant containing the subclass specific data structure. For instance a two value double array would construct and return a QVariant with a Point2 value. The spinner values in the array match the order as shown in the UI.
spinnerValues | The multiple spinner values for the creation of the variant. |
Implemented in QmaxPoint2Spinner, QmaxPoint3Spinner, QmaxPoint4Spinner, and QmaxMatrix3Spinner.
QAbstractSpinBox::StepType stepType | ( | ) | const |
Gets the step type of the spinners.
The step type can be either QAbstractSpinBox::DefaultStepType or QAbstractSpinBox::AdaptiveDecimalStepType. DefaultStepType uses the singleStep for each step, while AdaptiveDecimalStepType uses a step size based on the current value.
|
signal |
Emitted if the actual variant value has changed.
value | The new value associated with this spinner control. |
|
signal |
Emitted as soon as the components interactive mode changes.
interactive | The new interactive mode of the component. |
userCancelled | True if the user actively cancelled an interactive session, for example by pressing the right mouse-button during a interactive dragging-operation. As a matter of fact, this param is only meaningful if the interactive param was false. |
Gets emitted when the visibleDigits have been changed.
visibleDigits | The new value of the visibleDigits property. |
|
slot |
Sets the value associated with this spinner control.
value | The new value associated with this spinner control. If the new value is different from the old one, a valueChanged() is emitted. |
|
slot |
Changes the reset value of this component.
resetValue | The new resetValue |
|
slot |
Sets whether the animation key brackets around the spinners should be shown.
|
slot |
Resets this components value to its resetValue.
Sets the visibleDigits property.
Will emit a visibleDigitsChanged(visibleDigits) signal, if the property was changed.
|
slot |
Sets the step type of the spinners.
The step type can be either QAbstractSpinBox::DefaultStepType or QAbstractSpinBox::AdaptiveDecimalStepType. DefaultStepType uses the singleStep for each step, while AdaptiveDecimalStepType uses a step size based on the current value.
|
readwrite |
The 3ds Max type value wrapped in a variant associated with this spinner control.
|
readwrite |
The reset value of this Component.
|
readwrite |
Indicates whether the animation key brackets are shown around the component.
|
readwrite |
The minimum value of the spinners.
The default is 0.
|
readwrite |
The maximum value of the spinners.
The default is 99.99.
|
readwrite |
The step increment/decrement value of the spinners.
The singleStep value is applied to the current spinner value when the user clicks on the up/down arrow buttons of the spinner. The default is 1.0.
|
readwrite |
The prefix of the spinners.
The prefix is prepended to the displayed value of the spinner. A common usage for a suffix would be the display of a unit of measurement or a currency symbol. For displaying no prefix just apply an empty string. By default no prefix is shown.
|
readwrite |
The suffix of the spinners.
The suffix is appended to the displayed value of the spinner. A common usage for a suffix would be the display of a unit of measurement or a currency symbol. For displaying no suffix just apply an empty string. By default no suffix is shown.
|
readwrite |
The decimals of the spinners.
Sets how many decimals the spinners will use for displaying and interpreting doubles. The default is 3.
|
readwrite |
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.
|
readwrite |
The step type of the spinners.
The step type can be either QAbstractSpinBox::DefaultStepType or QAbstractSpinBox::AdaptiveDecimalStepType. DefaultStepType uses the singleStep for each step, while AdaptiveDecimalStepType uses a step size based on the current value.