From ceeac6bcacfe2296ac9b40bc5b54b525307d2dd5 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Fri, 12 Jul 2013 13:54:29 +0000 Subject: Clear the current filename when using Game->New, Updates the TODO list. --- TODO | 17 ++++++++--------- src/mainwindow.cc | 8 +++++++- src/mainwindow.h | 1 + src/solverwindow.cc | 2 ++ 4 files changed, 18 insertions(+), 10 deletions(-) diff --git a/TODO b/TODO index ab330b6..b0a4d16 100644 --- a/TODO +++ b/TODO @@ -1,12 +1,11 @@ +- Add Help->About +- Add confirm dialgs on Quit and New -- Move->Step solves rules only. Have it search for a solution - and pick a solved cell. - -- Have the options in the Move menu call validate() before solving. - -- Incorporate validate() into the menu +- [VERIFY] Have the options in the Move menu call validate() before solving. +- [VERIFY] Incorporate validate() into the menu -- Remove sidebar buttons - -- Add help +- [SOLVED] Remove sidebar buttons +- [SOLVED] Move->Step solves rules only. Have it search for a solution + and pick a solved cell. +* Added Move->Guess diff --git a/src/mainwindow.cc b/src/mainwindow.cc index 4f252d3..5a80459 100644 --- a/src/mainwindow.cc +++ b/src/mainwindow.cc @@ -21,7 +21,7 @@ void MainWindow::initActions() action_new = new QAction(tr("&New"), this); action_new->setShortcuts(QKeySequence::New); action_new->setStatusTip(tr("Start a new game")); - connect(action_new, SIGNAL(triggered()), mainwindow_solverwindow, SLOT(clear())); + connect(action_new, SIGNAL(triggered()), this, SLOT(doNew())); // Game -> Load action_load = new QAction(tr("&Load..."), this); @@ -113,6 +113,12 @@ void MainWindow::updateTitle() } } +void MainWindow::doNew() +{ + mainwindow_solverwindow->clear(); + updateTitle(); +} + void MainWindow::doSave() { mainwindow_solverwindow->save(); diff --git a/src/mainwindow.h b/src/mainwindow.h index 13283fe..0054893 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -46,6 +46,7 @@ private: private slots: + void doNew(); void doSave(); void doSaveAs(); void doLoad(); diff --git a/src/solverwindow.cc b/src/solverwindow.cc index bad0791..f680c59 100644 --- a/src/solverwindow.cc +++ b/src/solverwindow.cc @@ -159,6 +159,8 @@ void SolverWindow::clear() { Sudoku sudoku; solverwindow_sudokuwidget->set_values(sudoku); + + solverwindow_filename.clear(); } void SolverWindow::step() -- cgit v1.2.3