NDEVR
API Documentation
DesignObjectInterface

Base level class providing convenience functions for interfacing with one or more DesignObjects. More...

Collaboration diagram for DesignObjectInterface:
[legend]

Public Member Functions

 DesignObjectInterface (DesignObjectWidgetInterface *widget_interface)
 Constructs a DesignObjectInterface bound to the given widget interface.
virtual void addTarget (const DynamicPointer< QTDesignObject > &object)
 Adds a design object to the set of targets and connects its signals.
virtual Bounds< 3, fltp08bounds () const
 Returns the combined 3D bounding box of all target design objects.
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 and disconnects its signals.
virtual void removeTarget (const UUID &object)
 Removes a specific target by UUID and disconnects its signals.
void setManager (QTModelManager *manager)
 Sets the model manager used for UUID-based lookups.
Buffer< UUIDtargetIDs () const
 Returns the UUIDs of all current target design objects.
const Dictionary< UUID, DynamicPointer< QTDesignObject > > & targets () const
 Returns a const reference to the dictionary of all targets.

Protected Member Functions

void onTargetDeletedSlot (UUID id)
 Slot called when a target design object is deleted, removing it from the targets.
void onTargetUpdatedSlot (UUID id)
 Slot called when a target design object is updated, forwarding to the widget interface.

Protected Attributes

QTModelManagerm_manager = nullptr
 The model manager for UUID-based lookups.
Dictionary< UUID, DynamicPointer< QTDesignObject > > m_targets
 Maps each target UUID to its design object pointer.
DesignObjectWidgetInterfacem_widget_interface
 The owning widget interface that receives update callbacks.

Detailed Description

Base level class providing convenience functions for interfacing with one or more DesignObjects.


Definition at line 96 of file DesignObjectWidgetInterface.h.

Constructor & Destructor Documentation

◆ DesignObjectInterface()

DesignObjectInterface::DesignObjectInterface ( DesignObjectWidgetInterface * widget_interface)

Constructs a DesignObjectInterface bound to the given widget interface.

Parameters
[in]widget_interfaceThe owning DesignObjectWidgetInterface.

Member Function Documentation

◆ addTarget()

virtual void DesignObjectInterface::addTarget ( const DynamicPointer< QTDesignObject > & object)
virtual

Adds a design object to the set of targets and connects its signals.

Parameters
[in]objectThe design object to add.

◆ bounds()

virtual Bounds< 3, fltp08 > DesignObjectInterface::bounds ( ) const
virtual

Returns the combined 3D bounding box of all target design objects.

Returns
The axis-aligned bounding box encompassing all targets.

◆ manager()

QTModelManager * DesignObjectInterface::manager ( ) const

Returns the current model manager.

Returns
A pointer to the QTModelManager.

Referenced by setManager().

◆ models()

Buffer< Model > DesignObjectInterface::models ( ) const

Returns all target objects as Models.

Returns
A buffer of Model instances.

◆ onTargetDeletedSlot()

void DesignObjectInterface::onTargetDeletedSlot ( UUID id)
protected

Slot called when a target design object is deleted, removing it from the targets.

Parameters
[in]idThe UUID of the deleted object.

◆ onTargetUpdatedSlot()

void DesignObjectInterface::onTargetUpdatedSlot ( UUID id)
inlineprotected

Slot called when a target design object is updated, forwarding to the widget interface.

Parameters
[in]idThe UUID of the updated object.

Definition at line 155 of file DesignObjectWidgetInterface.h.

References m_widget_interface.

◆ removeTarget() [1/2]

virtual void DesignObjectInterface::removeTarget ( const DynamicPointer< QTDesignObject > & object)
virtual

Removes a specific target design object and disconnects its signals.

Parameters
[in]objectThe design object to remove.

◆ removeTarget() [2/2]

virtual void DesignObjectInterface::removeTarget ( const UUID & object)
virtual

Removes a specific target by UUID and disconnects its signals.

Parameters
[in]objectThe UUID of the design object to remove.

◆ setManager()

void DesignObjectInterface::setManager ( QTModelManager * manager)
inline

Sets the model manager used for UUID-based lookups.

Parameters
[in]managerThe QTModelManager instance.

Definition at line 144 of file DesignObjectWidgetInterface.h.

References m_manager, and manager().

◆ targetIDs()

Buffer< UUID > DesignObjectInterface::targetIDs ( ) const
inline

Returns the UUIDs of all current target design objects.

Returns
A buffer of target UUIDs.

Definition at line 129 of file DesignObjectWidgetInterface.h.

References m_targets.

◆ targets()

const Dictionary< UUID, DynamicPointer< QTDesignObject > > & DesignObjectInterface::targets ( ) const
inline

Returns a const reference to the dictionary of all targets.

Returns
The dictionary mapping UUIDs to design object pointers.

Definition at line 149 of file DesignObjectWidgetInterface.h.

References m_targets.


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