AddMediaAnnotationCommand.h header

#include <ew/core/AddMediaAnnotationCommand.h>

Namespace ew::core

AddMediaAnnotationCommand class

class ew::core::AddMediaAnnotationCommand

Command that appends an annotation to a media image. Undo removes it again.

Members

ew::core::AddMediaAnnotationCommand::AddMediaAnnotationCommand(Media &media, MediaAnnotation annotation)

Creates a command that adds annotation to media when applied.

ew::core::AddMediaAnnotationCommand::~AddMediaAnnotationCommand() override

Defaulted.

void ew::core::AddMediaAnnotationCommand::apply() override

Appends the annotation, recording the index it landed at.

void ew::core::AddMediaAnnotationCommand::undo() override

Removes the appended annotation.

QString ew::core::AddMediaAnnotationCommand::description() const override

Returns a short description for the undo/redo UI.