SetMapRegionsCommand.h header
#include <ew/core/SetMapRegionsCommand.h>
Namespace ew::core
SetMapRegionsCommand class
class ew::core::SetMapRegionsCommand
Command that replaces the full set of regions drawn over a map. A single command covers drawing, moving, relabelling, re-linking, and deleting regions: the caller builds the new region list and applies it atomically. Undo restores the previous regions.
Members
ew::core::SetMapRegionsCommand::SetMapRegionsCommand(Map &map, std::vector< MapRegion > regions)
Creates a command that sets map's regions to regions when applied.
ew::core::SetMapRegionsCommand::~SetMapRegionsCommand() override
Destroys the command.
void ew::core::SetMapRegionsCommand::apply() override
Records the map's current regions and applies the new ones.
void ew::core::SetMapRegionsCommand::undo() override
Restores the previous regions.
QString ew::core::SetMapRegionsCommand::description() const override
Returns a short description for the undo/redo UI.