src/document.cpp

changeset 148
e1ced2523cad
parent 143
7b62c52835a1
child 149
008989bc7d6e
child 150
b6cbba6e29a1
equal deleted inserted replaced
147:37f936073cac 148:e1ced2523cad
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

mercurial