SetDocumentSourcesCommand.h header

#include <ew/core/SetDocumentSourcesCommand.h>

Namespace ew::core

SetDocumentSourcesCommand class

class ew::core::SetDocumentSourcesCommand

Command that sets the list of sources a document cites. Undo restores the previous list and redo re-applies the new one.

Members

ew::core::SetDocumentSourcesCommand::SetDocumentSourcesCommand(Document &document, std::vector< ContentId > sourceIds)

Creates a command that sets document's cited sources to sourceIds when applied.

ew::core::SetDocumentSourcesCommand::~SetDocumentSourcesCommand() override

Destroys the command.

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

Records the document's current sources and applies the new list.

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

Restores the previous source list.

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

Returns a short description for the undo/redo UI.