From eb4f860f3bc2e8d053571622abfe3c2ac5eb111f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Mon, 5 Oct 2015 14:55:36 +0200 Subject: [PATCH] remove mentions of Qt3 --- .gitignore | 1 - Installation/CMakeLists.txt | 3 +- Installation/INSTALL.md | 3 - .../auxiliary/cgal_create_cmake_script.1 | 2 +- .../cmake/modules/CGALConfig_binary.cmake.in | 9 - .../cmake/modules/CGALConfig_install.cmake.in | 8 - Installation/cmake/modules/CGAL_Macros.cmake | 11 +- .../modules/CGAL_SetupDependencies.cmake | 2 +- Installation/include/CGAL/auto_link/CGALQt3.h | 32 --- Installation/src/CMakeLists.txt | 7 +- Installation/test/Installation/CMakeLists.txt | 6 +- .../test/Installation/link_to_CGAL_Qt3.cpp | 11 - Mesh_2/demo/Mesh_2/CMakeLists.txt | 2 - Mesh_2/demo/Mesh_2/README.txt | 4 +- Nef_S2/src/CGAL_Qt3/Nef_S2.qtmoc.cmake | 5 - Nef_S2/src/CGAL_Qt3/Qt_widget_OpenGL.cpp | 252 ------------------ .../cgal_generate_cmake_script.cmake | 89 +------ Scripts/scripts/cgal_create_CMakeLists | 108 +------- Scripts/scripts/cgal_create_cmake_script | 75 +----- .../test/collect_cgal_testresults_from_cmake | 4 +- 20 files changed, 16 insertions(+), 618 deletions(-) delete mode 100644 Installation/include/CGAL/auto_link/CGALQt3.h delete mode 100644 Installation/test/Installation/link_to_CGAL_Qt3.cpp delete mode 100644 Nef_S2/src/CGAL_Qt3/Nef_S2.qtmoc.cmake delete mode 100644 Nef_S2/src/CGAL_Qt3/Qt_widget_OpenGL.cpp diff --git a/.gitignore b/.gitignore index 552f773d125..a49a0cdf701 100644 --- a/.gitignore +++ b/.gitignore @@ -753,7 +753,6 @@ QP_solver/documentation/UpdateZ.log QP_solver/documentation/UpdateZ.pdf QP_solver/documentation/UpdateZ.synctex.gz Qt_widget/.env -Qt_widget/src/CGAL_Qt3/*.moc Qt_widget/test/Qt_widget/test_qt_version Random_numbers/*.aux Random_numbers/*.bbl diff --git a/Installation/CMakeLists.txt b/Installation/CMakeLists.txt index f489f95477d..845622f9c33 100644 --- a/Installation/CMakeLists.txt +++ b/Installation/CMakeLists.txt @@ -374,7 +374,6 @@ if ( RUNNING_CGAL_AUTO_TEST ) CGAL_MAINTENANCE_PACKAGE_DIR CGAL_PDB_BINARY_DIR CGAL_PDB_SOURCE_DIR - CGAL_Qt3_SOURCE_DIR CGAL_BINARY_DIR CGAL_SOURCE_DIR) # message("List of cache variables:") @@ -524,7 +523,7 @@ message("== Detect external libraries ==") # this is the place to tell which external libs are supporting # Remarks: -# External libs Qt3 and Qt34are configured when Qt3 or Qt5 as lib of cgal are required +# External libs configured when Qt5 lib of cgal are required # Coin is used in KDS, but no FindCoin or FindCOIN exists # There exists FindF2C, FindIPE, FindMKL, but they are only used to support supporting libs list (INSERT CGAL_SUPPORTING_3RD_PARTY_LIBRARIES 0 GMP MPFR ZLIB OpenGL LEDA MPFI RS RS3 OpenNL Eigen3 BLAS LAPACK QGLViewer ESBTL Coin3D NTL IPE) diff --git a/Installation/INSTALL.md b/Installation/INSTALL.md index cc9ae038683..11fa35c4300 100644 --- a/Installation/INSTALL.md +++ b/Installation/INSTALL.md @@ -60,9 +60,6 @@ CGAL packages, some are only needed for demos. * Visualization Required for most demos - - Qt3 (>= 3.3) - ftp://ftp.qt.nokia.com/qt/source/ - - Qt5 (>= 5.3) http://qt-project.org/ diff --git a/Installation/auxiliary/cgal_create_cmake_script.1 b/Installation/auxiliary/cgal_create_cmake_script.1 index 862e1195240..d06bc44e003 100644 --- a/Installation/auxiliary/cgal_create_cmake_script.1 +++ b/Installation/auxiliary/cgal_create_cmake_script.1 @@ -24,7 +24,7 @@ file in the current directory containing a function is compiled and linked as a separate executable. .TP .B demo -Create a cmake script for a single application including Qt3 support. All +Create a cmake script for a single application. All .I C and .IR cpp diff --git a/Installation/cmake/modules/CGALConfig_binary.cmake.in b/Installation/cmake/modules/CGALConfig_binary.cmake.in index 70c6c304956..019084ac316 100644 --- a/Installation/cmake/modules/CGALConfig_binary.cmake.in +++ b/Installation/cmake/modules/CGALConfig_binary.cmake.in @@ -29,13 +29,11 @@ if(NOT POLICY CMP0024 OR NOT CGAL_BUILDING_LIBS) CGAL_get_property_optional(CGAL_LIBRARY CGAL::CGAL LOCATION) CGAL_get_property_optional(CGAL_Core_LIBRARY CGAL::CGAL_Core LOCATION) CGAL_get_property_optional(CGAL_ImageIO_LIBRARY CGAL::CGAL_ImageIO LOCATION) - CGAL_get_property_optional(CGAL_Qt3_LIBRARY CGAL::CGAL_Qt3 LOCATION) CGAL_get_property_optional(CGAL_Qt5_LIBRARY CGAL::CGAL_Qt5 LOCATION) else() set(CGAL_LIBRARY "") set(CGAL_Core_LIBRARY "") set(CGAL_ImageIO_LIBRARY "") - set(CGAL_Qt3_LIBRARY "") set(CGAL_Qt5_LIBRARY "") endif() else() @@ -56,7 +54,6 @@ else() CGAL_alias_library(CGAL) CGAL_alias_library(CGAL_Core) CGAL_alias_library(CGAL_ImageIO) - CGAL_alias_library(CGAL_Qt3) CGAL_alias_library(CGAL_Qt5) endif() @@ -90,7 +87,6 @@ set(CGAL_LIBRARIES_DIR "@CGAL_LIBRARIES_DIR@" ) set(WITH_CGAL "ON" ) set(WITH_CGAL_Core "@WITH_CGAL_Core@" ) set(WITH_CGAL_ImageIO "@WITH_CGAL_ImageIO@" ) -set(WITH_CGAL_Qt3 "@WITH_CGAL_Qt3@" ) set(WITH_CGAL_Qt5 "@WITH_CGAL_Qt5@" ) set(CGAL_3RD_PARTY_INCLUDE_DIRS "@CGAL_3RD_PARTY_INCLUDE_DIRS@" ) @@ -109,11 +105,6 @@ set(CGAL_ImageIO_3RD_PARTY_LIBRARIES_DIRS "@CGAL_ImageIO_3RD_PARTY_LIBRARIES_DIR set(CGAL_ImageIO_3RD_PARTY_LIBRARIES "@CGAL_ImageIO_3RD_PARTY_LIBRARIES@" ) set(CGAL_ImageIO_USE_ZLIB "@CGAL_ImageIO_USE_ZLIB@" ) -set(CGAL_Qt3_3RD_PARTY_INCLUDE_DIRS "@CGAL_Qt3_3RD_PARTY_INCLUDE_DIRS@" ) -set(CGAL_Qt3_3RD_PARTY_DEFINITIONS "@CGAL_Qt3_3RD_PARTY_DEFINITIONS@" ) -set(CGAL_Qt3_3RD_PARTY_LIBRARIES_DIRS "@CGAL_Qt3_3RD_PARTY_LIBRARIES_DIRS@" ) -set(CGAL_Qt3_3RD_PARTY_LIBRARIES "@CGAL_Qt3_3RD_PARTY_LIBRARIES@" ) - set(CGAL_Qt5_3RD_PARTY_INCLUDE_DIRS "@CGAL_Qt5_3RD_PARTY_INCLUDE_DIRS@" ) set(CGAL_Qt5_3RD_PARTY_DEFINITIONS "@CGAL_Qt5_3RD_PARTY_DEFINITIONS@" ) set(CGAL_Qt5_3RD_PARTY_LIBRARIES_DIRS "@CGAL_Qt5_3RD_PARTY_LIBRARIES_DIRS@" ) diff --git a/Installation/cmake/modules/CGALConfig_install.cmake.in b/Installation/cmake/modules/CGALConfig_install.cmake.in index f54cb7e8a41..d56398d2bdb 100644 --- a/Installation/cmake/modules/CGALConfig_install.cmake.in +++ b/Installation/cmake/modules/CGALConfig_install.cmake.in @@ -41,7 +41,6 @@ set(CGAL_LIBRARIES_DIR "@CMAKE_INSTALL_PREFIX@/@CGAL_INSTALL_LIB_DIR@" ) set(WITH_CGAL "ON" ) set(WITH_CGAL_Core "@WITH_CGAL_Core@" ) set(WITH_CGAL_ImageIO "@WITH_CGAL_ImageIO@" ) -set(WITH_CGAL_Qt3 "@WITH_CGAL_Qt3@" ) set(WITH_CGAL_Qt5 "@WITH_CGAL_Qt5@" ) macro(CGAL_get_property_optional VAR TARGET PROPERTY) @@ -56,13 +55,11 @@ if(NOT MSVC) CGAL_get_property_optional(CGAL_LIBRARY CGAL::CGAL LOCATION) CGAL_get_property_optional(CGAL_Core_LIBRARY CGAL::CGAL_Core LOCATION) CGAL_get_property_optional(CGAL_ImageIO_LIBRARY CGAL::CGAL_ImageIO LOCATION) - CGAL_get_property_optional(CGAL_Qt3_LIBRARY CGAL::CGAL_Qt3 LOCATION) CGAL_get_property_optional(CGAL_Qt5_LIBRARY CGAL::CGAL_Qt5 LOCATION) else() set(CGAL_LIBRARY "") set(CGAL_Core_LIBRARY "") set(CGAL_ImageIO_LIBRARY "") - set(CGAL_Qt3_LIBRARY "") set(CGAL_Qt5_LIBRARY "") endif() @@ -82,11 +79,6 @@ set(CGAL_ImageIO_3RD_PARTY_LIBRARIES_DIRS "@CGAL_ImageIO_3RD_PARTY_LIBRARIES_DIR set(CGAL_ImageIO_3RD_PARTY_LIBRARIES "@CGAL_ImageIO_3RD_PARTY_LIBRARIES@" ) set(CGAL_ImageIO_USE_ZLIB "@CGAL_ImageIO_USE_ZLIB@" ) -set(CGAL_Qt3_3RD_PARTY_INCLUDE_DIRS "@CGAL_Qt3_3RD_PARTY_INCLUDE_DIRS@" ) -set(CGAL_Qt3_3RD_PARTY_DEFINITIONS "@CGAL_Qt3_3RD_PARTY_DEFINITIONS@" ) -set(CGAL_Qt3_3RD_PARTY_LIBRARIES_DIRS "@CGAL_Qt3_3RD_PARTY_LIBRARIES_DIRS@" ) -set(CGAL_Qt3_3RD_PARTY_LIBRARIES "@CGAL_Qt3_3RD_PARTY_LIBRARIES@" ) - set(CGAL_Qt5_3RD_PARTY_INCLUDE_DIRS "@CGAL_Qt5_3RD_PARTY_INCLUDE_DIRS@" ) set(CGAL_Qt5_3RD_PARTY_DEFINITIONS "@CGAL_Qt5_3RD_PARTY_DEFINITIONS@" ) set(CGAL_Qt5_3RD_PARTY_LIBRARIES_DIRS "@CGAL_Qt5_3RD_PARTY_LIBRARIES_DIRS@" ) diff --git a/Installation/cmake/modules/CGAL_Macros.cmake b/Installation/cmake/modules/CGAL_Macros.cmake index 2400480c77b..28c810eb5a8 100644 --- a/Installation/cmake/modules/CGAL_Macros.cmake +++ b/Installation/cmake/modules/CGAL_Macros.cmake @@ -222,7 +222,7 @@ if( NOT CGAL_MACROS_FILE_INCLUDED ) message (STATUS "Configured ${lib} from UseLIB-file: ${usefile}") # UseLIB-file has to set ${vlib}_SETUP to TRUE - # TODO EBEB what about Qt5, Qt3, zlib? + # TODO EBEB what about Qt5, zlib? else() @@ -286,11 +286,6 @@ if( NOT CGAL_MACROS_FILE_INCLUDED ) find_package( ZLIB QUIET ) endif() - if (${component} STREQUAL "Qt3") - find_package( OpenGL QUIET ) - find_package( Qt3-patched QUIET ) - endif() - if (${component} STREQUAL "Qt5") find_package( OpenGL QUIET ) find_package( Qt5 QUIET COMPONENTS OpenGL Svg ) @@ -337,10 +332,6 @@ if( NOT CGAL_MACROS_FILE_INCLUDED ) find_package( ZLIB ) endif() - if (${component} STREQUAL "Qt3") - find_package( OpenGL ) - find_package( Qt3-patched ) - endif() if (${component} STREQUAL "Qt5") set(CGAL_${component}_FOUND TRUE) find_package( OpenGL ) diff --git a/Installation/cmake/modules/CGAL_SetupDependencies.cmake b/Installation/cmake/modules/CGAL_SetupDependencies.cmake index f15626f2a70..6575cdf542d 100644 --- a/Installation/cmake/modules/CGAL_SetupDependencies.cmake +++ b/Installation/cmake/modules/CGAL_SetupDependencies.cmake @@ -38,7 +38,7 @@ foreach (lib ${CGAL_SUPPORTING_3RD_PARTY_LIBRARIES}) use_lib( ${vlib} ${${vlib}_USE_FILE}) endif() - # TODO EBEB what about Qt3, Qt5, zlib etc? + # TODO EBEB what about Qt5, zlib etc? set ( CGAL_USE_${vlib} TRUE ) diff --git a/Installation/include/CGAL/auto_link/CGALQt3.h b/Installation/include/CGAL/auto_link/CGALQt3.h deleted file mode 100644 index 59bdaec42b1..00000000000 --- a/Installation/include/CGAL/auto_link/CGALQt3.h +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2007 GeometryFactory (France). All rights reserved. -// -// This file is part of CGAL (www.cgal.org); you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public License as -// published by the Free Software Foundation; either version 3 of the License, -// or (at your option) any later version. -// -// Licensees holding a valid commercial license may use this file in -// accordance with the commercial license agreement provided with the software. -// -// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -// -// $URL$ -// $Id$ -// -// -// Author(s) : Fernando Cacciola (fernando.cacciola@geometryfactry.com) - -#ifndef CGAL_AUTO_LINK_CGALQT_H -#define CGAL_AUTO_LINK_CGALQT_H - -#include - -#ifndef CGAL_NO_AUTOLINK_CGALQT - -#define CGAL_LIB_NAME CGAL_Qt3 -#include - -#endif // CGAL_NO_AUTOLINK_CGALQT - -#endif // CGAL_AUTO_LINK_CGALQT_H diff --git a/Installation/src/CMakeLists.txt b/Installation/src/CMakeLists.txt index 28bae5ecaf6..71560ede761 100644 --- a/Installation/src/CMakeLists.txt +++ b/Installation/src/CMakeLists.txt @@ -69,11 +69,7 @@ function (collect_cgal_library LIBRARY_NAME ADDITIONAL_FILES) endfunction() function( configure_component DIR COMPONENT ) - if(${COMPONENT} STREQUAL "CGAL_Qt3") - set(enabled_by_default OFF) - else() - set(enabled_by_default ON) - endif() + set(enabled_by_default ON) option( WITH_${COMPONENT} "Enable CGAL component ${COMPONENT}" ${enabled_by_default}) if ( WITH_${COMPONENT}) add_subdirectory( ${DIR} ${COMPONENT} ) @@ -178,7 +174,6 @@ endmacro() CGAL_add_if_target(CGAL) CGAL_add_if_target(CGAL_Core) CGAL_add_if_target(CGAL_ImageIO) -CGAL_add_if_target(CGAL_Qt3) CGAL_add_if_target(CGAL_Qt5) export(TARGETS ${CGAL_ACTUAL_CONFIGURED_LIBRARIES} NAMESPACE CGAL:: FILE "${CMAKE_BINARY_DIR}/CGALExports.cmake") diff --git a/Installation/test/Installation/CMakeLists.txt b/Installation/test/Installation/CMakeLists.txt index b3cfaa73b75..5ebf10e8763 100644 --- a/Installation/test/Installation/CMakeLists.txt +++ b/Installation/test/Installation/CMakeLists.txt @@ -56,11 +56,7 @@ if ( CGAL_FOUND ) if ( WITH_CGAL_ImageIO ) create_link_to_program(CGAL_ImageIO) endif() - - if ( WITH_CGAL_Qt3 ) - create_link_to_program(CGAL_Qt3) - endif() - + if ( WITH_CGAL_Qt4 ) find_package(Qt4 QUIET) if( QT4_FOUND ) diff --git a/Installation/test/Installation/link_to_CGAL_Qt3.cpp b/Installation/test/Installation/link_to_CGAL_Qt3.cpp deleted file mode 100644 index 5d38e57f62e..00000000000 --- a/Installation/test/Installation/link_to_CGAL_Qt3.cpp +++ /dev/null @@ -1,11 +0,0 @@ -// Use something defined not in headers but in the CGAL library to test that is was indeed properly built and linked to, - -#include -#include - -int main() -{ - volatile const char * xpm = alpha_shape_xpm[0] ; - - return (xpm != 0) ? 0 : 1 ; -} diff --git a/Mesh_2/demo/Mesh_2/CMakeLists.txt b/Mesh_2/demo/Mesh_2/CMakeLists.txt index 2b34c25097f..fed9dbbc4f0 100644 --- a/Mesh_2/demo/Mesh_2/CMakeLists.txt +++ b/Mesh_2/demo/Mesh_2/CMakeLists.txt @@ -7,8 +7,6 @@ cmake_minimum_required(VERSION 2.8.11) if(POLICY CMP0043) cmake_policy(SET CMP0043 OLD) endif() - -add_subdirectory(Qt3) find_package(CGAL COMPONENTS Core ) include( ${CGAL_USE_FILE} ) diff --git a/Mesh_2/demo/Mesh_2/README.txt b/Mesh_2/demo/Mesh_2/README.txt index 96596b0fef1..efef749b3b8 100644 --- a/Mesh_2/demo/Mesh_2/README.txt +++ b/Mesh_2/demo/Mesh_2/README.txt @@ -1,5 +1,5 @@ This directory contains non-graphical demos of the 2D Mesh Generator -package. An old Qt3-based demos lies in the qt3/ sub-directory. The -Constrained Delaunay triangulation Qt5 demos has a 2D meshing feature that +package. +The Constrained Delaunay triangulation Qt5 demos has a 2D meshing feature that demonstrates the 2D Mesh Generator package. See in the directory demo/Triangulation_2/ of the CGAL tarball. diff --git a/Nef_S2/src/CGAL_Qt3/Nef_S2.qtmoc.cmake b/Nef_S2/src/CGAL_Qt3/Nef_S2.qtmoc.cmake deleted file mode 100644 index 8ace4e8c44b..00000000000 --- a/Nef_S2/src/CGAL_Qt3/Nef_S2.qtmoc.cmake +++ /dev/null @@ -1,5 +0,0 @@ -QT3_GENERATE_MOC(${package}/include/CGAL/IO/Qt_widget_OpenGL.h - ${CMAKE_CURRENT_BINARY_DIR}/Qt_widget_OpenGL.moc - ) - -set(CGAL_Qt3_MOC_FILES ${CGAL_Qt3_MOC_FILES} Qt_widget_OpenGL.moc) diff --git a/Nef_S2/src/CGAL_Qt3/Qt_widget_OpenGL.cpp b/Nef_S2/src/CGAL_Qt3/Qt_widget_OpenGL.cpp deleted file mode 100644 index 1d8dc22e817..00000000000 --- a/Nef_S2/src/CGAL_Qt3/Qt_widget_OpenGL.cpp +++ /dev/null @@ -1,252 +0,0 @@ -// Copyright (c) 1999 Max-Planck-Institute Saarbruecken (Germany). -// All rights reserved. -// -// This file is part of CGAL (www.cgal.org); you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public License as -// published by the Free Software Foundation; either version 3 of the License, -// or (at your option) any later version. -// -// Licensees holding a valid commercial license may use this file in -// accordance with the commercial license agreement provided with the software. -// -// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -// -// $URL$ -// $Id$ -// -// -// Author(s) : Michael Seel -// Peter Hachenberger - -#include - -#include -#include - -namespace CGAL { - -Qt_widget_OpenGL::Qt_widget_OpenGL(int width, int height, double scale) : - window_width(width), - window_height(height), - motion_mode(ROTATE), - dx(0), - dy(0), - dz(0), - s(scale), - init_s(scale), - rotation(CGAL::IDENTITY){} - -CGAL::OGL::OGL_base_object::Affine_3 -Qt_widget_OpenGL::virtual_sphere_transformation( double old_x, double old_y, - double new_x, double new_y) { - - if ( old_x == new_x && old_y == new_y)// zero rotation. - return Affine_3( CGAL::IDENTITY); - // Determine the projected vectors on the `sphere'. - double dd = old_x * old_x + old_y * old_y; - Double_vector v_old( old_x, old_y, - ((dd < 0.5) ? std::sqrt(1-dd) : 0.5 / std::sqrt(dd))); - dd = new_x * new_x + new_y * new_y; - Double_vector v_new( new_x, new_y, - ((dd < 0.5) ? std::sqrt(1-dd) : 0.5 / std::sqrt(dd))); - Double_vector axis = cross_product( v_old, v_new); - double angle = 0.0; - double norm = std::sqrt( (v_old*v_old)*(v_new*v_new)); - if ( norm != 0) { - double x = v_old*v_new/ norm; - if ( x <= -1) - angle = CGAL_PI; - if ( x < 1) - angle = std::acos(x); - } - double len = std::sqrt( double(axis * axis)); - double s = std::sin( angle / 2.0) / len; - double q1 = axis.x() * s; // quaternion - double q2 = axis.y() * s; - double q3 = axis.z() * s; - double q0 = std::cos( angle / 2.0); - double a = q1 * q2; - double b = q0 * q3; - double c = q1 * q3; - double d = q0 * q2; - double e = q2 * q3; - double f = q0 * q1; - double qq0 = q0 * q0; - double qq1 = q1 * q1; - double qq2 = q2 * q2; - double qq3 = q3 * q3; - return Affine_3( qq0 + qq1 - qq2 - qq3, 2 * (a-b), 2 * (c+d), - 2 * (a+b), qq0 - qq1 + qq2 - qq3, 2 * (e-f), - 2 * (c-d), 2 * (e+f), qq0 - qq1 - qq2 + qq3); -} - -void Qt_widget_OpenGL::mouseMoveEvent(QMouseEvent* event) { - int x = event->x(); - int y = event->y(); - switch ( interaction) { - case SCALE: - s *= std::exp( (x - mouse_x + mouse_y -y) * factor_s ); - break; - case ROTATE: { - double old_x = 1.2 * (mouse_x - window_width/2) / window_radius; - double old_y = - 1.2 * (mouse_y - window_height/2) / window_radius; - double new_x = 1.2 * (x - window_width/2) / window_radius; - double new_y = - 1.2 * (y - window_height/2) / window_radius; - rotation = virtual_sphere_transformation( old_x, old_y, new_x, new_y) - * rotation; - } - break; - case TRANSLATE: - dx += (x - mouse_x) * 2.0 / window_radius; - dy -= (y - mouse_y) * 2.0 / window_radius; - break; - case TRANS_Z: - dz += (x - mouse_x + mouse_y -y) * 2.0 / window_radius; - break; - default: - break; - } - mouse_x = x; - mouse_y = y; - - updateGL(); -} - -void Qt_widget_OpenGL::mousePressEvent(QMouseEvent* event) { - mouse_x = event->x(); - mouse_y = event->y(); - interaction = 0; - if (event->stateAfter() & QMouseEvent::LeftButton) { - if (event->stateAfter() & QMouseEvent::ShiftButton) - interaction = SCALE; - else - interaction = motion_mode; - } - if(event->stateAfter() & QMouseEvent::MidButton) { - if (event->stateAfter() & QMouseEvent::ShiftButton) - interaction = TRANS_Z; - else - interaction = TRANSLATE; - } - if(event->stateAfter() & QMouseEvent::RightButton) - main->exec(QPoint(event->globalX(),event->globalY())); -} - -void Qt_widget_OpenGL::mouseReleaseEvent(QMouseEvent* event) { - mousePressEvent(event); -} - -void Qt_widget_OpenGL::paintGL() { - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); - glPushMatrix(); - glTranslated(dx,dy,dz); - // glTranslated(0,0,1); - GLdouble M[16] = { rotation.m(0,0), rotation.m(1,0), rotation.m(2,0), 0.0, - rotation.m(0,1), rotation.m(1,1), rotation.m(2,1), 0.0, - rotation.m(0,2), rotation.m(1,2), rotation.m(2,2), 0.0, - rotation.m(0,3), rotation.m(1,3), rotation.m(2,3), 1.0}; - glMultMatrixd( M); - glScaled(s,s,s); - object_->draw(); - glPopMatrix(); -} - -void Qt_widget_OpenGL::initializeGL() { - GLfloat mat_diffuse[4] = { 0.7f, 0.7f, 0.7f, 1.0f }; - GLfloat mat_specular[4] = { 1.0f, 1.0f, 1.0f, 1.0f }; - GLfloat mat_shininess[] = { 100.0f }; - GLfloat ambient_light[] = { 0.2f, 0.2f, 0.2f, 1.0f }; - - glLightModelfv(GL_LIGHT_MODEL_AMBIENT, ambient_light); - glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, mat_diffuse ); - glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, mat_specular ); - glMaterialfv(GL_FRONT_AND_BACK, GL_SHININESS, mat_shininess ); -#ifdef SCREENSHOTS - GLfloat mat_emission[] = { 0.1, 0.1, 0.2, 0.0 }; - glMaterialfv(GL_FRONT, GL_EMISSION, mat_emission); - //for screenshots enable this section -#endif - - GLfloat light0[4] = { 4.0, 4.0, 10.0, 1.0 }; - glLightfv (GL_LIGHT0, GL_POSITION, light0); - glEnable (GL_LIGHT0); - - glEnable(GL_DEPTH_TEST); - glEnable(GL_AUTO_NORMAL); - glEnable(GL_NORMALIZE); -} - -void Qt_widget_OpenGL::resizeGL(int width, int height) { - window_width = width; - window_height = height; - window_radius = (std::min)( width, height) / 2; - - glViewport(0, 0, (GLint)width, (GLint)height); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - - if (width>height) - { - long double w = (long double) width / (long double) height; - glOrtho( -2*w, 2*w, -w, w, -4.0, 4.0 ); - factor_d = 2.0 / (height/2.0); - // halbe Fensterhoehe soll 2 LE entsprechen - factor_w = 90.0 / (height/2.0); - // halbe Fensterhoehe soll 90 Grad entsprechen - factor_s = std::log(4.0) / (height/2.0); - // halbe Fensterhoehe soll Faktor 4 entsprechen - } - else - { - long double h = (long double) height / (long double) width; - glOrtho( -2.0, 2.0, -2*h, 2*h, -4.0, 4.0 ); - factor_d = 2.0 / (width/2.0); - // halbe Fensterbreite soll 2 LE entsprechen - factor_w = 90.0 / (width/2.0); - // halbe Fensterbreite soll 90 Grad entsprechen - factor_s = std::log(4.0) / (height/2.0); - // halbe Fensterhoehe soll Faktor 4 entsprechen - } - - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); -} - -void Qt_widget_OpenGL::slotControlMenu(int index) { - if(index == RESET_CONTROL) { - dx = dy = dz = 0.0; - s = init_s; - rotation = Affine_3(CGAL::IDENTITY); - motion_mode = ROTATE; - object_->init(); - updateGL(); - } else - motion_mode = index; -} - -void Qt_widget_OpenGL::slotRenderMenu(int index) { - object_->set_style(index); - updateGL(); -} - -void Qt_widget_OpenGL::slotOptionsMenu(int index) { - object_->toggle(index); - updateGL(); -} - -void Qt_widget_OpenGL::slotFullscreen() { - if(fullscreen) { - showNormal(); - } else { - showMaximized(); - } - fullscreen = !fullscreen; -} - -void Qt_widget_OpenGL::slotPerspective() { - perspective = !perspective; -} - -} // namespace CGAL -#include "Qt_widget_OpenGL.moc" diff --git a/Scripts/developer_scripts/cgal_generate_cmake_script.cmake b/Scripts/developer_scripts/cgal_generate_cmake_script.cmake index 0f870867754..b4e27ddbaf6 100644 --- a/Scripts/developer_scripts/cgal_generate_cmake_script.cmake +++ b/Scripts/developer_scripts/cgal_generate_cmake_script.cmake @@ -30,7 +30,6 @@ message(STATUS "Create CMakeLists.txt") set(PROJECT CGAL) #`basename $PWD` # TODO set value based on dir/source dir set(SINGLE_SOURCE "Polygon_2") list(INSERT CGAL_COMPONENTS 0 Qt4 CoRe gmP MPFR Rs rs3 MPFI) # TODO default value -set(WITH_QT3 FALSE) set(WITH_QT4 FALSE) set(WITH_ALL_PRECONFIGURED_LIBS FALSE) list(INSERT BOOST_COMPONENTS 0 thread) # TODO default value @@ -96,13 +95,11 @@ foreach( component ${CGAL_COMPONENTS}) #string(REGEX REPLACE "()" "" rewrote_component ${component}) #set(component ${rewrote_component}) - # CGAL: Core, Qt3, Qt4, PDB, ImageIO + # CGAL: Core, Qt4, PDB, ImageIO string(REGEX REPLACE "([c|C][o|O][r|R][e|E])" "Core" rewrote_component ${component}) set(component ${rewrote_component}) string(REGEX REPLACE "([i|I][m|M][a|A][g|G][e|E][i|I][o|O])" "ImageIO" rewrote_component ${component}) set(component ${rewrote_component}) - string(REGEX REPLACE "([q|Q][t|T]3)" "Qt3" rewrote_component ${component}) - set(component ${rewrote_component}) string(REGEX REPLACE "([q|Q][t|T]4)" "Qt4" rewrote_component ${component}) set(component ${rewrote_component}) @@ -146,10 +143,7 @@ foreach( component ${CGAL_COMPONENTS}) list(APPEND CGAL_REWROTE_COMPONENTS ${component}) - # detect qt3, qt4 - if ( ${component} STREQUAL "Qt3" ) - set(WITH_QT3 TRUE) - endif() + # detect qt4 if ( ${component} STREQUAL "Qt4" ) set(WITH_QT4 TRUE) endif() @@ -228,31 +222,6 @@ if ( EXISTS ../include ) include_directories( BEFORE ../include )\n\n") endif() - -if (WITH_QT3) - file(APPEND CMakeLists.txt -"# Qt3 -# FindQt3-patched.cmake is FindQt3.cmake patched by CGAL developers, so -# that it can be used together with FindQt4: all its variables are prefixed -# by \"QT3_\" instead of \"QT_\". -find_package(Qt3-patched QUIET ) - -if ( NOT QT3_FOUND ) - - message(STATUS \"This project requires the Qt3 library, and will not be compiled.\") - return() - -endif() - -if ( CGAL_Qt3_FOUND ) - - include( Qt3Macros-patched ) - -endif() - -") -endif() - if (WITH_QT4) file(APPEND CMakeLists.txt "# Qt4 @@ -309,39 +278,6 @@ else() file(APPEND CMakeLists.txt "include( CGAL_CreateSingleSourceCGALProgram )\n\n") endif() - - if (WITH_QT3) - - file(APPEND CMakeLists.txt -"if ( CGAL_Qt3_FOUND AND QT3_FOUND ) - -") - - # TODO all globs in ${SOURCE_DIR} - # TODO check if globs are non-empty - file(GLOB SOURCE_FILES *.C *.cpp) # TODO sort? - foreach( file ${SOURCE_FILES} ) - file(STRINGS ${file} filecontent) - string(REGEX MATCH "(^main|[^a-zA-Z0-9_]main) *[(]" result ${filecontent}) - if (result) - file(APPEND CMakeLists.txt " qt3_automoc( ${file} )\n") - endif() - endforeach() - - file(APPEND CMakeLists.txt -"# Make sure the compiler can find generated .moc files - include_directories( BEFORE \${CMAKE_CURRENT_BINARY_DIR} ) - - include_directories( \${QT3_INCLUDE_DIR} ) - - link_libraries( \${QT3_LIBRARIES} ) - -endif() - -") - - endif(WITH_QT3) - if (WITH_QT4) file(APPEND CMakeLists.txt @@ -401,24 +337,6 @@ else() file(GLOB ALL_SOURCES *.C *.cpp) # TODO sort sources? - if (WITH_QT3) - - file(APPEND CMakeLists.txt -"if ( CGAL_Qt3_FOUND AND QT3_FOUND ) - - qt3_automoc( \${ALL_SOURCES} ) - - # Make sure the compiler can find generated .moc files - include_directories( BEFORE \${CMAKE_CURRENT_BINARY_DIR} ) - - include_directories( \${QT3_INCLUDE_DIR} ) - -endif() - -") - - endif(WITH_QT3) - if(WITH_QT4) file(APPEND CMakeLists.txt @@ -490,9 +408,6 @@ add_to_cached_list( CGAL_EXECUTABLE_TARGETS ${SINGLE_SOURCE} ) set(LIBS "") - if (WITH_QT3) - set(LIBS "\${QT3_LIBRARIES}") - endif(WITH_QT3) if (WITH_QT4) set(LIBS "\${QT_LIBRARIES}") endif(WITH_QT4) diff --git a/Scripts/scripts/cgal_create_CMakeLists b/Scripts/scripts/cgal_create_CMakeLists index e56fb93df2d..a0bc8022a50 100755 --- a/Scripts/scripts/cgal_create_CMakeLists +++ b/Scripts/scripts/cgal_create_CMakeLists @@ -42,7 +42,6 @@ #NTL #Core (implies GMP+GMPXX) -#Qt3 (implies QT3) #Qt4 (implies QT4) #ImageIO @@ -53,7 +52,6 @@ create_cmake_script_with_options() { - qt3='n' qt4='n' # parse options file @@ -125,9 +123,8 @@ fi if [ ! -z "$CGAL_COMPONENTS" ]; then # ensure capitalization - # CGAL: Core, Qt3, Qt4, PDB, ImageIO + # CGAL: Core, Qt4, PDB, ImageIO CGAL_COMPONENTS=${CGAL_COMPONENTS//[c|C][o|O][r|R][e|E]/Core} - CGAL_COMPONENTS=${CGAL_COMPONENTS//[q|Q][t|T]3/Qt3} CGAL_COMPONENTS=${CGAL_COMPONENTS//[q|Q][t|T]4/Qt4} CGAL_COMPONENTS=${CGAL_COMPONENTS//[i|I][m|M][a|A][g|G][e|E][i|I][o|O]/ImageIO} @@ -166,9 +163,6 @@ fi COMPONENT=`echo $cgal_component | tr '[:upper:]' '[:lower:]'` # for qtmoc - if [ "$COMPONENT" = "qt3" ]; then - qt3='y' - fi if [ "$COMPONENT" = "qt4" ]; then qt4='y' fi @@ -266,34 +260,7 @@ EOF #------------------------------------------------------------------------- fi - # Qt3 or Qt4 - if [ "$qt3" = "y" ]; then - - #vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv - cat << 'EOF' - -# Qt3 -# FindQt3-patched.cmake is FindQt3.cmake patched by CGAL developers, so -# that it can be used together with FindQt4: all its variables are prefixed -# by "QT3_" instead of "QT_". -find_package(Qt3-patched QUIET ) - -if ( NOT QT3_FOUND ) - - message(STATUS "This project requires the Qt3 library, and will not be compiled.") - return() - -endif() - -if ( CGAL_Qt3_FOUND ) - - include( Qt3Macros-patched ) - -endif() -EOF - #------------------------------------------------------------------------- - fi # qt3 - + # Qt4 if [ "$qt4" = "y" ]; then #vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv @@ -369,47 +336,6 @@ EOF # add a new line echo - # Qt3 - if [ "$qt3" = "y" ]; then - #vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv - cat << 'EOF' -if ( CGAL_Qt3_FOUND AND QT3_FOUND ) - -EOF - #----------------------------------------------------------------------- - - for file in `ls *.cc *.cp *.cxx *.cpp *.CPP *.c++ *.C 2> /dev/null | sort` ; do - # Create an executable for each cpp that contains a function "main()" - BASE=`basename $file .cc` - BASE=`basename $BASE .cp` - BASE=`basename $BASE .cxx` - BASE=`basename $BASE .cpp` - BASE=`basename $BASE .CPP` - BASE=`basename $BASE .c++` - BASE=`basename $BASE .C` - egrep '\bmain[ \t]*\(' $file >/dev/null 2>&1 - if [ $? -eq 0 ]; then - echo "qt3_automoc( ${file} )" - fi - done - - #vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv - cat << 'EOF' - - # Make sure the compiler can find generated .moc files - include_directories( BEFORE ${CMAKE_CURRENT_BINARY_DIR} ) - - include_directories( ${QT3_INCLUDE_DIR} ) - - list(APPEND CGAL_3RD_PARTY_LIBRARIES ${QT3_LIBRARIES} ) - -endif() - -EOF - #----------------------------------------------------------------------- - - fi # qt3 - # Qt4 if [ "$qt4" = "y" ]; then #vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv @@ -486,31 +412,6 @@ EOF all="$all $file" done - # Qt3 - if [ "$qt3" = "y" ]; then - #vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv - cat << 'EOF' - -if ( CGAL_Qt3_FOUND AND QT3_FOUND ) - -EOF - #----------------------------------------------------------------------- - - echo "qt3_automoc( ${all} )" - - #vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv - cat << 'EOF' - - # Make sure the compiler can find generated .moc files - include_directories( BEFORE ${CMAKE_CURRENT_BINARY_DIR} ) - - include_directories( ${QT3_INCLUDE_DIR} ) - -endif() -EOF - #----------------------------------------------------------------------- - fi # qt3 - # Qt4 if [ "$qt4" = "y" ]; then #vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv @@ -586,9 +487,6 @@ EOF echo echo "# Link the executable to CGAL and third-party libraries" LIBS="" - if [ "$qt3" = "y" ]; then - LIBS="\${QT3_LIBRARIES}" - fi if [ "$qt4" = "y" ]; then LIBS="\${QT_LIBRARIES}" fi @@ -611,7 +509,7 @@ usage() echo "Usage: `basename $0` [-s source] [-c cgal-component1:cgal-component2:...] [-b boost-component1:boost-component2:...] [-p] [-o options_file='`pwd`/cgal_cmake_options:$HOME/.cgal_cmake_options_rc'] [-v] [-h]" >&2 echo >&2 echo " -s source If this parameter is given the script will create one single executable for 'source' with all source files; otherwise it creates one executable for each main'ed source." >&2 - echo " cgal_componentX - must be a valid cgal component, examples are 'Core','ImageIO','Qt3','Qt4' ('benchmark', 'symbolic')." >&2 + echo " cgal_componentX - must be a valid cgal component, examples are 'Core','ImageIO','Qt4' ('benchmark', 'symbolic')." >&2 echo " boost_componentX - must be a valid boost component, like 'filesystem', 'program_options'." >&2 echo " -p use all of CGAL's preconfigured libraries" >&2 echo " -o options_file - file with PACKAGE, DIRECTORY, CGAL_COMPONENT, and BOOST_COMPONENT directives" >&2 diff --git a/Scripts/scripts/cgal_create_cmake_script b/Scripts/scripts/cgal_create_cmake_script index b6afcacd3c5..b39812fa1d7 100755 --- a/Scripts/scripts/cgal_create_cmake_script +++ b/Scripts/scripts/cgal_create_cmake_script @@ -47,75 +47,6 @@ EOF cmake_minimum_required(VERSION 2.8.10) EOF - - if [ "${TYPE}" = "demo" ] ; then - target_name="${PROJECT}_${TYPE}" - - for file in `ls "$SOURCE_DIR"*.cc "$SOURCE_DIR"*.cp "$SOURCE_DIR"*.cxx "$SOURCE_DIR"*.cpp "$SOURCE_DIR"*.CPP "$SOURCE_DIR"*.c++ "$SOURCE_DIR"*.C 2>/dev/null | sort` ; do - all="$all $file" - done - if [ -z "${all}" ]; then return; fi - cat <<'EOF' -find_package(CGAL QUIET COMPONENTS Core Qt3 ) - -if ( CGAL_FOUND ) - - include( ${CGAL_USE_FILE} ) - - find_package(Qt3-patched QUIET ) - # FindQt3-patched.cmake is FindQt3.cmake patched by CGAL developers, so - # that it can be used together with FindQt4: all its variables are prefixed - # by "QT3_" instead of "QT_". - - if(CGAL_Qt3_FOUND AND QT3_FOUND) - - include( Qt3Macros-patched ) -EOF - echo " qt3_automoc( ${all} )" - cat<<'EOF' - - # Make sure the compiler can find generated .moc files - include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR}) - - include_directories( ${QT3_INCLUDE_DIR} ) - -EOF - - if [ -d "${SOURCE_DIR}../../include" ] ; then - echo " include_directories (BEFORE \"${SOURCE_DIR}../../include\")" - echo - fi - if [ -d "${SOURCE_DIR}../include" ] ; then - echo " include_directories (BEFORE \"${SOURCE_DIR}../include\")" - echo - fi - if [ -d "${SOURCE_DIR}include" ] ; then - echo " include_directories (BEFORE \"${SOURCE_DIR}include\")" - echo - fi - echo "Adding a target ${target_name}..." >&3 - cat <]" + echo "Usage: cgal_create_cmake_script [--source_dir ]" echo echo " Create a CMakeLists.txt file in the current working directory." echo - echo " TYPE must be any of example, demo or test. The default is example." + echo " TYPE must be any of example or test. The default is example." echo echo " If the option --source_dir is specified with a directory, the " echo " CMakeLists.txt uses source files from that directory, otherwise " diff --git a/Testsuite/test/collect_cgal_testresults_from_cmake b/Testsuite/test/collect_cgal_testresults_from_cmake index 7d4f7468dfc..b99b14732a3 100755 --- a/Testsuite/test/collect_cgal_testresults_from_cmake +++ b/Testsuite/test/collect_cgal_testresults_from_cmake @@ -279,9 +279,7 @@ parse_flags_and_third_party_choices parse_lib_building_results "libCGAL" "CGAL" parse_lib_building_results "libCGALCore" "CGAL_Core" -parse_lib_building_results "libCGALimageIO" "CGAL_ImageIO" -parse_lib_building_results "libCGALQt" "CGAL_Qt3" -parse_lib_building_results "libCGALQt4" "CGAL_Qt4" +parse_lib_building_results "libCGALimageIO" "CGAL_ImageIO" parse_lib_building_results "libCGALQt5" "CGAL_Qt5" for DIR in $TEST_DIRECTORIES ; do