NDEVR
API Documentation
ModelTileCommand

A DesignCommand that applies tiling options to one or more target models, creating or updating ModelTileGroup instances. More...

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

Public Member Functions

 ModelTileCommand (const ModelTileOptions &options)
 Constructs a ModelTileCommand with the given tiling options.
virtual bool addTarget (UUID target_id) override
 Adds a target model (by UUID) to the list of models to tile.
virtual bool canCombineWith (const DynamicPointer< DesignCommand > &command) override
 Checks whether this command can be combined (merged) with another command.
virtual bool canGroupWith (const DynamicPointer< DesignCommand > &command) override
 Checks whether this command can be grouped with another command in the undo stack.
virtual void combineWith (const DynamicPointer< DesignCommand > &command) override
 Merges another compatible command into this one, absorbing its targets and options.
virtual void execute (DesignObjectLookup *lookup) override
 Executes the tiling command, applying tile options to all target models.
virtual StringView icon () const override
 Returns the icon identifier for this command.
virtual bool isAsyncExecution () const override
 Indicates that this command executes asynchronously.
virtual TranslatedString name () const override
 Returns the user-facing translated name of this command.
Public Member Functions inherited from DesignCommand
 DesignCommand ()
 Default constructor.
 DesignCommand (const DesignCommand &command)=default
 Default copy constructor.
virtual ~DesignCommand ()
 Virtual destructor.
void setUndoRedoID (UUID undo_redo_group)
 Sets the undo-redo group identifier for this command.
UUID undoRedoID () const
 Gets the undo-redo group identifier for this command.

Additional Inherited Members

Public Attributes inherited from DesignCommand
bool can_undo = true
 Whether this command supports being undone.
bool has_executed = false
 Whether this command has already been executed.
UUID id
 Unique identifier for this command instance.
bool is_undo = false
 Whether this command represents an undo operation.
LogPtr log
 Log pipe for reporting command progress and errors.
Time time = Constant<Time>::Invalid
 Timestamp of when the command was created or executed.
bool update_project_modified = true
 Whether executing this command should mark the project as modified.
Protected Attributes inherited from DesignCommand
UUID m_undo_redo_group
 The undo-redo group this command belongs to, for batch undo/redo.

Detailed Description

A DesignCommand that applies tiling options to one or more target models, creating or updating ModelTileGroup instances.


Definition at line 128 of file ModelTileGroup.h.

Constructor & Destructor Documentation

◆ ModelTileCommand()

ModelTileCommand::ModelTileCommand ( const ModelTileOptions & options)
inline

Constructs a ModelTileCommand with the given tiling options.

Parameters
[in]optionsThe ModelTileOptions to apply when this command is executed.

Definition at line 135 of file ModelTileGroup.h.

References DesignCommand::DesignCommand().

Member Function Documentation

◆ addTarget()

virtual bool ModelTileCommand::addTarget ( UUID target_id)
inlineoverridevirtual

Adds a target model (by UUID) to the list of models to tile.

Parameters
[in]target_idThe UUID of the model to add as a tiling target.
Returns
True, always accepts the target.

Reimplemented from DesignCommand.

Definition at line 163 of file ModelTileGroup.h.

◆ canCombineWith()

virtual bool ModelTileCommand::canCombineWith ( const DynamicPointer< DesignCommand > & command)
overridevirtual

Checks whether this command can be combined (merged) with another command.

Parameters
[in]commandThe other command to check combination compatibility with.
Returns
True if the commands can be combined into one.

Reimplemented from DesignCommand.

◆ canGroupWith()

virtual bool ModelTileCommand::canGroupWith ( const DynamicPointer< DesignCommand > & command)
overridevirtual

Checks whether this command can be grouped with another command in the undo stack.

Parameters
[in]commandThe other command to check grouping compatibility with.
Returns
True if the commands can be grouped together.

Reimplemented from DesignCommand.

◆ combineWith()

virtual void ModelTileCommand::combineWith ( const DynamicPointer< DesignCommand > & command)
overridevirtual

Merges another compatible command into this one, absorbing its targets and options.

Parameters
[in]commandThe command to merge into this one.

Reimplemented from DesignCommand.

◆ execute()

virtual void ModelTileCommand::execute ( DesignObjectLookup * lookup)
overridevirtual

Executes the tiling command, applying tile options to all target models.

Parameters
[in]lookupThe DesignObjectLookup used to resolve models and dependencies.

Reimplemented from DesignCommand.

◆ icon()

virtual StringView ModelTileCommand::icon ( ) const
inlineoverridevirtual

Returns the icon identifier for this command.

Returns
A StringView containing "copy".

Implements DesignCommand.

Definition at line 144 of file ModelTileGroup.h.

◆ isAsyncExecution()

virtual bool ModelTileCommand::isAsyncExecution ( ) const
inlineoverridevirtual

Indicates that this command executes asynchronously.

Returns
True, always.

Reimplemented from DesignCommand.

Definition at line 189 of file ModelTileGroup.h.

◆ name()

virtual TranslatedString ModelTileCommand::name ( ) const
overridevirtual

Returns the user-facing translated name of this command.

Returns
A TranslatedString describing the command.

Implements DesignCommand.


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