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