remove occurrences of Qt5

This commit is contained in:
Laurent Rineau 2023-09-14 17:02:21 +02:00
parent 2f6d51b49b
commit 48f37a14dc
21 changed files with 46 additions and 87 deletions

8
.gitignore vendored
View File

@ -178,12 +178,6 @@ GraphicsView/demo/Triangulation_2/Makefile
GraphicsView/demo/Triangulation_2/Regular_triangulation_2 GraphicsView/demo/Triangulation_2/Regular_triangulation_2
GraphicsView/demo/Triangulation_2/qrc_*.cxx GraphicsView/demo/Triangulation_2/qrc_*.cxx
GraphicsView/demo/Triangulation_2/ui_*.h GraphicsView/demo/Triangulation_2/ui_*.h
GraphicsView/src/CGAL_Qt5/*.dll
GraphicsView/src/CGAL_Qt5/*.lib
GraphicsView/src/CGAL_Qt5/*.so
GraphicsView/src/CGAL_Qt5/Makefile
GraphicsView/src/CGAL_Qt5/moc_*.cxx
GraphicsView/src/CGAL_Qt5/qrc_*.cxx
HalfedgeDS/test/HalfedgeDS/cgal_test_with_cmake HalfedgeDS/test/HalfedgeDS/cgal_test_with_cmake
HalfedgeDS/test/HalfedgeDS/test_hds HalfedgeDS/test/HalfedgeDS/test_hds
HalfedgeDS/test/HalfedgeDS/test_hds_decorator HalfedgeDS/test/HalfedgeDS/test_hds_decorator
@ -879,7 +873,6 @@ Surface_mesher/demo/Surface_mesher/.*.deps
Surface_mesher/demo/Surface_mesher/.qglviewer.xml Surface_mesher/demo/Surface_mesher/.qglviewer.xml
Surface_mesher/demo/Surface_mesher/Makefile Surface_mesher/demo/Surface_mesher/Makefile
Surface_mesher/demo/Surface_mesher/Surface_mesher Surface_mesher/demo/Surface_mesher/Surface_mesher
Surface_mesher/demo/Surface_mesher/Surface_mesher_Qt5_Demo
Surface_mesher/demo/Surface_mesher/VTK/Makefile Surface_mesher/demo/Surface_mesher/VTK/Makefile
Surface_mesher/demo/Surface_mesher/VTK/mesh_a_3D_image Surface_mesher/demo/Surface_mesher/VTK/mesh_a_3D_image
Surface_mesher/demo/Surface_mesher/VTK/mesh_a_VTK_3D_image Surface_mesher/demo/Surface_mesher/VTK/mesh_a_VTK_3D_image
@ -894,7 +887,6 @@ Surface_mesher/demo/Surface_mesher/out*.off
Surface_mesher/demo/Surface_mesher/polyhedron_remesher Surface_mesher/demo/Surface_mesher/polyhedron_remesher
Surface_mesher/demo/Surface_mesher/polyhedron_remesher_with_edges Surface_mesher/demo/Surface_mesher/polyhedron_remesher_with_edges
Surface_mesher/demo/Surface_mesher/qrc_*.c* Surface_mesher/demo/Surface_mesher/qrc_*.c*
Surface_mesher/demo/Surface_mesher/qt5-demo
Surface_mesher/demo/Surface_mesher/ui_*.h Surface_mesher/demo/Surface_mesher/ui_*.h
Surface_mesher/doxygen Surface_mesher/doxygen
Surface_mesher/examples/Surface_mesher/.*.deps Surface_mesher/examples/Surface_mesher/.*.deps

View File

@ -23,7 +23,7 @@ If the parameter is not given, the script creates <B>one executable for each giv
source file</B>. source file</B>.
<DT><B>`-c com1:com2:...`</B><DD> Lists components ("com1", <DT><B>`-c com1:com2:...`</B><DD> Lists components ("com1",
"com2") of \cgal to which the executable(s) should be linked. Valid components are \cgal's "com2") of \cgal to which the executable(s) should be linked. Valid components are \cgal's
libraries (i.e.\ "Core", "ImageIO", and "Qt5"). An example is `-c Core`. libraries (i.e.\ "Core", "ImageIO", and "Qt6"). An example is `-c Core`.
<DT><B>`-b boost1:boost2:...`</B><DD> Lists components ("boost1", <DT><B>`-b boost1:boost2:...`</B><DD> Lists components ("boost1",
"boost2") of \boost to which the executable(s) should be "boost2") of \boost to which the executable(s) should be

View File

@ -25,8 +25,8 @@ the section \subpage thirdparty.
- `-frounding-math` with gcc - `-frounding-math` with gcc
- `/fp:strict /fp:except-` with MSVC - `/fp:strict /fp:except-` with MSVC
\section secexample Minimal Example Using Qt5 \section secexample Minimal Example Using Qt6
This section describes a minimal example of a program that uses \cgal and Qt5 for some GUI features. This section describes a minimal example of a program that uses \cgal and Qt6 for some GUI features.
\subsection subcmake CMakeLists.txt \subsection subcmake CMakeLists.txt
\dontinclude Surface_mesh/CMakeLists.txt \dontinclude Surface_mesh/CMakeLists.txt

View File

@ -102,8 +102,8 @@ version shipped with \cgal.
The page \ref configurationvariables lists CMake and environment variables which can be used to specify The page \ref configurationvariables lists CMake and environment variables which can be used to specify
the location of third-party software during configuration. the location of third-party software during configuration.
\subsection thirdpartyQt Qt5 \subsection thirdpartyQt Qt6
<b>Version 5.9.0 or later</b> <b>Version 6.4 or later</b>
Qt is a cross-platform application and UI framework. Qt is a cross-platform application and UI framework.

View File

@ -166,17 +166,17 @@ if no debugging is intended. Users should thus run:
cd CGAL-\cgalReleaseNumber/examples/Triangulation_2 cd CGAL-\cgalReleaseNumber/examples/Triangulation_2
cmake -DCGAL_DIR=$HOME/CGAL-\cgalReleaseNumber -DCMAKE_BUILD_TYPE=Release . # we are here using a release tarball cmake -DCGAL_DIR=$HOME/CGAL-\cgalReleaseNumber -DCMAKE_BUILD_TYPE=Release . # we are here using a release tarball
The package Qt5 on brew is "keg-only", which means it is not "linked" with brew. The package Qt6 on brew is "keg-only", which means it is not "linked" with brew.
In order to link against Qt5, you need to run: In order to link against Qt6, you need to run:
brew link qt@5 brew link qt@6
After that, you will have to specify the Qt6_DIR by hand to cmake, using something like After that, you will have to specify the Qt6_DIR by hand to cmake, using something like
-DQt6_DIR=/usr/local/opt/qt6/lib/cmake/Qt6 -DQt6_DIR=/usr/local/opt/qt6/lib/cmake/Qt6
where `/usr/local/` is actually your current brew installation directory. Check this directory where `/usr/local/` is actually your current brew installation directory. Check this directory
to be sure where the Qt5 is placed on your machine. to be sure where the Qt6 is placed on your machine.
\subsection usage_configuring_cmake_gui Specifying Missing Dependencies \subsection usage_configuring_cmake_gui Specifying Missing Dependencies

View File

@ -85,7 +85,7 @@ and will serverly limit performances.
| Variable | Description | Type | %Default Value | | Variable | Description | Type | %Default Value |
| :- | :- | :- | :- | | :- | :- | :- | :- |
| `CGAL_DIR` | Full-path to the binary directory where \cgal was configured |Either CMake or Environment | none | | `CGAL_DIR` | Full-path to the binary directory where \cgal was configured |Either CMake or Environment | none |
| `Qt5_DIR` | Full-path to the Qt cmake directory |CMake| platform-dependent| | `Qt6_DIR` | Full-path to the Qt cmake directory |CMake| platform-dependent|
\subsection installation_variables_third_party Variables Providing Information About 3rd-Party Libraries \subsection installation_variables_third_party Variables Providing Information About 3rd-Party Libraries
@ -178,11 +178,11 @@ Under Linux, the \gmpxx is also searched for, and you may specify the following
\subsection installation_qt5 Qt5 Library \subsection installation_qt6 Qt6 Library
You must set the cmake or environment variable `Qt5_DIR` to point to the path You must set the cmake or environment variable `Qt6_DIR` to point to the path
to the directory containing the file `Qt6Config.cmake` created by your \qt6 installation. If you are to the directory containing the file `Qt6Config.cmake` created by your \qt6 installation. If you are
using the open source edition it should be `<path>/qt-everywhere-opensource-src-<version>/qtbase/lib/cmake/Qt5`. using the open source edition it should be `<path>/qt-everywhere-opensource-src-<version>/qtbase/lib/cmake/Qt6`.
\subsection installation_leda LEDA Library \subsection installation_leda LEDA Library

View File

@ -118,7 +118,7 @@ CMake variables and paths. Otherwise, you can also install it using `vcpkg`:
Remember to specify `--triplet` or the related environment variable in case you target 64-bit applications. Remember to specify `--triplet` or the related environment variable in case you target 64-bit applications.
As Qt5 is modular and as the \cgal examples and demos use only some of these modules As Qt6 is modular and as the \cgal examples and demos use only some of these modules
you can save download and compilation time by specifying an *installation option*: you can save download and compilation time by specifying an *installation option*:
C:\dev\vcpkg> .\vcpkg.exe install cgal[qt] C:\dev\vcpkg> .\vcpkg.exe install cgal[qt]
@ -234,11 +234,10 @@ A typical `Qt` installation would consist of the following steps:
<ul> <ul>
<li> <li>
Download and install the Qt library for open source development package for your Visual Studio version at Download and install the Qt library for open source development package for your Visual Studio version at
<a href="https://www.qt.io/download">https://www.qt.io/download</a> <a href="https://www.qt.io/download-open-source#source">https://www.qt.io/download-open-source#source</a>.</li>
(here is the direct link to the <a href="https://www.qt.io/offline-installers">offline installers</a>).</li> <li>Add the environment variable `QTDIR` pointing to the place you installed Qt, e.g., `C:\dev\Qt\Qt6.13.1`,
<li>Add the environment variable `QTDIR` pointing to the place you installed Qt, e.g., `C:\dev\Qt\Qt5.13.1`,
as this will help `cmake` to find Qt.</li> as this will help `cmake` to find Qt.</li>
<li>Add the bin directory of Qt, e.g. add `C:\dev\Qt\Qt5.13.1\msvcXXXX_YY\bin` to `PATH`, where `XXXX_YY` is something like `vc2017_64`. <li>Add the bin directory of Qt, e.g. add `C:\dev\Qt\Qt6.13.1\msvcXXXX_YY\bin` to `PATH`, where `XXXX_YY` is something like `vc2017_64`.
To avoid any conflict with another dll with the same name from another folder, add this path as the first in the list.</li> To avoid any conflict with another dll with the same name from another folder, add this path as the first in the list.</li>
</ul> </ul>

View File

@ -1,11 +0,0 @@
Les inputs se sont seulement un simple mousePressEvent (pour un circle, il faut cliquer deux fois)
Pour le cercle, ça serait bien d'avoir la possibilité d'entrée un cercle par centre/rayon, ou deux points diamétraux, ou trois points.
Bloquer l'input sur un truc // aux axes (avec shift)
S'inspirer de ipe, en général.
Control: pour les navigations
Shift: pour // aux axes.
Affichage du (x,y) par rapport à l'origine de l'objet en cours.
Integrer src/CGALQt5 dans le build process de CGAL, avec CMake.

View File

@ -522,7 +522,7 @@ int main(int argc, char **argv)
app.setOrganizationName("GeometryFactory"); app.setOrganizationName("GeometryFactory");
app.setApplicationName("Segment Voronoi 2 demo"); app.setApplicationName("Segment Voronoi 2 demo");
// Import resources from libCGAL (Qt5) // Import resources from libCGAL (Qt6)
CGAL_QT_INIT_RESOURCES; CGAL_QT_INIT_RESOURCES;
if (argc == 2) { if (argc == 2) {

View File

@ -16,9 +16,9 @@
#include <CGAL/export/helpers.h> #include <CGAL/export/helpers.h>
#if ( defined(CGAL_BUILD_SHARED_LIBS) && ( ! defined(CGAL_HEADER_ONLY) ) ) \ #if ( defined(CGAL_BUILD_SHARED_LIBS) && ( ! defined(CGAL_HEADER_ONLY) ) ) \
|| defined(CGAL_USE_Qt5_RESOURCES) || defined(CGAL_USE_Qt6_RESOURCES)
# if defined(CGAL_Qt6_EXPORTS) || defined(CGAL_USE_Qt5_RESOURCES) # if defined(CGAL_Qt6_EXPORTS) || defined(CGAL_USE_Qt6_RESOURCES)
// defined by CMake or in cpp files of the dll // defined by CMake or in cpp files of the dll
# define CGAL_QT_EXPORT CGAL_DLL_EXPORT # define CGAL_QT_EXPORT CGAL_DLL_EXPORT

View File

@ -5,9 +5,8 @@ The CGAL software consists of several parts, each of which is licensed under
an open source license. It is also possible to obtain commercial licenses an open source license. It is also possible to obtain commercial licenses
from GeometryFactory (www.geometryfactory.com) for all or parts of CGAL. from GeometryFactory (www.geometryfactory.com) for all or parts of CGAL.
The source code of the CGAL library can be found in the directories The source code of the CGAL library can be found in the directory
"src/CGAL", "src/CGALQt", "src/CGALQt5" and "include/CGAL" (with the "include/CGAL" (with the exception of "include/CGAL/CORE", "include/CGAL/OpenNL").
exception of "include/CGAL/CORE", "include/CGAL/OpenNL").
It is specified in each file of the CGAL library which It is specified in each file of the CGAL library which
license applies to it. This is either the GNU General Public License license applies to it. This is either the GNU General Public License
or the GNU Lesser General Public License (as published by the Free Software or the GNU Lesser General Public License (as published by the Free Software
@ -26,9 +25,9 @@ Distributed along with CGAL (for the users' convenience), but not part of
CGAL, are the following third-party libraries, available under their own CGAL, are the following third-party libraries, available under their own
licenses: licenses:
- CORE, in the directories "include/CGAL/CORE" and "src/CGAL_Core", is - CORE, in the directory "include/CGAL/CORE" is licensed under the LGPL
licensed under the LGPL (see LICENSE.LGPL). (see LICENSE.LGPL).
- ImageIO, in the directory "src/CGAL_ImageIO", is licensed under the LGPL - ImageIO, in the directory "include/CGAL/ImageIO", is licensed under the LGPL
(see LICENSE.LGPL). (see LICENSE.LGPL).
- OpenNL, in the directory "include/CGAL/OpenNL", is licensed under the LGPL - OpenNL, in the directory "include/CGAL/OpenNL", is licensed under the LGPL
(see LICENSE.LGPL). (see LICENSE.LGPL).

View File

@ -103,7 +103,7 @@ disable this ${type}.\n\
endif() endif()
endfunction() endfunction()
function(CGAL_hook_fix_ctest_depending_on_Qt5) function(CGAL_hook_fix_ctest_depending_on_Qt6)
get_property(_targets DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY BUILDSYSTEM_TARGETS) get_property(_targets DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY BUILDSYSTEM_TARGETS)
foreach(_target ${_targets}) foreach(_target ${_targets})
if(NOT TEST "compilation of ${_target}") if(NOT TEST "compilation of ${_target}")
@ -120,7 +120,7 @@ function(CGAL_hooks_at_end_of_all_directories)
CGAL_hook_check_targets() CGAL_hook_check_targets()
CGAL_hook_check_unused_cpp_files() CGAL_hook_check_unused_cpp_files()
if(BUILD_TESTING) if(BUILD_TESTING)
CGAL_hook_fix_ctest_depending_on_Qt5() CGAL_hook_fix_ctest_depending_on_Qt6()
endif() endif()
endfunction() endfunction()

View File

@ -1,19 +0,0 @@
// Copyright (c) 2008 GeometryFactory, Sophia Antipolis (France)
//
// This file is part of CGAL (www.cgal.org)
//
// $URL$
// $Id$
// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial
// Tests if QT5 is available and prints its version string.
#include <iostream>
#include <QtCore/QtGlobal>
int main()
{
std::cout << "version=" << QT_VERSION_STR << std::endl;
return 0;
}

View File

@ -12,7 +12,7 @@
#ifndef CGAL_EXPORT_HELPERS_H #ifndef CGAL_EXPORT_HELPERS_H
#define CGAL_EXPORT_HELPERS_H #define CGAL_EXPORT_HELPERS_H
#if defined(CGAL_HEADER_ONLY) && ! defined(CGAL_USE_Qt5_RESOURCES) #if defined(CGAL_HEADER_ONLY) && ! defined(CGAL_USE_Qt6_RESOURCES)
# define CGAL_DLL_IMPORT # define CGAL_DLL_IMPORT
# define CGAL_DLL_EXPORT # define CGAL_DLL_EXPORT
# define CGAL_DLL_LOCAL # define CGAL_DLL_LOCAL

View File

@ -26,7 +26,7 @@ int main(int argc, char**) {
std::istream_iterator<Point> end; std::istream_iterator<Point> end;
Triangulation t; Triangulation t;
t.insert(begin, end); t.insert(begin, end);
if(argc == 3) // do not test Qt5 at runtime if(argc == 3) // do not test Qt6 at runtime
CGAL::draw(t); CGAL::draw(t);
std::cout<<"OK."<<std::endl; std::cout<<"OK."<<std::endl;
return EXIT_SUCCESS; return EXIT_SUCCESS;

View File

@ -31,7 +31,7 @@ int main(int argc, char** argv)
application.setOrganizationName("CNRS and LIRIS' Establishments"); application.setOrganizationName("CNRS and LIRIS' Establishments");
application.setApplicationName("3D Linear Cell Complex"); application.setApplicationName("3D Linear Cell Complex");
// Import resources from libCGALQt5 // Import resources from libCGALQt6
// See https://doc.qt.io/qt-5/qdir.html#Q_INIT_RESOURCE // See https://doc.qt.io/qt-5/qdir.html#Q_INIT_RESOURCE
CGAL_Qt_init_resources();// that function is in a DLL CGAL_Qt_init_resources();// that function is in a DLL
Q_INIT_RESOURCE(Linear_cell_complex_3); Q_INIT_RESOURCE(Linear_cell_complex_3);

View File

@ -1,5 +1,5 @@
This directory contains non-graphical demos of the 2D Mesh Generator This directory contains non-graphical demos of the 2D Mesh Generator
package. package.
The Constrained Delaunay triangulation Qt5 demos has a 2D meshing feature that The Constrained Delaunay triangulation Qt demos has a 2D meshing feature that
demonstrates the 2D Mesh Generator package. See in the directory demonstrates the 2D Mesh Generator package. See in the directory
demo/Triangulation_2/ of the CGAL tarball. demo/Triangulation_2/ of the CGAL tarball.

View File

@ -503,7 +503,7 @@ int main(int argc, char **argv)
app.setOrganizationName("GeometryFactory"); app.setOrganizationName("GeometryFactory");
app.setApplicationName("Polyline_simplification_2 demo"); app.setApplicationName("Polyline_simplification_2 demo");
// Import resources from libCGALQt5. // Import resources from libCGALQt6.
CGAL_QT_INIT_RESOURCES; CGAL_QT_INIT_RESOURCES;
MainWindow mainWindow; MainWindow mainWindow;

View File

@ -121,7 +121,7 @@ int main()
/* /*
#ifdef CGAL_USE_BASIC_VIEWER #ifdef CGAL_USE_BASIC_VIEWER
std::vector<Path_on_surface<SM> > paths={pij, pkl}; std::vector<Path_on_surface<SM> > paths={pij, pkl};
CGAL::draw(sm, paths); // Enable only if CGAL was compiled with Qt5 CGAL::draw(sm, paths); // Enable only if CGAL was compiled with Qt6
#endif // CGAL_USE_BASIC_VIEWER #endif // CGAL_USE_BASIC_VIEWER
*/ */
for (int i=-4; i<=4; ++i) for (int i=-4; i<=4; ++i)

