]> Creatis software - clitk.git/commitdiff
Ensure the compilation with Qt4 and Qt5
authortbaudier <thomas.baudier@creatis.insa-lyon.fr>
Mon, 1 Feb 2016 13:26:20 +0000 (14:26 +0100)
committertbaudier <thomas.baudier@creatis.insa-lyon.fr>
Mon, 1 Feb 2016 13:26:20 +0000 (14:26 +0100)
22 files changed:
CMakeLists.txt
cmake/build_opt.cmake
vv/CMakeLists.txt
vv/vvIntensityValueSlider.h
vv/vvLabelImageLoaderWidget.h
vv/vvRegisterForm.cxx
vv/vvSegmentationDialog.h
vv/vvSlicer.cxx
vv/vvSlicer.h
vv/vvSurfaceViewerDialog.h
vv/vvToolBinarize.h
vv/vvToolCropImage.h
vv/vvToolImageArithm.h
vv/vvToolInputSelectorWidget.h
vv/vvToolMIP.h
vv/vvToolMedianFilter.h
vv/vvToolProfile.h
vv/vvToolROIManager.h
vv/vvToolResample.h
vv/vvToolSegmentation.h
vv/vvToolSimpleInputSelectorWidget.h
vv/vvToolWidgetBase.h

index 0bbeb0e9c11794050f3688e0954f40eb1374cbcd..8030908fc2be66c456b32ff0f03e39cbdac9ec76 100644 (file)
@@ -5,13 +5,13 @@ cmake_minimum_required(VERSION 2.8)
 cmake_policy(VERSION 2.8)
 if(COMMAND cmake_policy)
     cmake_policy(SET CMP0003 NEW)
+    #cmake_policy(SET CMP0007 NEW)
 endif(COMMAND cmake_policy)
 if(NOT DEFINED CLITK_SOURCE_DIR)
   set(CLITK_SOURCE_DIR ${PROJECT_SOURCE_DIR})
 endif(NOT DEFINED CLITK_SOURCE_DIR)
 #=========================================================
-SET(QT_MIN_VERSION "5.0.0")
-SET(VTK_MIN_VERSION "6.0.0")
+
 set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
 
 if(MSVC)
index 4a2ca009a14689b04d37c7512d3c7e9b9ba13bbb..48ba5a67e01640afef43706b163cbff8b8aa3636 100644 (file)
@@ -24,7 +24,14 @@ option(CLITK_BUILD_SEGMENTATION "Build command-line segmentation tools" OFF)
 option(CLITK_BUILD_REGISTRATION "Build command-line registration tools" OFF)
 
 option(CLITK_BUILD_VV "Build vv the 4D visualizer (requires VTK and QT)" ON)
+
 if(CLITK_BUILD_VV)
+    set(vv_QT_VERSION "4" CACHE STRING "Expected Qt version")
+    set_property(CACHE vv_QT_VERSION PROPERTY STRINGS 4 5)
+    if(NOT (vv_QT_VERSION VERSION_EQUAL "4" OR vv_QT_VERSION VERSION_EQUAL "5"))
+      message(FATAL_ERROR "Expected value for vv_QT_VERSION is either '4' or '5'")
+    endif()
+
   add_subdirectory(${CLITK_SOURCE_DIR}/vv ${PROJECT_BINARY_DIR}/vv)
 endif(CLITK_BUILD_VV)
 
index 4b0932de656d8fd004d1df5edc918fec74851d67..3b720028a3de414c76516557f2d734c82e4dbf52 100644 (file)
@@ -4,6 +4,7 @@ cmake_minimum_required(VERSION 2.4)
 # To avoid warning with some version
 if(COMMAND cmake_policy)
   cmake_policy(SET CMP0003 NEW)
+  #cmake_policy(SET CMP0007 NEW)
 endif(COMMAND cmake_policy)
 #=========================================================
 
