API Documentation
Loading...
Searching...
No Matches
NewModelCommand Class Reference

A DesignCommand that creates a new Model to some specification. More...

#include <NewModelCommand.h>

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

Public Member Functions

virtual void execute (DesignObjectLookup *lookup) override
 
virtual String icon () const override
 
virtual TranslatedString name () const override
 
 NewModelCommand (const TranslatedString &name, const std::function< void(Model &model)> &model)
 
- Public Member Functions inherited from DesignCommand
virtual bool canCombineWith (const DynamicPointer< DesignCommand > &command)
 
virtual bool canGroupWith (const DynamicPointer< DesignCommand > &)
 
virtual void combineWith (const DynamicPointer< DesignCommand > &command)
 
 DesignCommand ()
 
virtual bool isAsyncExecution () const
 
void setUndoRedoID (UUID undo_redo_group)
 
UUID undoRedoID () const
 
virtual ~DesignCommand ()
 

Public Attributes

std::function< void(Model &model)> finished_callback
 
TranslatedString model_name
 
std::function< void(Model &model)> on_create
 
UUID parent_id
 
String type
 
- Public Attributes inherited from DesignCommand
bool can_undo = true
 
bool has_executed = false
 
UUID id
 
bool is_undo = false
 
ProgressInfolog = nullptr
 
Buffer< UUIDtargets
 
Time time = Constant<Time>::Invalid
 
bool update_project_modified = true
 

Additional Inherited Members

- Protected Attributes inherited from DesignCommand
UUID m_undo_redo_group
 

Detailed Description

A DesignCommand that creates a new Model to some specification.


Constructor & Destructor Documentation

◆ NewModelCommand()

NewModelCommand ( const TranslatedString & name,
const std::function< void(Model &model)> & model )
inline

Member Function Documentation

◆ execute()

virtual void execute ( DesignObjectLookup * lookup)
inlineoverridevirtual

Reimplemented from DesignCommand.

◆ icon()

virtual String icon ( ) const
inlineoverridevirtual

Implements DesignCommand.

◆ name()

virtual TranslatedString name ( ) const
inlineoverridevirtual

Implements DesignCommand.

Member Data Documentation

◆ finished_callback

std::function<void(Model& model)> finished_callback

◆ model_name

TranslatedString model_name

◆ on_create

std::function<void(Model& model)> on_create

◆ parent_id

UUID parent_id

◆ type

String type

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