]> Creatis software - clitk.git/commitdiff
Avoid Warnings with QtDesigner include and Qt5
authortbaudier <thomas.baudier@creatis.insa-lyon.fr>
Tue, 2 Feb 2016 13:10:25 +0000 (14:10 +0100)
committertbaudier <thomas.baudier@creatis.insa-lyon.fr>
Tue, 2 Feb 2016 13:10:25 +0000 (14:10 +0100)
In vvSlicerManager.cxx: Debug: when opening a second image, all slicer were updated, not only the first

17 files changed:
CMakeLists.txt
cmake/build_opt.cmake
vv/CMakeLists.txt
vv/vvIntensityValueSlider.h
vv/vvLabelImageLoaderWidget.h
vv/vvMainWindow.cxx
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/vvToolSegmentation.h
vv/vvToolSimpleInputSelectorWidget.h
vv/vvToolWidgetBase.h

index 8030908..f0ed562 100644 (file)
@@ -5,11 +5,17 @@ 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)
+    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)
+# Default build type
+IF(NOT CMAKE_BUILD_TYPE)
+  SET(CMAKE_BUILD_TYPE Release CACHE STRING
+    "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel."
+    FORCE)
+ENDIF(NOT CMAKE_BUILD_TYPE)
 #=========================================================
 
 set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
index 48ba5a6..2829401 100644 (file)
@@ -26,11 +26,11 @@ 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()
+ if(VTK_VERSION VERSION_LESS 6.0.0)
+    set(vv_QT_VERSION "4" CACHE INTERNAL "Expected Qt version")
+ else()
+    set(vv_QT_VERSION "5" CACHE INTERNAL "Expected Qt version")
+ endif()
 
   add_subdirectory(${CLITK_SOURCE_DIR}/vv ${PROJECT_BINARY_DIR}/vv)
 endif(CLITK_BUILD_VV)
index 3b72002..c49dae5 100644 (file)
@@ -4,7 +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)
+  cmake_policy(SET CMP0007 NEW)
 endif(COMMAND cmake_policy)
 #=========================================================
 
index 2984663..1055010 100644 (file)
@@ -19,6 +19,7 @@
 #define VVINTENSITYVALUESLIDER_H
 
 // qt
+#include <QtGlobal>
 #if QT_VERSION < 0x050000
 #include <QtDesigner/QDesignerExportWidget>
 #else
index 94b591c..3447dba 100644 (file)
@@ -23,6 +23,7 @@
 #include "vvImage.h"
 
 // qt
+#include <QtGlobal>
 #if QT_VERSION < 0x050000
 #include <QtDesigner/QDesignerExportWidget>
 #else
index 0dce60f..bd609b8 100644 (file)
@@ -1478,7 +1478,9 @@ void vvMainWindow::InitSlicers()
     mSlicerManagers.back()->SetSlicerWindow(1,NEViewWidget->GetRenderWindow());
     mSlicerManagers.back()->SetSlicerWindow(2,SOViewWidget->GetRenderWindow());
     mSlicerManagers.back()->SetSlicerWindow(3,SEViewWidget->GetRenderWindow());
-    mSlicerManagers.back()->Render(); // SR: displayed #slice is wrong without this
+#if VTK_MAJOR_VERSION <= 5
+    mSlicerManagers.back()->Render(); // SR: displayed #slice is wrong without this / TB: With VTK6 and multiple images, all slicers are updated, not only the first
+#endif
   }
 }
 
index 0ab816e..c0aa6d9 100644 (file)
@@ -18,6 +18,7 @@
 #ifndef VVTOOLBINARIZE_H
 #define VVTOOLBINARIZE_H
 
+#include <QtGlobal>
 #if QT_VERSION < 0x050000
 #include <QtDesigner/QDesignerExportWidget>
 #else
index 579ac86..11ee8de 100644 (file)
@@ -19,6 +19,7 @@
 #define VVTOOLCROPIMAGE_H
 
 //qt
+#include <QtGlobal>
 #if QT_VERSION < 0x050000
 #include <QtDesigner/QDesignerExportWidget>
 #else
index 7e558f3..e4f1b34 100644 (file)
@@ -18,6 +18,7 @@
 #ifndef VVTOOLImageArithm_H
 #define VVTOOLImageArithm_H
 
+#include <QtGlobal>
 #if QT_VERSION < 0x050000
 #include <QtDesigner/QDesignerExportWidget>
 #else
index c0a4920..4bc487f 100644 (file)
@@ -19,6 +19,7 @@
 #define VVTOOLINPUTSELECTORWIDGET_H
 
 // qt
+#include <QObject>
 #if QT_VERSION < 0x050000
 #include <QtDesigner/QDesignerExportWidget>
 #else
index d3c6f7c..8ee1410 100644 (file)
@@ -47,6 +47,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 #include <vvImage.h>
 
+#include <QtGlobal>
 #if QT_VERSION < 0x050000
 #include <QtDesigner/QDesignerExportWidget>
 #else
index ff8dafe..af2bbf8 100644 (file)
@@ -44,7 +44,8 @@
 
   #ifndef VVTOOLMedianFilter_H
   #define VVTOOLMedianFilter_H
-  
+
+#include <QtGlobal>
 #if QT_VERSION < 0x050000
   #include <QtDesigner/QDesignerExportWidget>
 #else
index b17bd5c..d59e803 100644 (file)
@@ -18,6 +18,7 @@
 #ifndef VVTOOLPROFILE_H
 #define VVTOOLPROFILE_H
 
+#include <QtGlobal>
 #if QT_VERSION < 0x050000
 #include <QtDesigner/QDesignerExportWidget>
 #else
index 5c93de3..c79fefc 100644 (file)
@@ -19,6 +19,7 @@
 #ifndef VVTOOLROIMANAGER_H
 #define VVTOOLROIMANAGER_H
 
+#include <QtGlobal>
 #if QT_VERSION < 0x050000
 #include <QtDesigner/QDesignerExportWidget>
 #else
index ba5eb5b..9e3180b 100644 (file)
@@ -18,6 +18,7 @@
 #ifndef VVTOOLSEGMENTATION_H
 #define VVTOOLSEGMENTATION_H
 
+#include <QtGlobal>
 #if QT_VERSION < 0x050000
 #include <QtDesigner/QDesignerExportWidget>
 #else
index fccc714..46040e4 100644 (file)
@@ -17,6 +17,8 @@
 ===========================================================================**/
 #ifndef VVTOOLSIMPLEINPUTSELECTORWIDGET_H
 #define VVTOOLSIMPLEINPUTSELECTORWIDGET_H
+
+#include <QtGlobal>
 #if QT_VERSION < 0x050000
 #include <QtDesigner/QDesignerExportWidget>
 #else
index 915600e..17daa2b 100644 (file)
@@ -19,6 +19,7 @@
 #ifndef VVTOOLWIDGETBASE_H
 #define VVTOOLWIDGETBASE_H
 
+#include <QtGlobal>
 #if QT_VERSION < 0x050000
 #include <QtDesigner/QDesignerExportWidget>
 #else