SetMapGridCommand.h header

#include <ew/core/SetMapGridCommand.h>

Namespace ew::core

SetMapGridCommand class

class ew::core::SetMapGridCommand

Command that sets a map's grid overlay – its kind (none/square/hex) and its column count – in one atomic, undoable step. Undo restores the previous grid settings.

Members

ew::core::SetMapGridCommand::SetMapGridCommand(Map &map, MapGridKind gridKind, int gridColumns)

Creates a command that sets map's grid to gridKind with gridColumns columns.

ew::core::SetMapGridCommand::~SetMapGridCommand() override

Destroys the command.

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

Records the map's current grid settings and applies the new ones.

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

Restores the previous grid settings.

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

Returns a short description for the undo/redo UI.