3ds Max C++ API Reference
|
3ds Max's version of a Qt QSpinBox. More...
#include <QmaxSpinBox.h>
Public Slots | |
void | setResetValue (int resetValue) |
Changes the reset value of this component. | |
void | setAnimationKeyBrackets (bool animationKeyBrackets=true) |
Sets whether the animation key brackets around the component should be shown. | |
void | setIndeterminate (bool indeterminate) |
Sets whether the control should be shown in an indeterministic state. | |
void | setVisibleDigits (int visibleDigits) |
Sets the visibleDigits property. | |
void | reset () |
Resets this component's value to its resetValue. | |
Signals | |
void | interactiveChanged (bool interactive, bool userCancelled=false) |
Gets emitted as soon the component's interactive mode changes. | |
void | contextMenuCustomization (QMenu &contextMenu) |
Gets emitted when the context menu is shown. | |
void | visibleDigitsChanged (int visibleDigits) |
Gets emitted when the visibleDigits have been changed. | |
Public Member Functions | |
QmaxSpinBox (QWidget *parent=nullptr) | |
virtual | ~QmaxSpinBox () |
int | resetValue () const |
The reset value of this Component. | |
bool | hasAnimationKeyBrackets () const |
Determines if the animation key brackets around the component should be shown. | |
bool | isIndeterminate () const |
Determines if the control should be shown in an indeterministic state. | |
bool | isInteractive () const |
Determines whether this component is in interactive mode. | |
int | visibleDigits () const |
QValidator::State | validate (QString &input, int &pos) const override |
void | stepBy (int steps) override |
QSize | minimumSizeHint () const override |
QSize | sizeHint () const override |
Protected Member Functions | |
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) |
int | valueFromText (const QString &text) const override |
QmaxSpinBox (QmaxSpinBoxPrivate< int, QmaxSpinBox > *d, QWidget *parent=nullptr) | |
QmaxSpinBoxPrivate< int, QmaxSpinBox > * | d_func () |
const QmaxSpinBoxPrivate< int, QmaxSpinBox > * | d_func () const |
Protected Attributes | |
QmaxSpinBoxPrivate< int, QmaxSpinBox > * | d_ptr |
Properties | |
int | resetValue |
The reset value of this Component. | |
bool | animationKeyBrackets |
Show the animation key brackets around the component. | |
bool | indeterminate |
Draws '---' instead of the value to show the indeterministic state. | |
bool | interactive |
Determines whether this component is in interactive mode. | |
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. | |
Friends | |
class | QmaxSpinBoxPrivate< int, QmaxSpinBox > |
3ds Max's version of a Qt QSpinBox.
This class derives from QSpinBox and adds some 3ds Max specific properties and behaviors to it. In general, it behaves almost exactly like the regular Qt QSpinBox, with these additions:
This widget is intended to be used in plug-ins instead of QSpinBox to ensure consistency with the 3ds Max UI behavior.
|
explicit |
|
virtual |
|
explicitprotected |
int resetValue | ( | ) | const |
The reset value of this Component.
bool hasAnimationKeyBrackets | ( | ) | const |
Determines if the animation key brackets around the component should be shown.
bool isIndeterminate | ( | ) | const |
Determines if the control should be shown in an indeterministic state.
In this state, it displays '---'
instead of the value.
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 parameter that is only meant to be meaningful on ending an interactive session: the userCancelled parameter.
int visibleDigits | ( | ) | const |
|
override |
|
override |
|
override |
|
signal |
Gets emitted as soon the component's 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 parameter is only meaningful if the interactive parameter was false. |
|
signal |
Gets emitted when the context menu is shown.
contextMenu | A menu in which custom actions can be added. |
Gets emitted when the visibleDigits have been changed.
visibleDigits | The new value of the visibleDigits property. |
Changes the reset value of this component.
[in] | resetValue | The new resetValue |
|
slot |
Sets whether the animation key brackets around the component should be shown.
|
slot |
Sets whether the control should be shown in an indeterministic state.
In this state, it displays '---'
instead of the value.
Sets the visibleDigits property.
Will emit a visibleDigitsChanged(visibleDigits) signal, if the property was changed.
|
slot |
Resets this component's value to its resetValue.
|
overrideprotected |
|
overrideprotected |
|
overrideprotected |
|
overrideprotected |
|
overrideprotected |
|
overrideprotected |
|
overrideprotected |
|
protected |
|
overrideprotected |
|
inlineprotected |
|
inlineprotected |
|
friend |
|
protected |
|
readwrite |
The reset value of this Component.
|
readwrite |
Show the animation key brackets around the component.
|
readwrite |
Draws '---'
instead of the value to show the indeterministic state.
|
read |
Determines whether this component is in interactive mode.
|
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.
The number of digits that is used for the calculation of the minimum width of the component.
The actual displayed number of digits may vary.
The calculation of the minimum width is done in this way:
Qt internally calculates the widths of the renderings of the minimum and maximum values of the QSpinBox using its font, as well as - if set - the specialValueText property to determine the actual width needed to show all possible values. This value is used, if visibleDigits is set to 0.
Then the width of a value containing the absolute of visibleDigits digits, such as "222222" for 6 visibleDigits, is calculated using the widget's font, including prefix and suffix. If the visibleDigits is greater than 0, this value is compared against the prior calculation result and the minimum of both is used - meaning the QmaxSpin box will reserve up to visibleDigits space, but nor more.
If the visibleDigits is a negative number, the result of this calculation is used, regardless of the fact that it might be able to display all its values in a smaller space. This may be helpful to align different spin- boxes more precisely.
The default value for 3ds Max is 6 - but can be changed by the user with this entry in the 3dsmax.ini
file :