SetEntityGalleryCommand.h header

#include <ew/core/SetEntityGalleryCommand.h>

Namespace ew::core

SetEntityGalleryCommand class

class ew::core::SetEntityGalleryCommand

Command that replaces an entity's gallery – the ordered list of Media ids shown as images on its codex page – as produced by adding, removing, or reordering images in the inspector. Undo restores the previous gallery; redo re-applies the new one.

Members

ew::core::SetEntityGalleryCommand::SetEntityGalleryCommand(Entity &entity, std::vector< ContentId > gallery)

Creates a command that, when applied, sets entity's gallery to gallery.

ew::core::SetEntityGalleryCommand::~SetEntityGalleryCommand() override

Destroys the command.

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

Records the entity's current gallery and applies the new one.

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

Restores the previous gallery.

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

Returns a short description for the undo/redo UI.