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

#include <EventCommands.h>

Inheritance diagram for AddEventCommand:
Inheritance graph
Collaboration diagram for AddEventCommand:
Collaboration graph

Public Member Functions

 AddEventCommand (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 add an event to 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 55 of file EventCommands.h.

Constructor & Destructor Documentation

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

Definition at line 59 of file EventCommands.h.

Member Function Documentation

QString AddEventCommand::getName ( ) const
inlineoverridevirtual

Implements Command.

Definition at line 62 of file EventCommands.h.

Event AddEventCommand::getEvent ( ) const
inline

Definition at line 63 of file EventCommands.h.

Referenced by ChangeEventsCommand::addCommand().

void AddEventCommand::execute ( )
inlineoverridevirtual

Implements Command.

Definition at line 65 of file EventCommands.h.

void AddEventCommand::unexecute ( )
inlineoverridevirtual

Implements Command.

Definition at line 69 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 AddEventCommand::m_event
private

Definition at line 75 of file EventCommands.h.

QString AddEventCommand::m_name
private

Definition at line 76 of file EventCommands.h.


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