Skip to content

Commit 87e7747

Browse files
author
Charles PIGNEROL
committed
Version 8.5.0. Porting Qt 6/VTK 9.
1 parent 174de00 commit 87e7747

File tree

7 files changed

+26
-6
lines changed

7 files changed

+26
-6
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.12)
1+
cmake_minimum_required(VERSION 3.15)
22

33
# Rem : langage C ajouté pour VTK 9 car sinon il refuse de charger MPI_C demandé par ParallelMPI ...
44
project (QtVtk CXX C)

cmake/version.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
#
44

55
set (QT_VTK_MAJOR_VERSION "8")
6-
set (QT_VTK_MINOR_VERSION "4")
7-
set (QT_VTK_RELEASE_VERSION "1")
6+
set (QT_VTK_MINOR_VERSION "5")
7+
set (QT_VTK_RELEASE_VERSION "0")
88
set (QT_VTK_VERSION ${QT_VTK_MAJOR_VERSION}.${QT_VTK_MINOR_VERSION}.${QT_VTK_RELEASE_VERSION})
99

1010

src/QtVtk/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,13 @@ find_package (GUIToolkitsVariables)
55

66
include (${CMAKE_SOURCE_DIR}/cmake/version.cmake)
77
include (${GUIToolkitsVariables_CMAKE_DIR}/common.cmake)
8+
include (${GUIToolkitsVariables_CMAKE_DIR}/common_qt.cmake)
89
include (${GUIToolkitsVariables_CMAKE_DIR}/workarounds.cmake)
910

1011
find_package (VtkContrib 5 REQUIRED)
1112
include (${CMAKE_SOURCE_DIR}/cmake/qtvtk_common.cmake) # Après VtkContrib qui positionne les variables VTK_7, VTK_8 et VTK_9
1213
find_package (QtUtil 6 REQUIRED)
13-
find_package(Qt5Core NO_CMAKE_SYSTEM_PATH) # In order to enable moc ...
14+
find_package(Qt${QT_MAJOR}Core NO_CMAKE_SYSTEM_PATH) # In order to enable moc ...
1415
if (VTK_9)
1516
find_package (VTK COMPONENTS GUISupportQt IOExportGL2PS FiltersExtraction)
1617
endif (VTK_9)

src/QtVtk/QtVTKPrintHelper.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,10 @@ QtVTKPrintHelper::PrinterStatus QtVTKPrintHelper::print (vtkRenderWindow& window
9595
// S'assurer que la boite de dialogue d'impression ait bien disparue.
9696
if (0 != top)
9797
top->raise ( );
98+
#ifdef QT_5
9899
while (true == qApp->hasPendingEvents ( ))
99100
qApp->processEvents ( );
101+
#endif // QT_5
100102
QtAutoWaitingCursor cursor (true);
101103
if (printer.outputFileName ( ).size ( ) != 0)
102104
{
@@ -125,7 +127,7 @@ QtVTKPrintHelper::PrinterStatus QtVTKPrintHelper::print (vtkRenderWindow& window
125127
string tmpPSFile (tmpFile + ".ps");
126128
PrintCommand::CommandOptions options;
127129
options.eraseFile = true;
128-
options.copiesNumber= (size_t)printer.numCopies ( );
130+
options.copiesNumber= (size_t)printer.copyCount ( );
129131
printToFile (window, tmpPSFile, 720);
130132
string printerName = printer.printerName ( ).toStdString ( );
131133
printToPrinter (tmpPSFile, printerName, options);
@@ -206,8 +208,10 @@ QtVTKPrintHelper::PrinterStatus QtVTKPrintHelper::printToFile (vtkRenderWindow&
206208
// S'assurer que la boite de dialogue d'impression ait bien disparue.
207209
if (0 != top)
208210
top->raise ( );
211+
#ifdef QT_5
209212
while (true == qApp->hasPendingEvents ( ))
210213
qApp->processEvents ( );
214+
#endif // QT_5
211215
QtAutoWaitingCursor cursor (true);
212216

213217
QStringList fileList = dialog.selectedFiles ( );
@@ -262,8 +266,10 @@ QtVTKPrintHelper::PrinterStatus QtVTKPrintHelper::printTo4kFile (vtkRenderWindow
262266
// S'assurer que la boite de dialogue d'impression ait bien disparue.
263267
if (0 != top)
264268
top->raise ( );
269+
#ifdef QT_5
265270
while (true == qApp->hasPendingEvents ( ))
266271
qApp->processEvents ( );
272+
#endif // QT_5
267273
QtAutoWaitingCursor cursor (true);
268274

269275
QStringList fileList = dialog.selectedFiles ( );

src/QtVtk/QtVtkGraphicWidget.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,11 @@ vtkRenderWindow* QtVtkGraphicWidget::GetRenderWindow ( ) // v 8.1.1
132132
#endif
133133

134134

135+
#ifdef QT_5
135136
void QtVtkGraphicWidget::enterEvent (QEvent* event)
137+
#else // QT_5
138+
void QtVtkGraphicWidget::enterEvent (QEnterEvent* event)
139+
#endif // QT_5
136140
{
137141
setFocus ( );
138142

src/QtVtk/public/QtVtk/QtVtkGraphicWidget.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,13 @@ class QtVtkGraphicWidget : public QVTKOpenGLWidget
6767

6868
protected :
6969

70+
#ifdef QT_5
7071
virtual void enterEvent (QEvent* event);
72+
#else // QT_5
73+
virtual void enterEvent (QEnterEvent* event);
74+
#endif // QT_5
7175
virtual void focusInEvent (QFocusEvent* event);
72-
76+
7377

7478
private :
7579

versions.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
A FAIRE : tester le vtkIntersectionPolyDataFilter de VTK 7, voir si de base il propose les services attendus (Inner, ...).
22

3+
Version 8.5.0 : 13/12/23
4+
===============
5+
6+
Portage Qt 6/QtUtil v 6.4.0/GUIToolkitsVariables v 1.4.0.
7+
38

49
Version 8.4.0 : 21/06/23
510
===============

0 commit comments

Comments
 (0)