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

#include <NewModelCommand.h>

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

Public Member Functions

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

Public Attributes

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

Additional Inherited Members

- Protected Attributes inherited from DesignCommand
UUID m_undo_redo_group
 

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: