SetDocumentKindCommand.h header
#include <ew/core/SetDocumentKindCommand.h>
Namespace ew::core
SetDocumentKindCommand class
class ew::core::SetDocumentKindCommand
Command that sets a document's kind (prose/screenplay/note). Undo restores the previous kind and redo re-applies the new one.
Members
ew::core::SetDocumentKindCommand::SetDocumentKindCommand(Document &document, DocumentKind kind)
Creates a command that sets document's kind to kind when applied.
ew::core::SetDocumentKindCommand::~SetDocumentKindCommand() override
Defaulted.
void ew::core::SetDocumentKindCommand::apply() override
Records the current kind and sets the new one.
void ew::core::SetDocumentKindCommand::undo() override
Restores the previous kind.
QString ew::core::SetDocumentKindCommand::description() const override
Returns a short description for the undo/redo UI.