--- a/src/document.cpp Mon Sep 27 21:04:45 2021 +0300 +++ b/src/document.cpp Tue Sep 28 00:10:29 2021 +0300 @@ -239,3 +239,33 @@ { this->renderer->adjustGridToView(); } + +/** + * @brief Attempts to save the document + * @param errors Where to report any errors that might occurr + * @return whether or not it succeeded + */ +bool Document::save(QTextStream& errors) +{ + this->model->makeUnofficial(); + return this->model->save(errors); +} + +/** + * @brief Gets the current path + * @return string + */ +const QString &Document::modelPath() const +{ + return this->model->path(); +} + +/** + * @brief Sets the path of the model + * @param newPath + */ +void Document::setModelPath(const QString &newPath) +{ + this->model->setPath(newPath); +} +