src/document.cpp

changeset 141
185eb297dc1e
parent 131
e2080ac44039
child 143
7b62c52835a1
equal deleted inserted replaced
140:2f383e88acf4 141:185eb297dc1e
237 237
238 void Document::adjustGridToView() 238 void Document::adjustGridToView()
239 { 239 {
240 this->renderer->adjustGridToView(); 240 this->renderer->adjustGridToView();
241 } 241 }
242
243 /**
244 * @brief Attempts to save the document
245 * @param errors Where to report any errors that might occurr
246 * @return whether or not it succeeded
247 */
248 bool Document::save(QTextStream& errors)
249 {
250 this->model->makeUnofficial();
251 return this->model->save(errors);
252 }
253
254 /**
255 * @brief Gets the current path
256 * @return string
257 */
258 const QString &Document::modelPath() const
259 {
260 return this->model->path();
261 }
262
263 /**
264 * @brief Sets the path of the model
265 * @param newPath
266 */
267 void Document::setModelPath(const QString &newPath)
268 {
269 this->model->setPath(newPath);
270 }
271

mercurial