SetMapTravelSettingsCommand.h header
#include <ew/core/SetMapTravelSettingsCommand.h>
Namespace ew::core
SetMapTravelSettingsCommand class
class ew::core::SetMapTravelSettingsCommand
Command that sets a map's travel settings: the overland travel speed (distance units per hour), the distance-unit label, and the map's width distance (its scale for measurement). Undo restores the previous settings and redo re-applies the new ones.
Members
ew::core::SetMapTravelSettingsCommand::SetMapTravelSettingsCommand(Map &map, double speedPerHour, QString distanceUnit, double widthDistance)
Creates a command that sets map's travel speed to speedPerHour, distance unit to distanceUnit, and width distance (scale) to widthDistance when applied.
ew::core::SetMapTravelSettingsCommand::~SetMapTravelSettingsCommand() override
Defaulted.
void ew::core::SetMapTravelSettingsCommand::apply() override
Records the map's current travel settings and applies the new ones.
void ew::core::SetMapTravelSettingsCommand::undo() override
Restores the previous travel settings.
QString ew::core::SetMapTravelSettingsCommand::description() const override
Returns a short description for the undo/redo UI.