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