SetChartCommand.h header

#include <ew/core/SetChartCommand.h>

Namespace ew::core

SetChartCommand class

class ew::core::SetChartCommand

Command that replaces a chart's editable state – its title, kind, category labels, data series, and axis titles – as produced by editing a chart in the charts UI. Undo restores the previous state; redo re-applies the new one. Editing a chart is a single undoable step.

Members

ew::core::SetChartCommand::SetChartCommand(Chart &chart, QString title, ChartKind kind, std::vector< QString > categories, std::vector< ChartSeries > series, QString valueAxisTitle, QString categoryAxisTitle)

Creates a command that, when applied, sets chart to the given title, kind, categories, series, and axis titles.

ew::core::SetChartCommand::~SetChartCommand() override

Destroys the command.

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

Records the chart's current state and applies the new one.

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

Restores the previous state.

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

Returns a short description for the undo/redo UI.