SetDocumentFootnotesCommand.h header
#include <ew/core/SetDocumentFootnotesCommand.h>
Namespace ew::core
SetDocumentFootnotesCommand class
class ew::core::SetDocumentFootnotesCommand
Command that replaces a document's footnote/endnote definitions as one undoable step (see Footnote). Adding, editing, deleting, or retyping a note is expressed as the new whole list, so the command records the previous list on apply() and restores it on undo(). This owns only the note definitions; the inline [^id] references live in the body and are edited through the editor's own text undo, so a note's text change is independent of any body change.
Members
ew::core::SetDocumentFootnotesCommand::SetDocumentFootnotesCommand(Document &document, std::vector< Footnote > footnotes)
Creates a command that, when applied, sets document's footnotes to footnotes.
ew::core::SetDocumentFootnotesCommand::~SetDocumentFootnotesCommand() override
Destroys the command.
void ew::core::SetDocumentFootnotesCommand::apply() override
Records the document's current footnotes, then applies the new ones.
void ew::core::SetDocumentFootnotesCommand::undo() override
Restores the previous footnotes.
QString ew::core::SetDocumentFootnotesCommand::description() const override
Returns a short description for the undo/redo UI.