NDEVR
API Documentation
FilteringWidget

A widget allowing the user to select a FilterDescription and adjust its properties and execute a filtering operation. More...

Inheritance diagram for FilteringWidget:
[legend]
Collaboration diagram for FilteringWidget:
[legend]

Public Member Functions

 FilteringWidget (QWidget *parent=nullptr)
 Constructs a FilteringWidget.
QSize sizeHint () const override
 Returns the preferred size hint for layout calculations.
void updateUIFromAvailableFilters ()
 Updates the UI to reflect the currently available filters.
Public Member Functions inherited from DesignObjectWidgetInterface
virtual void addTarget (const DynamicPointer< QTDesignObject > &object)
 Adds a design object to the set of targets.
virtual Bounds< 3, fltp08bounds () const
 Returns the combined 3D bounding box of all target design objects.
void clearTargets ()
 Removes all target design objects from this widget.
QTModelManagermanager () const
 Returns the current model manager.
Buffer< Modelmodels () const
 Returns all target objects as Models.
virtual void removeTarget (const DynamicPointer< QTDesignObject > &object)
 Removes a specific target design object.
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< UUIDtargetIDs () const
 Returns the UUIDs of all current target design objects.

Protected Member Functions

QWidget * createFilterWidget (FilterDescription *description_ptr, bool is_active)
 Creates a widget for configuring a single filter.
void executeFilters ()
 Slot that executes the currently configured filters on the target.
void onTargetUpdated (UUID) override
 Called when the target design object is updated.
void setToDefaults ()
 Slot that resets all filter settings to their default values.
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

Buffer< FilterDescription * > m_applied_filters
 The list of currently applied filter descriptions.
Buffer< FilterDescription * > m_available_filters
 The list of available filter descriptions.
Ui::VertexFilteringUI * ui
 The UI form for this widget.
Protected Attributes inherited from DesignObjectWidgetInterface
DesignObjectInterfacem_interface
 The internal QObject-based implementation handling signals and target storage.

Detailed Description

A widget allowing the user to select a FilterDescription and adjust its properties and execute a filtering operation.


Definition at line 15 of file FilteringWidget.h.

Constructor & Destructor Documentation

◆ FilteringWidget()

FilteringWidget::FilteringWidget ( QWidget * parent = nullptr)

Constructs a FilteringWidget.

Parameters
[in]parentThe parent widget.

Member Function Documentation

◆ createFilterWidget()

QWidget * FilteringWidget::createFilterWidget ( FilterDescription * description_ptr,
bool is_active )
protected

Creates a widget for configuring a single filter.

Parameters
[in]description_ptrThe filter description to create a widget for.
[in]is_activeWhether the filter is currently active.
Returns
A pointer to the newly created filter configuration widget.

◆ onTargetUpdated()

void FilteringWidget::onTargetUpdated ( UUID )
overrideprotectedvirtual

Called when the target design object is updated.

Parameters
[in]idThe UUID of the updated target.

Reimplemented from DesignObjectWidgetInterface.

◆ sizeHint()

QSize FilteringWidget::sizeHint ( ) const
override

Returns the preferred size hint for layout calculations.

Returns
The size hint.

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