SetMapRoutesCommand.h header
#include <ew/core/SetMapRoutesCommand.h>
Namespace ew::core
SetMapRoutesCommand class
class ew::core::SetMapRoutesCommand
Command that replaces the full set of travel routes on a map. A single command covers adding, editing, and deleting routes: the caller builds the new route list and applies it atomically. Undo restores the previous routes.
Members
ew::core::SetMapRoutesCommand::SetMapRoutesCommand(Map &map, std::vector< MapRoute > routes)
Creates a command that sets map's routes to routes when applied.
ew::core::SetMapRoutesCommand::~SetMapRoutesCommand() override
Destroys the command.
void ew::core::SetMapRoutesCommand::apply() override
Records the map's current routes and applies the new ones.
void ew::core::SetMapRoutesCommand::undo() override
Restores the previous routes.
QString ew::core::SetMapRoutesCommand::description() const override
Returns a short description for the undo/redo UI.