226 |
226 |
227 void Document::adjustGridToView() |
227 void Document::adjustGridToView() |
228 { |
228 { |
229 this->renderer->adjustGridToView(); |
229 this->renderer->adjustGridToView(); |
230 } |
230 } |
231 |
|
232 /** |
|
233 * @brief Attempts to save the document |
|
234 * @param errors Where to report any errors that might occurr |
|
235 * @return whether or not it succeeded |
|
236 */ |
|
237 bool Document::save(QTextStream& errors) |
|
238 { |
|
239 this->model->makeUnofficial(); |
|
240 return this->model->save(errors); |
|
241 } |
|
242 |
|
243 /** |
|
244 * @brief Gets the current path |
|
245 * @return string |
|
246 */ |
|
247 const QString &Document::modelPath() const |
|
248 { |
|
249 return this->model->path(); |
|
250 } |
|
251 |
|
252 /** |
|
253 * @brief Sets the path of the model |
|
254 * @param newPath |
|
255 */ |
|
256 void Document::setModelPath(const QString &newPath) |
|
257 { |
|
258 this->model->setPath(newPath); |
|
259 } |
|
260 |
|