From 37b4b17b3f65f401286f3122fc0fb86a8a9d737e Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Fri, 17 Oct 2008 14:35:00 +0000 Subject: [PATCH] Modification of the UI: widgets are now dockable. --- .../Surface_mesher/qt4-demo/mainwindow.cpp | 4 +- .../Surface_mesher/qt4-demo/ui/mainwindow.ui | 342 ++++++++++-------- .../demo/Surface_mesher/qt4-demo/viewer.cpp | 2 +- 3 files changed, 198 insertions(+), 150 deletions(-) diff --git a/Surface_mesher/demo/Surface_mesher/qt4-demo/mainwindow.cpp b/Surface_mesher/demo/Surface_mesher/qt4-demo/mainwindow.cpp index 0dd11727c48..ecaabd3303a 100644 --- a/Surface_mesher/demo/Surface_mesher/qt4-demo/mainwindow.cpp +++ b/Surface_mesher/demo/Surface_mesher/qt4-demo/mainwindow.cpp @@ -42,8 +42,6 @@ MainWindow::MainWindow(MainWindow* other_window /* = 0 */) : this, SLOT(close())); } - show_only(""); - this->addAboutCGAL(); this->addRecentFiles(this->menu_File, this->action_Quit); @@ -51,6 +49,8 @@ MainWindow::MainWindow(MainWindow* other_window /* = 0 */) : this, SLOT(surface_open(QString))); this->readState(); + + show_only(""); } void MainWindow::dragEnterEvent(QDragEnterEvent *event) diff --git a/Surface_mesher/demo/Surface_mesher/qt4-demo/ui/mainwindow.ui b/Surface_mesher/demo/Surface_mesher/qt4-demo/ui/mainwindow.ui index 973fa549a42..c9168f6be9d 100644 --- a/Surface_mesher/demo/Surface_mesher/qt4-demo/ui/mainwindow.ui +++ b/Surface_mesher/demo/Surface_mesher/qt4-demo/ui/mainwindow.ui @@ -5,8 +5,8 @@ 0 0 - 1100 - 595 + 1147 + 648 @@ -16,153 +16,19 @@ :/icons/cgal_logo.xpm:/icons/cgal_logo.xpm + + true + - + - - - Qt::Horizontal + + + + 1 + 0 + - - - - 1 - 0 - - - - - - - - - - 0 - 0 - - - - Image type - - - - volume - - - - - - - - 0 - 0 - - - - Grayscale image - - - true - - - - - - - - 0 - 0 - - - - Segmented image - - - - - - - - - - - 0 - 0 - - - - Criteria - - - - volume - - - - - - - Manifold - - - - - - - Facets vertices have same index - - - - - - - - - &Sizing bound: - - - spinBox_radius_bound - - - - - - - - - - &Distance bound: - - - spinBox_distance_bound - - - - - - - - - - - - - - - - 0 - 1 - - - - - volume - - - - - - @@ -172,7 +38,7 @@ 0 0 - 1100 + 1147 29 @@ -264,6 +130,188 @@ + + + Qt::LeftDockWidgetArea|Qt::RightDockWidgetArea + + + Images options + + + + volume + + + + 1 + + + + + + + + + + 0 + 0 + + + + &Image type + + + + volume + + + + + + + + 0 + 0 + + + + Grayscale image + + + true + + + + + + + + 0 + 0 + + + + Segmented image + + + + + + + + + + + 0 + 0 + + + + &Criteria + + + + volume + + + + + + + Manifold + + + + + + + Facets vertices have same index + + + + + + + + + &Sizing bound: + + + spinBox_radius_bound + + + + + + + + + + &Distance bound: + + + spinBox_distance_bound + + + + + + + + + + + + + + + + + Qt::Vertical + + + + 20 + 0 + + + + + + + + + + Image sub-domaines + + + + volume + + + + 1 + + + + + + + + 0 + 2 + + + + + volume + + + + + + + diff --git a/Surface_mesher/demo/Surface_mesher/qt4-demo/viewer.cpp b/Surface_mesher/demo/Surface_mesher/qt4-demo/viewer.cpp index 4d600aa1b73..39ba1204228 100644 --- a/Surface_mesher/demo/Surface_mesher/qt4-demo/viewer.cpp +++ b/Surface_mesher/demo/Surface_mesher/qt4-demo/viewer.cpp @@ -32,7 +32,7 @@ QString Viewer::helpString() const void Viewer::interpolateToFitBoundingBox(double xmin, double ymin, double zmin, double xmax, double ymax, double zmax) { - QAction* auto_resize = parent()->parent()->parent()->findChild("actionAuto_resize"); + QAction* auto_resize = parent()->parent()->findChild("actionAuto_resize"); Q_ASSERT_X(auto_resize, "Viewer::interpolateToFitBoundingBox", "cannot find action \"actionAuto_resize\""); if(auto_resize && auto_resize->isChecked()) {