NDEVR
API Documentation
ColorChannelCombo

Allows the user to select a method to color a particular channel. More...

Collaboration diagram for ColorChannelCombo:
[legend]

Public Member Functions

 ColorChannelCombo (const DynamicPointer< QTDesignObject > &target, QCustomComboBox *combo)
 Constructs a ColorChannelCombo with a target design object and combo box.
 ColorChannelCombo (const DynamicPointer< QTDesignObject > &target, UVType uv, QCustomComboBox *combo)
 Constructs a ColorChannelCombo with a target, UV type, and combo box.
void colorChannelChosenSignal ()
 Emitted when a specific color channel is chosen.
void computedColorChosenSignal ()
 Emitted when computed color mode is chosen.
DesignParameter currentParameter () const
 Returns the currently selected design parameter for the color channel.
virtual bool eventFilter (QObject *watched, QEvent *event)
 Filters events for the combo box to handle custom interactions.
bool isSetToImage () const
 Returns whether the current selection is set to image mode.
void refreshFromMaterial (const Material &mat)
 Refreshes the combo state from the given material.
void refreshFromModel ()
 Refreshes the combo state from the current model data.
void setAlwaysAllowImage (bool always_allow_image)
 Sets whether the image option is always available regardless of data.
void setHasDefault (bool has_default)
 Sets whether a default option is available in the combo.
void setHasSolidColor (bool has_solid_color)
 Sets whether a solid color option is available in the combo.
void setTarget (const DynamicPointer< QTDesignObject > &target)
 Sets the target design object for color channel selection.
void setUVType (const UVType &target)
 Sets the UV type for color channel configuration.
void solidColorChosenSignal ()
 Emitted when solid color mode is chosen.

Protected Member Functions

void init ()
 Initializes the combo box items and signal connections.

Protected Attributes

bool m_always_allow_image = false
 Whether the image option is always shown.
TimeSpan m_animation_time
 Duration of color transition animations.
QCustomComboBoxm_combo
 The combo box widget for selection.
bool m_has_color_by_model
 Whether a color-by-model option is available.
bool m_has_contrast_color
 Whether a contrast color option is available.
bool m_has_default
 Whether a default option is available.
bool m_has_image
 Whether an image coloring option is available.
bool m_has_solid_color
 Whether a solid color option is available.
bool m_needs_item_refresh
 Whether the combo items need to be refreshed.
DynamicPointer< QTDesignObjectm_target
 The target design object for color configuration.
UVType m_uv_type
 The UV type being configured.

Detailed Description

Allows the user to select a method to color a particular channel.


Definition at line 41 of file ColorChannelCombo.h.

Constructor & Destructor Documentation

◆ ColorChannelCombo() [1/2]

ColorChannelCombo::ColorChannelCombo ( const DynamicPointer< QTDesignObject > & target,
QCustomComboBox * combo )

Constructs a ColorChannelCombo with a target design object and combo box.

Parameters
[in]targetThe design object whose color channel is being selected.
[in]comboThe combo box widget for channel selection.

◆ ColorChannelCombo() [2/2]

ColorChannelCombo::ColorChannelCombo ( const DynamicPointer< QTDesignObject > & target,
UVType uv,
QCustomComboBox * combo )

Constructs a ColorChannelCombo with a target, UV type, and combo box.

Parameters
[in]targetThe design object whose color channel is being selected.
[in]uvThe UV type to configure coloring for.
[in]comboThe combo box widget for channel selection.

Member Function Documentation

◆ currentParameter()

DesignParameter ColorChannelCombo::currentParameter ( ) const

Returns the currently selected design parameter for the color channel.

Returns
The active DesignParameter.

◆ eventFilter()

virtual bool ColorChannelCombo::eventFilter ( QObject * watched,
QEvent * event )
virtual

Filters events for the combo box to handle custom interactions.

Parameters
[in]watchedThe object being watched.
[in]eventThe event to filter.
Returns
True if the event was handled.

◆ isSetToImage()

bool ColorChannelCombo::isSetToImage ( ) const

Returns whether the current selection is set to image mode.

Returns
True if image coloring is selected.

◆ refreshFromMaterial()

void ColorChannelCombo::refreshFromMaterial ( const Material & mat)

Refreshes the combo state from the given material.

Parameters
[in]matThe material to read color channel data from.

◆ setAlwaysAllowImage()

void ColorChannelCombo::setAlwaysAllowImage ( bool always_allow_image)

Sets whether the image option is always available regardless of data.

Parameters
[in]always_allow_imageWhether to always show the image option.

◆ setHasDefault()

void ColorChannelCombo::setHasDefault ( bool has_default)

Sets whether a default option is available in the combo.

Parameters
[in]has_defaultWhether to include a default option.

◆ setHasSolidColor()

void ColorChannelCombo::setHasSolidColor ( bool has_solid_color)

Sets whether a solid color option is available in the combo.

Parameters
[in]has_solid_colorWhether to include a solid color option.

◆ setTarget()

void ColorChannelCombo::setTarget ( const DynamicPointer< QTDesignObject > & target)

Sets the target design object for color channel selection.

Parameters
[in]targetThe design object to target.

◆ setUVType()

void ColorChannelCombo::setUVType ( const UVType & target)

Sets the UV type for color channel configuration.

Parameters
[in]targetThe UV type to use.

The documentation for this class was generated from the following file: