Command to remove an event from an editable containing events, with undo. More...

#include <EventCommands.h>

Inheritance diagram for RemoveEventCommand:
Inheritance graph
Collaboration diagram for RemoveEventCommand:
Collaboration graph

Public Member Functions

 RemoveEventCommand (int editableId, const Event &e, QString name)
 
QString getName () const override
 
Event getEvent () const
 
void execute () override
 
void unexecute () override
 

Protected Member Functions

std::shared_ptr< EventEditablegetEditable ()
 

Private Attributes

Event m_event
 
QString m_name
 

Detailed Description

Command to remove an event from an editable containing events, with undo.

The id must be that of a type that can be retrieved from the AnyById store and dynamic_cast to EventEditable.

Definition at line 84 of file EventCommands.h.

Constructor & Destructor Documentation

RemoveEventCommand::RemoveEventCommand ( int  editableId,
const Event e,
QString  name 
)
inline

Definition at line 88 of file EventCommands.h.

Member Function Documentation

QString RemoveEventCommand::getName ( ) const
inlineoverridevirtual

Implements Command.

Definition at line 91 of file EventCommands.h.

Event RemoveEventCommand::getEvent ( ) const
inline

Definition at line 92 of file EventCommands.h.

Referenced by ChangeEventsCommand::addCommand().

void RemoveEventCommand::execute ( )
inlineoverridevirtual

Implements Command.

Definition at line 94 of file EventCommands.h.

void RemoveEventCommand::unexecute ( )
inlineoverridevirtual

Implements Command.

Definition at line 98 of file EventCommands.h.

std::shared_ptr<EventEditable> WithEditable::getEditable ( )
inlineprotectedinherited

Definition at line 38 of file EventCommands.h.

References SVCERR.

Member Data Documentation

Event RemoveEventCommand::m_event
private

Definition at line 104 of file EventCommands.h.

QString RemoveEventCommand::m_name
private

Definition at line 105 of file EventCommands.h.


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