// Clear out the contents of the board. Repaint the screen // set values to their defaults. void Editor::newBoard() { if (!testSave()) return; theBoard.clearBoardLayout(); clean=true; numTiles=0; statusChanged(); repaint(false); }
void Editor::loadBoard() { if (!testSave()) { return; } KUrl url = KFileDialog::getOpenUrl(KUrl(), i18n("*.layout|Board Layout (*.layout)\n*|All File" "s"), this, i18n("Open Board Layout")); if (url.isEmpty()) { return; } theBoard.loadBoardLayout(url.path()); update(); }
void Editor::newBoard() { // Clear out the contents of the board. Repaint the screen // set values to their defaults. if (!testSave()) { return; } theBoard.clearBoardLayout(); clean = true; numTiles = 0; statusChanged(); update(); }
void Editor::closeEvent(QCloseEvent *e) { if (testSave()) { theBoard.clearBoardLayout(); clean = true; numTiles = 0; statusChanged(); update(); // Save the window geometry. Prefs::setEditorGeometry(geometry()); Prefs::self()->writeConfig(); e->accept(); } else { e->ignore(); } }
void Editor::loadBoard() { if ( !testSave() ) return; KURL url = KFileDialog::getOpenURL( NULL, i18n("*.layout|Board Layout (*.layout)\n" "*|All Files"), this, i18n("Open Board Layout" )); if ( url.isEmpty() ) return; theBoard.loadBoardLayout( url.path() ); repaint(false); }
int main(int argc, char* argv[]) { // initialize TlCommunicate& rComm = TlCommunicate::getInstance(argc, argv); // =================================================================== // testConstructer(); // testCopyConstructer(); // testCopyConstructer2(); // testSet(); // testOperatorPlusEqual(); // testOperatorMultiEqual(); // testMulti1(); // testMulti2(); testSave(); testLoad(); // testInverse(); // testInverse2(); // testDiagonal(); // =================================================================== // finalize rComm.finalize(); return EXIT_SUCCESS; }