SetMapPinsCommand.h header

#include <ew/core/SetMapPinsCommand.h>

Namespace ew::core

SetMapPinsCommand class

class ew::core::SetMapPinsCommand

Command that replaces the full set of pinned markers on a map. A single command covers adding, editing, and deleting pins: the caller builds the new pin list and applies it atomically. Undo restores the previous pins.

Members

ew::core::SetMapPinsCommand::SetMapPinsCommand(Map &map, std::vector< MapPin > pins)

Creates a command that sets map's pins to pins when applied.

ew::core::SetMapPinsCommand::~SetMapPinsCommand() override

Destroys the command.

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

Records the map's current pins and applies the new ones.

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

Restores the previous pins.

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

Returns a short description for the undo/redo UI.