![]() |
NDEVR
API Documentation
|
Can adjust the properties of a material using a QCustomSlider widget. More...
Public Member Functions | |
| MaterialPropertySlider (const DynamicPointer< QTDesignObject > &object, NDPM property, QWidget *parent=nullptr) | |
| Constructs a slider bound to a specific material property of a design object. | |
| MaterialPropertySlider (NDPM property, QWidget *parent=nullptr) | |
| Constructs an unbound slider for a specific material property. | |
| void | addTarget (const DynamicPointer< QTDesignObject > &object) override |
| Adds a design object as an additional editing target. | |
| void | onObjectDeletedSlot () |
| Slot called when the target object is deleted, clearing the current target. | |
| void | onTargetUpdated (UUID id) override |
| Called when the target design object is updated, refreshes the slider value. | |
| void | refreshFromMaterial (const Material &mat) |
| Updates the slider value from the given material's property. | |
| void | removeTarget (const DynamicPointer< QTDesignObject > &object) override |
| Removes a design object from the editing targets. | |
| Public Member Functions inherited from QCustomSlider | |
| QCustomSlider (Qt::Orientation orientation, QWidget *parent=nullptr) | |
| Constructs a slider with the specified orientation. | |
| QCustomSlider (QWidget *parent=nullptr) | |
| Constructs a slider with default orientation. | |
| void | edited (fltp08 percent) |
| Signal emitted when the slider value changes. | |
| void | editingFinished () |
| Signal emitted when the user finishes editing the slider value. | |
| fltp08 | getValue () const |
| Returns the current slider value as a floating-point percent. | |
| void | setMaximum (fltp08 value) |
| Sets the maximum slider value from a floating-point value. | |
| void | setMinimum (fltp08 value) |
| Sets the minimum slider value from a floating-point value. | |
| void | setRange (fltp08 min, fltp08 max) |
| Sets the minimum and maximum range of the slider. | |
| void | setValue (fltp08 value) |
| Sets the slider value from a floating-point percent. | |
| void | setVertical (bool is_vertical) |
| Sets the slider orientation to vertical or horizontal. | |
| Public Member Functions inherited from DesignObjectWidgetInterface | |
| virtual Bounds< 3, fltp08 > | bounds () const |
| Returns the combined 3D bounding box of all target design objects. | |
| void | clearTargets () |
| Removes all target design objects from this widget. | |
| QTModelManager * | manager () const |
| Returns the current model manager. | |
| Buffer< Model > | models () const |
| Returns all target objects as Models. | |
| virtual void | removeTarget (const UUID &object) |
| Removes a specific target by UUID. | |
| void | setManager (QTModelManager *manager) |
| Sets the model manager used for UUID-based lookups. | |
| void | setTarget (const DynamicPointer< QTDesignObject > &object) |
| Sets a single target design object, replacing any existing targets. | |
| void | setTargetID (const UUID &object) |
| Sets a single target by UUID, replacing any existing targets. | |
| void | setTargetIDs (const Buffer< UUID > &objects) |
| Sets multiple targets by UUID, replacing any existing targets. | |
| void | setTargets (const Buffer< DynamicPointer< QTDesignObject > > &objects) |
| Sets multiple target design objects, replacing any existing targets. | |
| Buffer< UUID > | targetIDs () const |
| Returns the UUIDs of all current target design objects. | |
Protected Member Functions | |
| void | init () |
| Initializes slider range and connections based on the material property. | |
| Protected Member Functions inherited from QCustomSlider | |
| void | init () |
| Initializes the slider with default settings and signal connections. | |
| void | onEditedSlot () |
| Slot called when the slider value is edited by the user. | |
| fltp08 | sliderScale () const |
| Returns the internal scale factor used to convert between floating-point values and the integer-based QSlider range. | |
| Protected Member Functions inherited from DesignObjectWidgetInterface | |
| const Dictionary< UUID, DynamicPointer< QTDesignObject > > & | targets () const |
| Returns a const reference to the dictionary of all targets. | |
Protected Attributes | |
| NDPM | m_property |
| The material property controlled by this slider. | |
| Protected Attributes inherited from DesignObjectWidgetInterface | |
| DesignObjectInterface * | m_interface |
| The internal QObject-based implementation handling signals and target storage. | |
Can adjust the properties of a material using a QCustomSlider widget.
Definition at line 11 of file MaterialPropertySlider.h.
| MaterialPropertySlider::MaterialPropertySlider | ( | const DynamicPointer< QTDesignObject > & | object, |
| NDPM | property, | ||
| QWidget * | parent = nullptr ) |
Constructs a slider bound to a specific material property of a design object.
| [in] | object | The design object whose material property is being edited. |
| [in] | property | The material property to control. |
| [in] | parent | The optional parent widget. |
Referenced by DepthBiasSlider::DepthBiasSlider(), DepthBiasSlider::DepthBiasSlider(), OpacitySlider::OpacitySlider(), OpacitySlider::OpacitySlider(), PixelThicknessSlider::PixelThicknessSlider(), and PixelThicknessSlider::PixelThicknessSlider().
| MaterialPropertySlider::MaterialPropertySlider | ( | NDPM | property, |
| QWidget * | parent = nullptr ) |
Constructs an unbound slider for a specific material property.
| [in] | property | The material property to control. |
| [in] | parent | The optional parent widget. |
|
inlineoverridevirtual |
Adds a design object as an additional editing target.
| [in] | object | The design object to add. |
Reimplemented from DesignObjectWidgetInterface.
Definition at line 32 of file MaterialPropertySlider.h.
References DesignObjectWidgetInterface::addTarget().
|
overridevirtual |
Called when the target design object is updated, refreshes the slider value.
| [in] | id | The UUID of the updated object. |
Reimplemented from DesignObjectWidgetInterface.
|
inline |
Updates the slider value from the given material's property.
| [in] | mat | The material to read the property value from. |
Definition at line 49 of file MaterialPropertySlider.h.
References DesignObject::get(), DesignObject::isValid(), m_property, QCustomSlider::setValue(), and thickness.
|
inlineoverridevirtual |
Removes a design object from the editing targets.
| [in] | object | The design object to remove. |
Reimplemented from DesignObjectWidgetInterface.
Definition at line 40 of file MaterialPropertySlider.h.
References DesignObjectWidgetInterface::removeTarget().