20 #ifndef LIBREPCB_EDITOR_CMDLISTELEMENTREMOVE_H 21 #define LIBREPCB_EDITOR_CMDLISTELEMENTREMOVE_H 26 #include "../undocommand.h" 45 template <
typename T,
typename P,
typename... OnEditedArgs>
52 const T* element) noexcept
~CmdListElementRemove() noexcept
Definition: cmdlistelementremove.h:57
int mIndex
Definition: cmdlistelementremove.h:84
The CmdListElementRemove class.
Definition: cmdlistelementremove.h:46
CmdListElementRemove & operator=(const CmdListElementRemove &rhs)=delete
Definition: occmodel.cpp:77
void performUndo() override
Undo the command.
Definition: cmdlistelementremove.h:72
CmdListElementRemove(SerializableObjectList< T, P, OnEditedArgs... > &list, const T *element) noexcept
Definition: cmdlistelementremove.h:51
CmdListElementRemove()=delete
SerializableObjectList< T, P, OnEditedArgs... > & mList
Definition: cmdlistelementremove.h:81
The UndoCommand class represents a command which you can undo/redo.
Definition: undocommand.h:46
std::shared_ptr< T > mMemorizedElement
Definition: cmdlistelementremove.h:83
std::shared_ptr< T > take(int index) noexcept
Definition: serializableobjectlist.h:351
int indexOf(const T *obj) const noexcept
Definition: serializableobjectlist.h:219
int insert(int index, const std::shared_ptr< T > &obj) noexcept
Definition: serializableobjectlist.h:336
bool performExecute() override
Execute the command the first time.
Definition: cmdlistelementremove.h:64
const T * mElement
Definition: cmdlistelementremove.h:82
void performRedo() override
Redo the command.
Definition: cmdlistelementremove.h:75