View File

@ -48,7 +48,7 @@ with open(report_file, "rt") as test_report:
elif name == "libCGAL_ImageIO": elif name == "libCGAL_ImageIO":
name="libCGALimageIO_shared" name="libCGALimageIO_shared"
elif name == "libCGAL_Qt6": elif name == "libCGAL_Qt6":
name="libCGALQt5_shared" name="libCGALQt6_shared"
if name=="incomplete": if name=="incomplete":
is_writing=False is_writing=False
is_ignored=False is_ignored=False

View File

@ -322,7 +322,7 @@ To create an external plugin, you must make a new Cmake project.\n
project( Example_plugin ) project( Example_plugin )
Configure CMake as you desire and fetch the right Qt5 packages : Configure CMake as you desire and fetch the right Qt6 packages :
# Find includes in corresponding build directories # Find includes in corresponding build directories
set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_INCLUDE_CURRENT_DIR ON)
@ -331,13 +331,13 @@ Configure CMake as you desire and fetch the right Qt5 packages :
cmake_minimum_required(VERSION 3.1...3.23) cmake_minimum_required(VERSION 3.1...3.23)
#Find CGAL #Find CGAL
find_package(CGAL COMPONENTS Qt5) find_package(CGAL COMPONENTS Qt6)
include( ${CGAL_USE_FILE} ) include( ${CGAL_USE_FILE} )
# Find Qt5 itself # Find Qt6 itself
find_package(Qt5 find_package(Qt6
QUIET QUIET
COMPONENTS OpenGL Script Svg Xml COMPONENTS OpenGLWidgets Svg
OPTIONAL_COMPONENTS ScriptTools) OPTIONAL_COMPONENTS WebSockets)
You will probably have to fetch the libraries exported by the Polyhedron_demo, like the Scene_items. You will probably have to fetch the libraries exported by the Polyhedron_demo, like the Scene_items.
@ -370,15 +370,14 @@ Notice that an external plugin will not be automatically loaded in the Polyhedro
cmake_minimum_required(VERSION 3.1...3.23) cmake_minimum_required(VERSION 3.1...3.23)
#Find CGAL #Find CGAL
find_package(CGAL COMPONENTS Qt5) find_package(CGAL COMPONENTS Qt6)
include( ${CGAL_USE_FILE} ) include( ${CGAL_USE_FILE} )
# Find Qt5 itself # Find Qt6 itself
find_package(Qt5 find_package(Qt6 QUIET
QUIET COMPONENTS OpenGLWidgets Svg
COMPONENTS OpenGL Script Svg Xml OPTIONAL_COMPONENTS WebSockets)
OPTIONAL_COMPONENTS ScriptTools)
if(Qt5_FOUND AND CGAL_FOUND) if(Qt6_FOUND AND CGAL_FOUND)
find_package(CGAL_polyhedron_demo) find_package(CGAL_polyhedron_demo)
include( ${CGAL_POLYHEDRON_DEMO_USE_FILE} ) include( ${CGAL_POLYHEDRON_DEMO_USE_FILE} )