|
| QmaxPoint3Spinner (QWidget *parent=nullptr) |
|
virtual QVector< double > | fromMaxTypeVariant (const QVariant &value) const override |
| Creates a double array out of a variant with the subclass specific data structure.
|
|
virtual QVariant | toMaxTypeVariant (const QVector< double > &spinnerValues) const override |
| Creates a variant with the subclass specific data structure out of the multiple spinners values.
|
|
| 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.
|
|
virtual QVector< double > fromMaxTypeVariant |
( |
const QVariant & |
value | ) |
const |
|
inlineoverridevirtual |
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.
- Parameters
-
value | A variant with the subclass specific data structure. |
- Returns
- A double array containing the values for the spinners of the control.
- See also
- toMaxTypeVariant()
Implements QmaxMultiSpinner.
370 {
371 QVector<double> spinnerValues;
372 spinnerValues.reserve( 3 );
373 if (
value.canConvert<Point3>() )
374 {
375 Point3 p = qvariant_cast<Point3>(
value);
376 spinnerValues << p.x << p.y << p.z;
377 }
378 return spinnerValues;
379 }
QVariant value
The 3ds Max type value wrapped in a variant associated with this spinner control.
Definition: QmaxMultiSpinner.h:39
virtual QVariant toMaxTypeVariant |
( |
const QVector< double > & |
spinnerValues | ) |
const |
|
inlineoverridevirtual |
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.
- Parameters
-
spinnerValues | The multiple spinner values for the creation of the variant. |
- Returns
- A variant with the subclass specific data structure.
- See also
- fromMaxTypeVariant()
Implements QmaxMultiSpinner.
382 {
383 if ( spinnerValues.count() == 3 )
384 return QVariant::fromValue( Point3( spinnerValues[0], spinnerValues[1], spinnerValues[2] ) );
385 else
386 return QVariant();
387 }