diff options
author | kintel <kintel@b57f626f-c46c-0410-a088-ec61d464b74c> | 2010-01-25 21:39:34 (GMT) |
---|---|---|
committer | kintel <kintel@b57f626f-c46c-0410-a088-ec61d464b74c> | 2010-01-25 21:39:34 (GMT) |
commit | 75f16903a09a80ad9a22ccb7d0b90591b7b780a2 (patch) | |
tree | 79ecc7ac5189bc3608947b0cd2d9d1697ec42d3c | |
parent | b629bd329247aa47b99afa6c6f9a2a28803af09b (diff) |
Quit now really quits instead of just closing the current document, also fixes dangling dialog problem
git-svn-id: http://svn.clifford.at/openscad/trunk@353 b57f626f-c46c-0410-a088-ec61d464b74c
-rw-r--r-- | MainWindow.h | 1 | ||||
-rw-r--r-- | MainWindow.ui | 16 | ||||
-rw-r--r-- | TODO.txt | 10 | ||||
-rw-r--r-- | mainwin.cc | 8 |
4 files changed, 13 insertions, 22 deletions
diff --git a/MainWindow.h b/MainWindow.h index 17269ae..bb1bdc4 100644 --- a/MainWindow.h +++ b/MainWindow.h @@ -136,6 +136,7 @@ public slots: void dropEvent(QDropEvent *event); void helpAbout(); void helpManual(); + void quit(); }; #endif diff --git a/MainWindow.ui b/MainWindow.ui index 2569c04..656e908 100644 --- a/MainWindow.ui +++ b/MainWindow.ui @@ -656,22 +656,6 @@ </resources> <connections> <connection> - <sender>fileActionQuit</sender> - <signal>triggered()</signal> - <receiver>MainWindow</receiver> - <slot>close()</slot> - <hints> - <hint type="sourcelabel"> - <x>-1</x> - <y>-1</y> - </hint> - <hint type="destinationlabel"> - <x>340</x> - <y>323</y> - </hint> - </hints> - </connection> - <connection> <sender>fileActionClose</sender> <signal>triggered()</signal> <receiver>MainWindow</receiver> @@ -19,16 +19,12 @@ o Preferences - Default language feature settings - Auto-view CSG/thrown together on load o Export etc.: automatically add missing extension as in SaveAs -o Mac OS X: - - universal binary -> fix cgal and opencsg o MDI - Think about how to do MDI the right way - - Quit vs. Close MainWindow. - Today Quit just closes the current window and there is no close function - Ctrl-W should close the current dialog, not the current main window -> implement as for Preferences? - Menu bar handling: - Mac: share menubar among all top-level windows + Mac: share menubar among all top-level windows? o 3D View - Improve mouse rotation - Add modifier key combos to handle pan on 1 mouse button systems @@ -50,7 +46,6 @@ o Editor - Couple the source code to the AST to allow highlighting selected elements in the source code in the 3D view o Misc - - Fix current_win hack - Reload and compile: Ask for confirmation if file is locally edited (make this configurable in preferences?) - Save: Ask for confirmation if file has been externaly changed @@ -100,6 +95,7 @@ CODE ---- o Refactor from MainWindow: + - Fix current_win hack - CSG data structure (compiled model) - CGAL data structure (compiled model) o C++-ify @@ -121,4 +117,6 @@ MISC ---- o Collect "all" available OpenSCAD scripts from the internets and batch convert them to STL to assist with robustness testing. +o Mac OS X: + - universal binary -> fix cgal and opencsg @@ -158,6 +158,7 @@ MainWindow::MainWindow(const char *filename) connect(this->fileActionSave, SIGNAL(triggered()), this, SLOT(actionSave())); connect(this->fileActionSaveAs, SIGNAL(triggered()), this, SLOT(actionSaveAs())); connect(this->fileActionReload, SIGNAL(triggered()), this, SLOT(actionReload())); + connect(this->fileActionQuit, SIGNAL(triggered()), this, SLOT(quit())); #ifndef __APPLE__ this->fileActionSave->setShortcut(QKeySequence(Qt::Key_F2)); this->fileActionReload->setShortcut(QKeySequence(Qt::Key_F3)); @@ -1790,3 +1791,10 @@ void MainWindow::setFont(const QString &family, uint size) font.setStyleHint(QFont::TypeWriter); editor->setFont(font); } + +void MainWindow::quit() +{ + QCloseEvent ev; + QApplication::sendEvent(QApplication::instance(), &ev); + if (ev.isAccepted()) QApplication::instance()->quit(); +} |