From bd6fff9979ec9c9d9bc98b76b3d4eedc95047ae9 Mon Sep 17 00:00:00 2001 From: Tats Date: Sat, 11 Jan 2014 23:03:13 -0500 Subject: [PATCH] Stub for clearProject() --- MainWindow.cpp | 15 ++++++++++----- MainWindow.h | 11 +++++------ 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/MainWindow.cpp b/MainWindow.cpp index 8a3dd07..1ddba13 100644 --- a/MainWindow.cpp +++ b/MainWindow.cpp @@ -284,9 +284,12 @@ void MainWindow::updateStatusBar() // formulaLabel->setText(spreadsheet->currentFormula()); } -/** - * Create an image paint. - */ +bool MainWindow::clearProject() +{ + // TODO: implement (possibly preferably iteratively calling remove() methods on paints and mappings + // once they will be made available). +} + uid MainWindow::createImagePaint(uid paintId, QString uri, float x, float y) { // Cannot create image with already existing id. @@ -376,8 +379,8 @@ uid MainWindow::createTriangleTextureMapping(uid mappingId, // Return the id. return id; } - } + void MainWindow::windowModified() { setWindowModified(true); @@ -703,7 +706,9 @@ bool MainWindow::loadFile(const QString &fileName) return false; } - mappingManager->clearProject(); // FIXME: clearProject is not implemented! + // Clear current project. + clearProject(); + ProjectReader reader(this); if (! reader.readFile(&file)) { diff --git a/MainWindow.h b/MainWindow.h index 717cae2..3ecaef7 100644 --- a/MainWindow.h +++ b/MainWindow.h @@ -68,12 +68,6 @@ private slots: void about(); void updateStatusBar(); - // CRUD. - - /** - * Create an image paint. - */ - // Widget callbacks. void handlePaintItemSelectionChanged(); void handleMappingItemSelectionChanged(); @@ -88,6 +82,11 @@ private slots: public slots: // CRUD. + /** + * Clears all mappings and paints. + */ + bool clearProject(); + /** * Create an image paint. */