@@ -109,6 +110,7 @@ set(vv_SRCS
 
 #=========================================================
 # Qt related commands
+if(vv_QT_VERSION VERSION_GREATER "4")
 find_package(Qt5Widgets REQUIRED)
 find_package(Qt5Network REQUIRED)
 find_package(Qt5Designer REQUIRED)
@@ -186,6 +188,81 @@ include_directories(
   ${CMAKE_CURRENT_BINARY_DIR}
   ${CMAKE_CURRENT_SOURCE_DIR}
 )
+else()
+find_package(Qt4 REQUIRED)
+link_directories(${QT_LIBRARY_DIR})
+
+
+QT4_WRAP_CPP(vv_SRCS
+  vvMainWindowBase.h
+  QTreePushButton.h
+  vvDocumentation.h
+  vvHelpDialog.h
+  vvQDicomSeriesSelector.h
+  vvSlicerManager.h
+  vvStructureSetActor.h
+  vvROIActor.h
+  vvToolCreatorBase.h
+  )
+
+QT4_WRAP_UI(vv_UI_CXX
+  qt_ui/vvHelpDialog.ui
+  qt_ui/vvDocumentation.ui
+  qt_ui/vvDicomSeriesSelector.ui
+  qt_ui/vvDummyWindow.ui #For testing
+  )
+
+QT4_ADD_RESOURCES(vv_SRCS vvIcons.qrc)
+
+# Add the autotools in the header vvToolsList.h for initialization of the dummy
+# variables in vv.cxx for the tools contained in vvLib
+if(${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt IS_NEWER_THAN ${CMAKE_CURRENT_BINARY_DIR}/vvToolsList.h)
+  file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/vvToolsList.h)
+  foreach(tool ${vv_TOOLS})
+    file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/vvToolsList.h "#include \"${tool}.h\"\n")
+    file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/vvToolsList.h "extern const vvToolCreator<${tool}> *dummy${tool};\n")
+    file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/vvToolsList.h "const vvToolCreator<${tool}> *dummy${tool}2 = dummy${tool};\n\n")
+  endforeach(tool)
+endif(${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt IS_NEWER_THAN ${CMAKE_CURRENT_BINARY_DIR}/vvToolsList.h)
+
+# Add the autotools and the common files ui
+foreach(tool ${vv_TOOLS} ${vv_COMMON_WITH_UI})
+    set(vv_SRCS ${vv_SRCS} ${tool}.cxx)
+    QT4_WRAP_CPP(vv_SRCS ${tool}.h)
+    QT4_WRAP_UI(vv_UI_CXX qt_ui/${tool}.ui)
+endforeach(tool)
+
+# Add the common source files
+foreach(tool ${vv_COMMON})
+    set(vv_SRCS ${vv_SRCS} ${tool}.cxx)
+    QT4_WRAP_CPP(vv_SRCS ${tool}.h)
+endforeach(tool)
+
+# if Windows and Qt was built as a static lib then don't set QT_DLL flag
+set(QT_STATIC 0)
+if(WIN32)
+  if(EXISTS ${QT_LIBRARY_DIR}/QtCore.prl)
+    file(READ ${QT_LIBRARY_DIR}/QtCore.prl QT_CORE_PRL)
+    if(${QT_CORE_PRL} MATCHES "static")
+      set(QT_STATIC 1)
+    endif(${QT_CORE_PRL} MATCHES "static")
+  endif(EXISTS ${QT_LIBRARY_DIR}/QtCore.prl)
+endif(WIN32)
+if(NOT QT_STATIC)
+  add_definitions(-DQT_DLL)
+endif(NOT QT_STATIC)
+
+add_definitions(-DQT_THREAD_SUPPORT)
+
+include_directories(
+  ${QT_INCLUDES}
+  ${QT_INCLUDE_DIR}
+  ${QT_QTGUI_INCLUDE_DIR}
+  ${QT_QTCORE_INCLUDE_DIR}
+  ${CMAKE_CURRENT_BINARY_DIR}
+  ${CMAKE_CURRENT_SOURCE_DIR}
+)
+endif()
 #=========================================================
 
 #=========================================================
@@ -213,8 +290,11 @@ endforeach(tool)
 #=========================================================
 #Add Foundation Libraries (this should be after our libraries, since we depend
 #on them)
-#set(foundationLibraries clitkCommon ${ITK_LIBRARIES} QVTK vtkHybrid)
+if(vv_QT_VERSION VERSION_GREATER "4")
 set(foundationLibraries clitkCommon ${ITK_LIBRARIES} ${VTK_LIBRARIES})
+else()
+set(foundationLibraries clitkCommon ${ITK_LIBRARIES} QVTK vtkHybrid)
+endif()
 
 #=========================================================
 # Use CxImage to create animated gifs
@@ -244,8 +324,11 @@ if(APPLE)
 endif()
 #=========================================================
 #Create binary and libs for tests
-#set(vvExternalLibs clitkSegmentationGgoLib ${toolLibs} ${foundationLibraries} ${vvCxImage} ${Qt5Widgets_LIBRARIES_DIRS} ${Qt5Network_LIBRARIES_DIRS} ${APPLE_FRAMEWORKS})
+if(vv_QT_VERSION VERSION_GREATER "4")
 set(vvExternalLibs clitkSegmentationGgoLib ${toolLibs} ${foundationLibraries} ${vvCxImage} Qt5::Widgets Qt5::Network Qt5::Designer ${APPLE_FRAMEWORKS})
+else()
+set(vvExternalLibs clitkSegmentationGgoLib ${toolLibs} ${foundationLibraries} ${vvCxImage} ${QT_LIBRARIES} ${QT_QTNETWORK_LIBRARY} ${APPLE_FRAMEWORKS})
+endif()
 # QtNetwork is required by vvRegisterForm
 
 add_library(vvLib ${vv_SRCS} ${vv_UI_CXX})
index 4e2bfb3a923e12650ec2e130c9955fa8c54733c8..29846633831e4baee3f4414d2b4a3b78f19504d8 100644 (file)
 #define VVINTENSITYVALUESLIDER_H
 
 // qt
+#if QT_VERSION < 0x050000
+#include <QtDesigner/QDesignerExportWidget>
+#else
 #include <QtUiPlugin/QDesignerExportWidget>
+#endif
 #include <QDialog>
 
 // clitk 
index ff7446440ad05db029614ace3795b500fa5fb407..94b591cc07643d19c18352f63334a78e9e524878 100644 (file)
 #include "vvImage.h"
 
 // qt
+#if QT_VERSION < 0x050000
+#include <QtDesigner/QDesignerExportWidget>
+#else
 #include <QtUiPlugin/QDesignerExportWidget>
+#endif
 #include <QDialog>
 #include "ui_vvLabelImageLoaderWidget.h"
 
index dab97ad8169474430be2415e38a415e5ffd81497..2d6057e9e9bed82217ec327ad3a70607589234c0 100644 (file)
@@ -20,7 +20,9 @@
 #include "vvRegisterForm.h"
 #include <QNetworkRequest>
 #include <QDir>
+#if QT_VERSION >= 0x050000
 #include <QUrlQuery>
+#endif
 #include <QPalette>
 #include "clitkConfiguration.h"
 #include "vvConfiguration.h"
@@ -34,6 +36,18 @@ vvRegisterForm::vvRegisterForm(QUrl url, QString path, QSettings::Format format)
 
 void vvRegisterForm::sendData(){
   QUrl url2(url);
+  
+#if QT_VERSION < 0x050000
+  url2.addQueryItem("name", firstName->text().toUtf8());
+  url2.addQueryItem("lastName", lastName->text().toUtf8());
+  url2.addQueryItem("email", email->text().toUtf8());
+  url2.addQueryItem("group", group->text().toUtf8());
+  url2.addQueryItem("os", OS_NAME);
+  url2.addQueryItem("vvVersion", VV_VERSION);
+  url2.addQueryItem("architecture", ARCHITECTURE);
+  url2.addQueryItem("adressing", QString::number(sizeof(char*)*8)+"-bit");
+  url2.addQueryItem("compilationDate", QString(__DATE__) + ", " + QString(__TIME__) );
+#else
   QUrlQuery url2Query;
     
   url2Query.addQueryItem("name", firstName->text().toUtf8());
@@ -46,6 +60,7 @@ void vvRegisterForm::sendData(){
   url2Query.addQueryItem("adressing", QString::number(sizeof(char*)*8)+"-bit");
   url2Query.addQueryItem("compilationDate", QString(__DATE__) + ", " + QString(__TIME__) );
   url2.setQuery(url2Query);
+#endif
   
   manager->get(QNetworkRequest(url2));
 }
index 07f1fdc23a2810ba6ff88d4386adf4d6dad27fb2..cf248d929f97a01d303f28c041de96c4bbb24878 100644 (file)
 #include "vtkPolyData.h"
 #include <vtkPolyDataMapper.h>
 
+#if QT_VERSION < 0x050000
+#include <QtDesigner/QDesignerExportWidget>
+#else
 #include <QtUiPlugin/QDesignerExportWidget>
+#endif
 #include <QTreeWidget>
 
 //====================================================================
index d7caa177fcdbd2853fa8230c563a9b0bb960f641..1bf7f13a780fb6c466e48fbe86d0bb0fc0278b1c 100644 (file)
@@ -1084,7 +1084,11 @@ void vvSlicer::UpdateDisplayExtent()
 
   // Local copy of extent
   int w_ext[6];
+#if VTK_MAJOR_VERSION <= 5
+  int* ext = GetExtent();
+#else
   int* ext = mImageReslice->GetOutputInformation(0)->Get(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT());
+#endif
   copyExtent(ext, w_ext);
   if (mUseReducedExtent) {
         copyExtent(mReducedExtent, w_ext);
@@ -1107,10 +1111,11 @@ void vvSlicer::UpdateDisplayExtent()
   if (mOverlay && mOverlayVisibility) {
     AdjustResliceToSliceOrientation(mOverlayReslice);
     int overExtent[6];
-    this->ConvertImageToImageDisplayExtent(mImageReslice->GetOutputInformation(0), w_ext, mOverlayReslice->GetOutput(), overExtent);
 #if VTK_MAJOR_VERSION <= 5
+    this->ConvertImageToImageDisplayExtent(input, w_ext, mOverlayReslice->GetOutput(), overExtent);
     bool out = ClipDisplayedExtent(overExtent, mOverlayMapper->GetInput()->GetWholeExtent());
 #else
+    this->ConvertImageToImageDisplayExtent(mImageReslice->GetOutputInformation(0), w_ext, mOverlayReslice->GetOutput(), overExtent);
     bool out = ClipDisplayedExtent(overExtent, mImage->GetVTKImages()[mCurrentTSlice]->GetInformation()->Get(vtkDataObject::DATA_EXTENT()));
 #endif
     mOverlayActor->SetVisibility(!out);
@@ -1127,10 +1132,11 @@ void vvSlicer::UpdateDisplayExtent()
   if (mFusion && mFusionVisibility) {
     AdjustResliceToSliceOrientation(mFusionReslice);
     int fusExtent[6];
-    this->ConvertImageToImageDisplayExtent(mImageReslice->GetOutputInformation(0), w_ext, mFusionReslice->GetOutput(), fusExtent);
 #if VTK_MAJOR_VERSION <= 5
+    this->ConvertImageToImageDisplayExtent(input, w_ext, mFusionReslice->GetOutput(), fusExtent);
     bool out = ClipDisplayedExtent(fusExtent, mFusionMapper->GetInput()->GetWholeExtent());
 #else
+    this->ConvertImageToImageDisplayExtent(mImageReslice->GetOutputInformation(0), w_ext, mFusionReslice->GetOutput(), fusExtent);
     bool out = ClipDisplayedExtent(fusExtent, mImage->GetVTKImages()[mCurrentTSlice]->GetInformation()->Get(vtkDataObject::DATA_EXTENT()));
 #endif
     mFusionActor->SetVisibility(!out);
@@ -1164,13 +1170,11 @@ void vvSlicer::UpdateDisplayExtent()
     int vfExtent[6];
 #if VTK_MAJOR_VERSION <= 5
     mVF->GetVTKImages()[0]->UpdateInformation();
+    this->ConvertImageToImageDisplayExtent(input, w_ext, mVF->GetVTKImages()[0], vfExtent);
+    bool out = ClipDisplayedExtent(vfExtent, mVOIFilter->GetInput()->GetWholeExtent());
 #else
     //this->UpdateInformation();
-#endif
     this->ConvertImageToImageDisplayExtent(mImageReslice->GetOutputInformation(0), w_ext, mVF->GetVTKImages()[0], vfExtent);
-#if VTK_MAJOR_VERSION <= 5
-    bool out = ClipDisplayedExtent(vfExtent, mVOIFilter->GetInput()->GetWholeExtent());
-#else
     bool out = ClipDisplayedExtent(vfExtent, mImage->GetVTKImages()[mCurrentTSlice]->GetInformation()->Get(vtkDataObject::DATA_EXTENT()));
 #endif
     mVFActor->SetVisibility(!out);
@@ -1251,6 +1255,29 @@ void vvSlicer::ConvertImageToImageDisplayExtent(vtkInformation *sourceImage, con
 }
 //----------------------------------------------------------------------------
 
+//----------------------------------------------------------------------------
+void vvSlicer::ConvertImageToImageDisplayExtent(vtkImageData *sourceImage, const int sourceExtent[6],
+                                                vtkImageData *targetImage, int targetExtent[6])
+{
+  double dExtents[6];
+  for(unsigned int i=0; i<6; i++) {
+    // From source voxel coordinates to world coordinates
+    dExtents[i] = sourceImage->GetOrigin()[i/2] + sourceImage->GetSpacing()[i/2] * sourceExtent[i];
+
+    // From world coordinates to floating point target voxel coordinates
+    dExtents[i] = (dExtents[i]- targetImage->GetOrigin()[i/2]) / targetImage->GetSpacing()[i/2];
+    
+    // Round to current slice or larger extent
+    if(i/2==this->GetOrientation())
+      targetExtent[i] = itk::Math::Round<double>(dExtents[i]);
+    else if(i%2==1)
+      targetExtent[i] = itk::Math::Ceil<double>(dExtents[i]);
+    else
+      targetExtent[i] = itk::Math::Floor<double>(dExtents[i]);
+  }
+}
+//----------------------------------------------------------------------------
+
 //----------------------------------------------------------------------------
 bool vvSlicer::ClipDisplayedExtent(int extent[6], int refExtent[6])
 { 
index 43e08541386109a9f0e0b0b520dae4b51f337ced..5b317b40c74b4df4c312e7d3bcd691a95388c03a 100644 (file)
@@ -288,6 +288,8 @@ private:
   void UpdateDisplayExtent();
   void ConvertImageToImageDisplayExtent(vtkInformation *sourceImage, const int sourceExtent[6],
                                         vtkImageData *targetImage, int targetExtent[6]);
+  void ConvertImageToImageDisplayExtent(vtkImageData *sourceImage, const int sourceExtent[6],
+                                        vtkImageData *targetImage, int targetExtent[6]);
   ///Sets the surfaces to be cut on the image slice: update the vtkCutter
   void SetContourSlice();
 
index fe9848ef77d6f91fab515ee98bf539566a5fdf9e..ff9f0be7a056f92aea349387c7fe0d982709261c 100644 (file)
@@ -23,7 +23,11 @@ class vtkPolyDataMapper;
 class vtkActor;
 class vtkOBJReader;
 
+#if QT_VERSION < 0x050000
+#include <QtDesigner/QDesignerExportWidget>
+#else
 #include <QtUiPlugin/QDesignerExportWidget>
+#endif
 #include <QTreeWidget>
 
 //====================================================================
index 5c47732a06b1905c88e493315d0a018fb212916d..0ab816e653b2f295945746a4a959877b1b70814c 100644 (file)
 #ifndef VVTOOLBINARIZE_H
 #define VVTOOLBINARIZE_H
 
+#if QT_VERSION < 0x050000
+#include <QtDesigner/QDesignerExportWidget>
+#else
 #include <QtUiPlugin/QDesignerExportWidget>
+#endif
 
 #include "vvToolBase.h"
 #include "vvToolWidgetBase.h"
index 2f2863091c2fe87fadac9b15465cd4e2c9361197..579ac8697b4b6f31540f83f04bcf5cc81c12f554 100644 (file)
 #define VVTOOLCROPIMAGE_H
 
 //qt
+#if QT_VERSION < 0x050000
+#include <QtDesigner/QDesignerExportWidget>
+#else
 #include <QtUiPlugin/QDesignerExportWidget>
+#endif
 #include <QDialog>
 #include <QSlider>
 // vv
index 93d79f468924a4d7961ad9cb39c58ef8c88e5e47..7e558f34d3fb1a605cc9fe30c9c9bf63a4603368 100644 (file)
 ===========================================================================**/
 #ifndef VVTOOLImageArithm_H
 #define VVTOOLImageArithm_H
+
+#if QT_VERSION < 0x050000
+#include <QtDesigner/QDesignerExportWidget>
+#else
 #include <QtUiPlugin/QDesignerExportWidget>
+#endif
 
 #include "vvToolBase.h"
 #include "vvToolWidgetBase.h"
index ab0e05b86de559ba8282b61f09fa7a8441f516c5..c0a492063584519ba58599aaf01ca7923703b1f9 100644 (file)
 #define VVTOOLINPUTSELECTORWIDGET_H
 
 // qt
+#if QT_VERSION < 0x050000
+#include <QtDesigner/QDesignerExportWidget>
+#else
 #include <QtUiPlugin/QDesignerExportWidget>
+#endif
 #include <QDialog>
 
 // vv
index 4691e2eb98dd713420ccf8d937fa579452898485..d3c6f7c7be74a921e59fd6d8b3242f21c686b7a1 100644 (file)
@@ -47,7 +47,11 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 #include <vvImage.h>
 
+#if QT_VERSION < 0x050000
+#include <QtDesigner/QDesignerExportWidget>
+#else
 #include <QtUiPlugin/QDesignerExportWidget>
+#endif
 #include "vvToolBase.h"
 #include "QWidget"
 #include "vvToolWidgetBase.h"
index ef99df034b616d103958cc27bb9ed072efb9e61c..ff8dafe13d0df11368566591c05a524c305e15ed 100644 (file)
 
   #ifndef VVTOOLMedianFilter_H
   #define VVTOOLMedianFilter_H
-
+  
+#if QT_VERSION < 0x050000
+  #include <QtDesigner/QDesignerExportWidget>
+#else
   #include <QtUiPlugin/QDesignerExportWidget>
+#endif
   #include "vvToolBase.h"
   #include "QWidget"
   #include "vvToolWidgetBase.h"
index 1f5d6c96ceb5ec077d68c5533f7990e4fb082df7..b17bd5cc819e3e89c9909b902ad28ee1e3078b32 100644 (file)
 #ifndef VVTOOLPROFILE_H
 #define VVTOOLPROFILE_H
 
+#if QT_VERSION < 0x050000
+#include <QtDesigner/QDesignerExportWidget>
+#else
 #include <QtUiPlugin/QDesignerExportWidget>
+#endif
 
 #include "vvToolBase.h"
 #include "vvToolWidgetBase.h"
index 1c5fa20a5ed2c94630dbc3572512edc249d2284e..5c93de359cfc1dc6f826d57a9406fbfbd65e9369 100644 (file)
 #ifndef VVTOOLROIMANAGER_H
 #define VVTOOLROIMANAGER_H
 
+#if QT_VERSION < 0x050000
+#include <QtDesigner/QDesignerExportWidget>
+#else
 #include <QtUiPlugin/QDesignerExportWidget>
+#endif
 #include <QSharedPointer>
 
 #include "vvToolBase.h"
index a522e3d53984442a5a43309f59286d746fb9af75..3cb12ef9a92200de7b54f4e7a94f725bdd5fbaab 100644 (file)
 #include "vvToolBase.h"
 
 // qt
+#if QT_VERSION < 0x050000
+#include <QtDesigner/QDesignerExportWidget>
+#else
 #include <QtUiPlugin/QDesignerExportWidget>
+#endif
 #include <QTreeWidget>
 
 //------------------------------------------------------------------------------
index 93b9f3f0162f7877452607cdeaaf27169ee3afb1..ba5eb5be0827ba6b077681313ab297edaa33f5b0 100644 (file)
 #ifndef VVTOOLSEGMENTATION_H
 #define VVTOOLSEGMENTATION_H
 
+#if QT_VERSION < 0x050000
+#include <QtDesigner/QDesignerExportWidget>
+#else
 #include <QtUiPlugin/QDesignerExportWidget>
+#endif
 
 #include "vvToolBase.h"
 #include "vvToolWidgetBase.h"
index d80f5bf911db5e6396483f2e7b7713bdbaaaf1f1..fccc7147a096c9002dc229ac7b60e01f469ec398 100644 (file)
 ===========================================================================**/
 #ifndef VVTOOLSIMPLEINPUTSELECTORWIDGET_H
 #define VVTOOLSIMPLEINPUTSELECTORWIDGET_H
+#if QT_VERSION < 0x050000
+#include <QtDesigner/QDesignerExportWidget>
+#else
 #include <QtUiPlugin/QDesignerExportWidget>
+#endif
 #include <QDialog>
 #include "ui_vvToolSimpleInputSelectorWidget.h"
 
index d9bd2f3322e992d202d7318ca39d6d97490bcb15..915600e478b96e677f4038745ab2bbbcd341db45 100644 (file)
 #ifndef VVTOOLWIDGETBASE_H
 #define VVTOOLWIDGETBASE_H
 
+#if QT_VERSION < 0x050000
+#include <QtDesigner/QDesignerExportWidget>
+#else
 #include <QtUiPlugin/QDesignerExportWidget>
+#endif
 #include "ui_vvToolWidgetBase.h"
 #include "clitkImageToImageGenericFilter.h"