From d59e817381285fe03bad310de9789651e0663028 Mon Sep 17 00:00:00 2001 From: clifford Date: Sun, 20 Dec 2009 12:48:32 +0000 Subject: James Vasile: Hide/show editor and console git-svn-id: http://svn.clifford.at/openscad/trunk@183 b57f626f-c46c-0410-a088-ec61d464b74c diff --git a/MainWindow.h b/MainWindow.h index f1539f0..3c45658 100644 --- a/MainWindow.h +++ b/MainWindow.h @@ -77,6 +77,7 @@ private slots: void editUncomment(); void pasteViewportTranslation(); void pasteViewportRotation(); + void hideEditor(); private slots: void actionReloadCompile(); @@ -117,6 +118,7 @@ public slots: void viewCenter(); void viewPerspective(); void viewOrthogonal(); + void hideConsole(); void animateUpdateDocChanged(); void animateUpdate(); void dragEnterEvent(QDragEnterEvent *event); diff --git a/MainWindow.ui b/MainWindow.ui index d1fd76c..6eda078 100644 --- a/MainWindow.ui +++ b/MainWindow.ui @@ -98,7 +98,7 @@ 0 0 681 - 22 + 25 @@ -179,6 +179,9 @@ + + + @@ -340,6 +343,14 @@ Ctrl+- + + + true + + + Hide editor + + &Reload and Compile @@ -554,6 +565,14 @@ Orthogonal + + + true + + + Hide console + + About diff --git a/TODO.txt b/TODO.txt index a24bfe4..0db553f 100644 --- a/TODO.txt +++ b/TODO.txt @@ -3,6 +3,7 @@ BUGS ---- o On Linux, large files load veery slowly o Some invalid DXF data gets pass the import checks and breaks the tessing code +o Broken polyhedron() entities are not correctly detected and cause CGAL segfaults USER iNTERFACE -------------- @@ -13,8 +14,6 @@ o Preferences - OpenGL params - Default language feature settings o External editor -o Hide/show editor -o hide/show log widget o Mac OS X: - embed examples into bundle -> separate example menu? - Use examples as default File Open folder diff --git a/mainwin.cc b/mainwin.cc index 6649858..f024221 100644 --- a/mainwin.cc +++ b/mainwin.cc @@ -177,6 +177,7 @@ MainWindow::MainWindow(const char *filename) connect(this->editActionPasteVPR, SIGNAL(triggered()), this, SLOT(pasteViewportRotation())); connect(this->editActionZoomIn, SIGNAL(triggered()), editor, SLOT(zoomIn())); connect(this->editActionZoomOut, SIGNAL(triggered()), editor, SLOT(zoomOut())); + connect(this->editActionHide, SIGNAL(triggered()), this, SLOT(hideEditor())); // Design menu connect(this->designActionReloadAndCompile, SIGNAL(triggered()), this, SLOT(actionReloadCompile())); @@ -224,6 +225,7 @@ MainWindow::MainWindow(const char *filename) connect(this->viewActionCenter, SIGNAL(triggered()), this, SLOT(viewCenter())); connect(this->viewActionPerspective, SIGNAL(triggered()), this, SLOT(viewPerspective())); connect(this->viewActionOrthogonal, SIGNAL(triggered()), this, SLOT(viewOrthogonal())); + connect(this->viewActionHide, SIGNAL(triggered()), this, SLOT(hideConsole())); // #ifdef ENABLE_CGAL // viewActionCGALSurface = menu->addAction("CGAL Surfaces", this, SLOT(viewModeCGALSurface()), QKeySequence(Qt::Key_F10)); @@ -790,6 +792,15 @@ void MainWindow::editUncomment() editor->setTextCursor(cursor); } +void MainWindow::hideEditor() +{ + if (editActionHide->isChecked()) { + editor->hide(); + } else { + editor->show(); + } +} + void MainWindow::pasteViewportTranslation() { QTextCursor cursor = editor->textCursor(); @@ -1421,6 +1432,15 @@ void MainWindow::viewOrthogonal() screen->updateGL(); } +void MainWindow::hideConsole() +{ + if (viewActionHide->isChecked()) { + console->hide(); + } else { + console->show(); + } +} + void MainWindow::dragEnterEvent(QDragEnterEvent *event) { if (event->mimeData()->hasUrls()) -- cgit v0.10.1