diff --git a/CMakeLists.txt b/CMakeLists.txt index 2ced981..2cd2538 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.12) +cmake_minimum_required(VERSION 3.15) # Rem : langage C ajouté pour VTK 9 car sinon il refuse de charger MPI_C demandé par ParallelMPI ... project (QtVtk CXX C) diff --git a/cmake/version.cmake b/cmake/version.cmake index 8361cda..1934196 100644 --- a/cmake/version.cmake +++ b/cmake/version.cmake @@ -3,8 +3,8 @@ # set (QT_VTK_MAJOR_VERSION "8") -set (QT_VTK_MINOR_VERSION "4") -set (QT_VTK_RELEASE_VERSION "1") +set (QT_VTK_MINOR_VERSION "5") +set (QT_VTK_RELEASE_VERSION "0") set (QT_VTK_VERSION ${QT_VTK_MAJOR_VERSION}.${QT_VTK_MINOR_VERSION}.${QT_VTK_RELEASE_VERSION}) diff --git a/src/QtVtk/CMakeLists.txt b/src/QtVtk/CMakeLists.txt index 484414b..0f4cee2 100644 --- a/src/QtVtk/CMakeLists.txt +++ b/src/QtVtk/CMakeLists.txt @@ -5,12 +5,13 @@ find_package (GUIToolkitsVariables) include (${CMAKE_SOURCE_DIR}/cmake/version.cmake) include (${GUIToolkitsVariables_CMAKE_DIR}/common.cmake) +include (${GUIToolkitsVariables_CMAKE_DIR}/common_qt.cmake) include (${GUIToolkitsVariables_CMAKE_DIR}/workarounds.cmake) find_package (VtkContrib 5 REQUIRED) include (${CMAKE_SOURCE_DIR}/cmake/qtvtk_common.cmake) # Après VtkContrib qui positionne les variables VTK_7, VTK_8 et VTK_9 find_package (QtUtil 6 REQUIRED) -find_package(Qt5Core NO_CMAKE_SYSTEM_PATH) # In order to enable moc ... +find_package(Qt${QT_MAJOR}Core NO_CMAKE_SYSTEM_PATH) # In order to enable moc ... if (VTK_9) find_package (VTK COMPONENTS GUISupportQt IOExportGL2PS FiltersExtraction) endif (VTK_9) diff --git a/src/QtVtk/QtVTKPrintHelper.cpp b/src/QtVtk/QtVTKPrintHelper.cpp index 9c3d56f..8c42b12 100644 --- a/src/QtVtk/QtVTKPrintHelper.cpp +++ b/src/QtVtk/QtVTKPrintHelper.cpp @@ -95,8 +95,10 @@ QtVTKPrintHelper::PrinterStatus QtVTKPrintHelper::print (vtkRenderWindow& window // S'assurer que la boite de dialogue d'impression ait bien disparue. if (0 != top) top->raise ( ); +#ifdef QT_5 while (true == qApp->hasPendingEvents ( )) qApp->processEvents ( ); +#endif // QT_5 QtAutoWaitingCursor cursor (true); if (printer.outputFileName ( ).size ( ) != 0) { @@ -125,7 +127,7 @@ QtVTKPrintHelper::PrinterStatus QtVTKPrintHelper::print (vtkRenderWindow& window string tmpPSFile (tmpFile + ".ps"); PrintCommand::CommandOptions options; options.eraseFile = true; - options.copiesNumber= (size_t)printer.numCopies ( ); + options.copiesNumber= (size_t)printer.copyCount ( ); printToFile (window, tmpPSFile, 720); string printerName = printer.printerName ( ).toStdString ( ); printToPrinter (tmpPSFile, printerName, options); @@ -206,8 +208,10 @@ QtVTKPrintHelper::PrinterStatus QtVTKPrintHelper::printToFile (vtkRenderWindow& // S'assurer que la boite de dialogue d'impression ait bien disparue. if (0 != top) top->raise ( ); +#ifdef QT_5 while (true == qApp->hasPendingEvents ( )) qApp->processEvents ( ); +#endif // QT_5 QtAutoWaitingCursor cursor (true); QStringList fileList = dialog.selectedFiles ( ); @@ -262,8 +266,10 @@ QtVTKPrintHelper::PrinterStatus QtVTKPrintHelper::printTo4kFile (vtkRenderWindow // S'assurer que la boite de dialogue d'impression ait bien disparue. if (0 != top) top->raise ( ); +#ifdef QT_5 while (true == qApp->hasPendingEvents ( )) qApp->processEvents ( ); +#endif // QT_5 QtAutoWaitingCursor cursor (true); QStringList fileList = dialog.selectedFiles ( ); diff --git a/src/QtVtk/QtVtkGraphicWidget.cpp b/src/QtVtk/QtVtkGraphicWidget.cpp index dd30dd3..452cbe6 100644 --- a/src/QtVtk/QtVtkGraphicWidget.cpp +++ b/src/QtVtk/QtVtkGraphicWidget.cpp @@ -132,7 +132,11 @@ vtkRenderWindow* QtVtkGraphicWidget::GetRenderWindow ( ) // v 8.1.1 #endif +#ifdef QT_5 void QtVtkGraphicWidget::enterEvent (QEvent* event) +#else // QT_5 +void QtVtkGraphicWidget::enterEvent (QEnterEvent* event) +#endif // QT_5 { setFocus ( ); diff --git a/src/QtVtk/public/QtVtk/QtVtkGraphicWidget.h b/src/QtVtk/public/QtVtk/QtVtkGraphicWidget.h index 06b4602..3587b68 100644 --- a/src/QtVtk/public/QtVtk/QtVtkGraphicWidget.h +++ b/src/QtVtk/public/QtVtk/QtVtkGraphicWidget.h @@ -67,9 +67,13 @@ class QtVtkGraphicWidget : public QVTKOpenGLWidget protected : +#ifdef QT_5 virtual void enterEvent (QEvent* event); +#else // QT_5 + virtual void enterEvent (QEnterEvent* event); +#endif // QT_5 virtual void focusInEvent (QFocusEvent* event); - + private : diff --git a/versions.txt b/versions.txt index 4284e8b..84d6a19 100644 --- a/versions.txt +++ b/versions.txt @@ -1,5 +1,10 @@ A FAIRE : tester le vtkIntersectionPolyDataFilter de VTK 7, voir si de base il propose les services attendus (Inner, ...). +Version 8.5.0 : 13/12/23 +=============== + +Portage Qt 6/QtUtil v 6.4.0/GUIToolkitsVariables v 1.4.0. + Version 8.4.0 : 21/06/23 ===============