![]() |
NDEVR
API Documentation
|
A command that sets a single compile-time-known property on multiple DesignObjects at once, with full undo/redo support. More...
Public Member Functions | |
| SetProperties () | |
| Default constructor. | |
| SetProperties (t_type value) | |
| Constructs a SetProperties command with the value to apply to all targets. | |
| virtual bool | addTarget (UUID target_id) override |
| Adds a target object by UUID to this command's target list. | |
| void | execute (DesignObjectLookup *lookup) |
| Executes or undoes the property change on all target objects. | |
| virtual StringView | icon () const override |
| Returns the icon identifier for this command. | |
| virtual TranslatedString | name () const override |
| Returns the human-readable name of this command for display in the UI. | |
| Public Member Functions inherited from DesignCommand | |
| DesignCommand () | |
| Default constructor. | |
| DesignCommand (const DesignCommand &command)=default | |
| Default copy constructor. | |
| virtual | ~DesignCommand () |
| Virtual destructor. | |
| virtual bool | canCombineWith (const DynamicPointer< DesignCommand > &) |
| Checks whether this command can be combined with another command into a single operation. | |
| virtual bool | canGroupWith (const DynamicPointer< DesignCommand > &) |
| Checks whether this command can be grouped with another command for batch execution. | |
| virtual void | combineWith (const DynamicPointer< DesignCommand > &command) |
| Combines this command with another compatible command, merging their operations. | |
| virtual bool | isAsyncExecution () const |
| Whether this command should be executed asynchronously. | |
| 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. | |
Public Attributes | |
| Buffer< UUID > | targets |
| The list of target design object UUIDs. | |
| t_type | value |
| The new property value to apply to all targets. | |
| 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 | |
| Buffer< t_type > | m_previous_values |
| Stored previous values for each target, used for undo. | |
| Protected Attributes inherited from DesignCommand | |
| UUID | m_undo_redo_group |
| The undo-redo group this command belongs to, for batch undo/redo. | |
A command that sets a single compile-time-known property on multiple DesignObjects at once, with full undo/redo support.
Each target's previous value is individually stored and restored on undo.
| t_property | The compile-time property identifier (e.g., an NDPO, NDPG, or NDPM enum value). |
| t_type | The value type of the property, defaulting to the type declared by PropertySpec. |
Definition at line 115 of file SetPropertiesCommand.h.
|
inline |
Constructs a SetProperties command with the value to apply to all targets.
| [in] | value | The new value to assign to the property on each target. |
Definition at line 126 of file SetPropertiesCommand.h.
References value.
|
inlineoverridevirtual |
Adds a target object by UUID to this command's target list.
| [in] | target_id | The UUID of the design object to add as a target. |
Reimplemented from DesignCommand.
Definition at line 180 of file SetPropertiesCommand.h.
References targets.
|
inlinevirtual |
Executes or undoes the property change on all target objects.
When executing forward, each target's previous value is stored and the new value is applied. When undoing, each target's previous value is restored. Invalid targets are skipped.
| [in] | lookup | The design object registry containing the target objects. |
Reimplemented from DesignCommand.
Definition at line 153 of file SetPropertiesCommand.h.
References DesignCommand::is_undo, m_previous_values, DesignObjectLookup::object(), targets, value, and DesignObjectLookup::writeLock().
|
inlineoverridevirtual |
Returns the icon identifier for this command.
Implements DesignCommand.
Definition at line 134 of file SetPropertiesCommand.h.
|
inlineoverridevirtual |
Returns the human-readable name of this command for display in the UI.
Implements DesignCommand.
Definition at line 142 of file SetPropertiesCommand.h.