Commit e49ec609 authored by Utkarsh Ayachit's avatar Utkarsh Ayachit

Drop suppot for Qt 4.

parent 26c4f275
#------------------------------------------------------------------------------
# Add extra library containing custom code for the client.
include(ParaViewQt)
set(qt5_comps Widgets)
set(qt4_comps QtGui)
pv_find_package_qt(qt_targets REQUIRED QUIET
QT4_COMPONENTS ${qt4_comps}
QT5_COMPONENTS ${qt5_comps})
pv_find_package_qt(qt_targets REQUIRED QUIET QT5_COMPONENTS Widgets)
pv_qt_wrap_cpp(MOC_BUILT_SOURCES ParaViewMainWindow.h)
pv_qt_wrap_ui(UI_BUILT_SOURCES ParaViewMainWindow.ui)
include_directories(
......
......@@ -237,7 +237,6 @@ FUNCTION(build_paraview_client BPC_NAME)
INCLUDE(ParaViewQt)
pv_find_package_qt(qt_targets REQUIRED QUIET
QT4_COMPONENTS QtGui
QT5_COMPONENTS Widgets)
pv_qt_add_resources(rcs_sources ${ui_resources})
......
......@@ -278,11 +278,7 @@ function(__add_paraview_property_widget outifaces outsrcs)
@ONLY)
set (_moc_srcs)
if (PARAVIEW_QT_VERSION VERSION_GREATER "4")
qt5_wrap_cpp(_moc_srcs ${CMAKE_CURRENT_BINARY_DIR}/${name}Implementation.h)
else ()
qt4_wrap_cpp(_moc_srcs ${CMAKE_CURRENT_BINARY_DIR}/${name}Implementation.h)
endif ()
qt5_wrap_cpp(_moc_srcs ${CMAKE_CURRENT_BINARY_DIR}/${name}Implementation.h)
set (${outifaces} ${name} PARENT_SCOPE)
set (${outsrcs}
${_moc_srcs}
......@@ -376,11 +372,7 @@ macro(add_pqproxy OUTIFACES OUTSRCS)
${CMAKE_CURRENT_BINARY_DIR}/${IMP_CLASS}.cxx @ONLY)
set (_moc_srcs)
if (PARAVIEW_QT_VERSION VERSION_GREATER "4")
QT5_WRAP_CPP(_moc_srcs ${CMAKE_CURRENT_BINARY_DIR}/${IMP_CLASS}.h)
else()
QT4_WRAP_CPP(_moc_srcs ${CMAKE_CURRENT_BINARY_DIR}/${IMP_CLASS}.h)
endif()
QT5_WRAP_CPP(_moc_srcs ${CMAKE_CURRENT_BINARY_DIR}/${IMP_CLASS}.h)
set(${OUTIFACES} ${${OUTIFACES}} ${ARG_TYPE}ServerManagerModel) # don't add
# the extra "Implementation" here.
......@@ -448,11 +440,7 @@ MACRO(ADD_PARAVIEW_ACTION_GROUP OUTIFACES OUTSRCS)
${CMAKE_CURRENT_BINARY_DIR}/${ARG_CLASS_NAME}Implementation.cxx @ONLY)
SET(ACTION_MOC_SRCS)
IF (PARAVIEW_QT_VERSION VERSION_GREATER "4")
QT5_WRAP_CPP(ACTION_MOC_SRCS ${CMAKE_CURRENT_BINARY_DIR}/${ARG_CLASS_NAME}Implementation.h)
ELSE ()
QT4_WRAP_CPP(ACTION_MOC_SRCS ${CMAKE_CURRENT_BINARY_DIR}/${ARG_CLASS_NAME}Implementation.h)
ENDIF ()
QT5_WRAP_CPP(ACTION_MOC_SRCS ${CMAKE_CURRENT_BINARY_DIR}/${ARG_CLASS_NAME}Implementation.h)
SET(${OUTSRCS}
${CMAKE_CURRENT_BINARY_DIR}/${ARG_CLASS_NAME}Implementation.cxx
......@@ -480,11 +468,7 @@ MACRO(ADD_PARAVIEW_VIEW_FRAME_ACTION_GROUP OUTIFACES OUTSRCS)
${CMAKE_CURRENT_BINARY_DIR}/${ARG_CLASS_NAME}Implementation.cxx @ONLY)
SET(ACTION_MOC_SRCS)
IF (PARAVIEW_QT_VERSION VERSION_GREATER "4")
QT5_WRAP_CPP(ACTION_MOC_SRCS ${CMAKE_CURRENT_BINARY_DIR}/${ARG_CLASS_NAME}Implementation.h)
ELSE ()
QT4_WRAP_CPP(ACTION_MOC_SRCS ${CMAKE_CURRENT_BINARY_DIR}/${ARG_CLASS_NAME}Implementation.h)
ENDIF ()
QT5_WRAP_CPP(ACTION_MOC_SRCS ${CMAKE_CURRENT_BINARY_DIR}/${ARG_CLASS_NAME}Implementation.h)
SET(${OUTSRCS}
${CMAKE_CURRENT_BINARY_DIR}/${ARG_CLASS_NAME}Implementation.cxx
......@@ -520,11 +504,7 @@ MACRO(ADD_PARAVIEW_DOCK_WINDOW OUTIFACES OUTSRCS)
${CMAKE_CURRENT_BINARY_DIR}/${ARG_CLASS_NAME}Implementation.cxx @ONLY)
SET(ACTION_MOC_SRCS)
IF (PARAVIEW_QT_VERSION VERSION_GREATER "4")
QT5_WRAP_CPP(ACTION_MOC_SRCS ${CMAKE_CURRENT_BINARY_DIR}/${ARG_CLASS_NAME}Implementation.h)
ELSE ()
QT4_WRAP_CPP(ACTION_MOC_SRCS ${CMAKE_CURRENT_BINARY_DIR}/${ARG_CLASS_NAME}Implementation.h)
ENDIF ()
QT5_WRAP_CPP(ACTION_MOC_SRCS ${CMAKE_CURRENT_BINARY_DIR}/${ARG_CLASS_NAME}Implementation.h)
SET(${OUTSRCS}
${CMAKE_CURRENT_BINARY_DIR}/${ARG_CLASS_NAME}Implementation.cxx
......@@ -569,11 +549,7 @@ MACRO(ADD_PARAVIEW_AUTO_START OUTIFACES OUTSRCS)
${CMAKE_CURRENT_BINARY_DIR}/${ARG_CLASS_NAME}Implementation.cxx @ONLY)
SET(ACTION_MOC_SRCS)
IF (PARAVIEW_QT_VERSION VERSION_GREATER "4")
QT5_WRAP_CPP(ACTION_MOC_SRCS ${CMAKE_CURRENT_BINARY_DIR}/${ARG_CLASS_NAME}Implementation.h)
ELSE ()
QT4_WRAP_CPP(ACTION_MOC_SRCS ${CMAKE_CURRENT_BINARY_DIR}/${ARG_CLASS_NAME}Implementation.h)
ENDIF ()
QT5_WRAP_CPP(ACTION_MOC_SRCS ${CMAKE_CURRENT_BINARY_DIR}/${ARG_CLASS_NAME}Implementation.h)
SET(${OUTSRCS}
${CMAKE_CURRENT_BINARY_DIR}/${ARG_CLASS_NAME}Implementation.cxx
......@@ -629,11 +605,7 @@ MACRO(ADD_PARAVIEW_GRAPH_LAYOUT_STRATEGY OUTIFACES OUTSRCS)
${CMAKE_CURRENT_BINARY_DIR}/${ARG_STRATEGY_TYPE}Implementation.cxx @ONLY)
SET(LAYOUT_MOC_SRCS)
IF (PARAVIEW_QT_VERSION VERSION_GREATER "4")
QT5_WRAP_CPP(LAYOUT_MOC_SRCS ${CMAKE_CURRENT_BINARY_DIR}/${ARG_STRATEGY_TYPE}Implementation.h)
ELSE ()
QT4_WRAP_CPP(LAYOUT_MOC_SRCS ${CMAKE_CURRENT_BINARY_DIR}/${ARG_STRATEGY_TYPE}Implementation.h)
ENDIF ()
QT5_WRAP_CPP(LAYOUT_MOC_SRCS ${CMAKE_CURRENT_BINARY_DIR}/${ARG_STRATEGY_TYPE}Implementation.h)
SET(${OUTSRCS}
${CMAKE_CURRENT_BINARY_DIR}/${ARG_STRATEGY_TYPE}Implementation.cxx
......@@ -665,11 +637,7 @@ MACRO(ADD_PARAVIEW_TREE_LAYOUT_STRATEGY OUTIFACES OUTSRCS)
${CMAKE_CURRENT_BINARY_DIR}/${ARG_STRATEGY_TYPE}Implementation.cxx @ONLY)
SET(LAYOUT_MOC_SRCS)
IF (PARAVIEW_QT_VERSION VERSION_GREATER "4")
QT5_WRAP_CPP(LAYOUT_MOC_SRCS ${CMAKE_CURRENT_BINARY_DIR}/${ARG_STRATEGY_TYPE}Implementation.h)
ELSE ()
QT4_WRAP_CPP(LAYOUT_MOC_SRCS ${CMAKE_CURRENT_BINARY_DIR}/${ARG_STRATEGY_TYPE}Implementation.h)
ENDIF ()
QT5_WRAP_CPP(LAYOUT_MOC_SRCS ${CMAKE_CURRENT_BINARY_DIR}/${ARG_STRATEGY_TYPE}Implementation.h)
SET(${OUTSRCS}
${CMAKE_CURRENT_BINARY_DIR}/${ARG_STRATEGY_TYPE}Implementation.cxx
......@@ -931,17 +899,12 @@ FUNCTION(ADD_PARAVIEW_PLUGIN NAME VERSION)
endif()
IF(GUI_SRCS OR SM_SRCS OR ARG_SOURCES OR ARG_PYTHON_MODULES)
if(PARAVIEW_QT_VERSION VERSION_GREATER "4")
else()
set(plugin_type_gui_qt4 TRUE)
endif()
CONFIGURE_FILE(
${ParaView_CMAKE_DIR}/pqParaViewPlugin.h.in
${CMAKE_CURRENT_BINARY_DIR}/${PLUGIN_NAME}_Plugin.h @ONLY)
CONFIGURE_FILE(
${ParaView_CMAKE_DIR}/pqParaViewPlugin.cxx.in
${CMAKE_CURRENT_BINARY_DIR}/${PLUGIN_NAME}_Plugin.cxx @ONLY)
unset(plugin_type_gui_qt4)
SET (plugin_sources
${CMAKE_CURRENT_BINARY_DIR}/${PLUGIN_NAME}_Plugin.cxx
......@@ -949,11 +912,7 @@ FUNCTION(ADD_PARAVIEW_PLUGIN NAME VERSION)
)
IF (plugin_type_gui)
set (__plugin_sources_tmp)
IF (PARAVIEW_QT_VERSION VERSION_GREATER "4")
QT5_WRAP_CPP(__plugin_sources_tmp ${CMAKE_CURRENT_BINARY_DIR}/${PLUGIN_NAME}_Plugin.h)
ELSE ()
QT4_WRAP_CPP(__plugin_sources_tmp ${CMAKE_CURRENT_BINARY_DIR}/${PLUGIN_NAME}_Plugin.h)
ENDIF ()
QT5_WRAP_CPP(__plugin_sources_tmp ${CMAKE_CURRENT_BINARY_DIR}/${PLUGIN_NAME}_Plugin.h)
SET (plugin_sources ${plugin_sources} ${__plugin_sources_tmp})
ENDIF ()
......
# This module makes it easier to find and import appropriate Qt modules based
# on PARAVIEW_QT_VERSION.
# This was more useful when we supported Qt 4 and Qt 5 together. Now it's merely here
# to support Qt 5. We leave it around since it may make it easier when moving on to
# future major Qt releases.
#------------------------------------------------------------------------------
# Instead of doing find_package(Qt4) or find_package(Qt5), use this macro to
# find an appropriate version based on PARAVIEW_QT_VERSION specified.
# Instead of doing `find_package(Qt5)`, use this macro to
# find an appropriate version based on PARAVIEW_QT_VERSION specified (which is currently
# forced to 5).
# You can pass all arguments typically passed to the find_package() call with
# following exceptions:
# - The first argument is a variable name that gets set to the list of targets
# imported from the appropriate Qt package.
# - Do not pass a version number. That will not be processed correctly. The
# version number is determined by this macro itself.
# - Do not use COMPONENTS or OPTIONAL_COMPONENTS instead, use QT4_COMPONENTS,
# QT4_OPTIONAL_COMPONENTS and QT5_COMPONENTS, QT5_COMPONENTS to separately
# specify the components to use for Qt4 and Qt5.
# - Do not use COMPONENTS or OPTIONAL_COMPONENTS instead, use
# QT5_COMPONENTS, QT5_COMPONENTS to specify the components to use for Qt5.
macro(pv_find_package_qt out_targets_var)
if(NOT DEFINED PARAVIEW_QT_VERSION)
set(PARAVIEW_QT_VERSION "5")
if (DEFINED PARAVIEW_QT_VERSION AND PARAVIEW_QT_VERSION VERSION_LESS 5)
message(WARNING "ParaView no longer supports ${PARAVIEW_QT_VERSION}. Forcing Qt version to 5.*.")
endif()
set(PARAVIEW_QT_VERSION 5)
set(qt4_components)
set(qt5_components)
set(qt4_optional_components)
......@@ -45,53 +49,31 @@ macro(pv_find_package_qt out_targets_var)
list(APPEND other_args "${arg}")
endif()
endforeach()
if(NOT (qt4_components OR qt5_components OR qt4_optional_components OR qt5_optional_components))
if(NOT qt5_components AND NOT qt5_optional_components)
message(FATAL_ERROR "Components must be specified to find Qt correctly.")
endif()
if (qt4_components OR qt4_optional_components)
message(AUTHOR_WARNING "Qt 4 components can be dropped since Qt 4 is no longer supported.")
endif()
set(_qt_targets)
if(PARAVIEW_QT_VERSION VERSION_GREATER "4")
set(_qt_var_prefix Qt5)
set(_qt_min_version "5.6")
set(_qt_official_version "5.6")
set(args)
if(qt5_components)
set(args ${args} COMPONENTS ${qt5_components})
endif()
if(qt5_optional_components)
set(args ${args} OPTIONAL_COMPONENTS ${qt5_optional_components})
endif()
find_package(Qt5 ${_qt_min_version} ${args} ${other_args})
set(_qt_version ${Qt5_VERSION})
foreach(comp IN LISTS qt5_components qt5_optional_components)
if(TARGET Qt5::${comp})
list(APPEND _qt_targets "Qt5::${comp}")
endif()
endforeach()
else()
set(_qt_var_prefix Qt4)
set(_qt_min_version "4.7")
set(_qt_official_version "4.8")
set(args)
if(qt4_components)
set(args COMPONENTS ${qt4_components})
endif()
if(qt4_optional_components)
set(arg OPTIONAL_COMPONENTS ${qt4_optional_components})
endif()
#---------------------------------------------------------
set(QT_USE_IMPORTED_TARGETS TRUE)
find_package(Qt4 ${_qt_min_version} ${args} ${other_args})
set(_qt_version ${QTVERSION})
foreach(comp IN LISTS qt4_components qt4_optional_components)
if(TARGET Qt4::${comp})
list(APPEND _qt_targets "Qt4::${comp}")
endif()
endforeach()
set(_qt_var_prefix Qt5)
set(_qt_min_version "5.6")
set(_qt_official_version "5.9")
set(args)
if(qt5_components)
set(args ${args} COMPONENTS ${qt5_components})
endif()
if(qt5_optional_components)
set(args ${args} OPTIONAL_COMPONENTS ${qt5_optional_components})
endif()
find_package(Qt5 ${_qt_min_version} ${args} ${other_args})
set(_qt_version ${Qt5_VERSION})
foreach(comp IN LISTS qt5_components qt5_optional_components)
if(TARGET Qt5::${comp})
list(APPEND _qt_targets "Qt5::${comp}")
endif()
endforeach()
# Warn is Qt version is less than the official version.
if(_qt_version VERSION_LESS _qt_official_version)
......@@ -104,25 +86,13 @@ macro(pv_find_package_qt out_targets_var)
endmacro()
macro(pv_qt_wrap_cpp)
if(PARAVIEW_QT_VERSION VERSION_GREATER "4")
qt5_wrap_cpp(${ARGN})
else()
qt4_wrap_cpp(${ARGN})
endif()
qt5_wrap_cpp(${ARGN})
endmacro()
macro(pv_qt_wrap_ui)
if(PARAVIEW_QT_VERSION VERSION_GREATER "4")
qt5_wrap_ui(${ARGN})
else()
qt4_wrap_ui(${ARGN})
endif()
qt5_wrap_ui(${ARGN})
endmacro()
macro(pv_qt_add_resources)
if(PARAVIEW_QT_VERSION VERSION_GREATER "4")
qt5_add_resources(${ARGN})
else()
qt4_add_resources(${ARGN})
endif()
qt5_add_resources(${ARGN})
endmacro()
This diff is collapsed.
......@@ -36,16 +36,6 @@ include (ParaViewPlugins)
include (ParaViewBranding)
include (ParaViewQt)
if(PARAVIEW_ENABLE_QT_SUPPORT)
if(PARAVIEW_QT_VERSION VERSION_GREATER "4")
# nothing to do. the module system handles it properly.
else()
set(QT_QMAKE_EXECUTABLE "${PARAVIEW_QT_QMAKE_EXECUTABLE}" CACHE FILEPATH "Qt4 qmake executable")
pv_find_package_qt(__tmp_qt_targets QT4_COMPONENTS QtGui)
unset(__tmp_qt_targets)
endif()
endif()
# Workaround for MPICH bug that produces error messages:
# "SEEK_SET is #defined but must not be for the C++ binding of MPI.
if (PARAVIEW_USE_MPI)
......
......@@ -73,15 +73,8 @@ static bool checkenv(const char* vname)
int main(int argc, char* argv[])
{
#if defined(Q_WS_X11) || defined(Q_OS_LINUX)
// Using motif style gives us test failures (and its ugly).
// Using cleanlooks style gives us errors when using valgrind (Trolltech's bug #179200)
// let's just use plastique for now
// "plastique" is only available on Qt4, but this works just fine with Qt5 too. Qt5 just uses the
// default style when QStyleFactory::create("plastique") return nullptr.
QApplication::setStyle(QStyleFactory::create("plastique"));
#endif
// Here's the point to change default style, if you'd like e.g.
// QApplication::setStyle(QStyleFactory::create("plastique"));
// When playing tests, disable all effects.
if (checkenv("DART_TEST_FROM_DART") ||
......
......@@ -177,13 +177,8 @@ void @PLUGIN_NAME@_Plugin::GetPythonSourceList(std::vector<std::string>& modules
#if !defined(BUILD_SHARED_LIBS) && defined(plugin_type_gui)
// For static builds, initialize the Qt resources as well as the Qt plugin.
@QRC_RESOURCES_INIT@
#ifdef plugin_type_gui_qt4
// Qt 4
Q_IMPORT_PLUGIN(@PLUGIN_NAME@)
#else
// Qt 5
Q_IMPORT_PLUGIN(@PLUGIN_NAME@_Plugin)
#endif
#endif
}
......@@ -191,9 +186,3 @@ void @PLUGIN_NAME@_Plugin::GetPythonSourceList(std::vector<std::string>& modules
//-----------------------------------------------------------------------------
// Mark this as a ParaView-ServerManager plugin.
PV_PLUGIN_EXPORT(@PLUGIN_NAME@, @PLUGIN_NAME@_Plugin)
//-----------------------------------------------------------------------------
#if defined(plugin_type_gui) && defined(plugin_type_gui_qt4)
// Required to mark this as a Qt plugin.
Q_EXPORT_PLUGIN2(@PLUGIN_NAME@, @PLUGIN_NAME@_Plugin)
#endif
......@@ -36,11 +36,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#cmakedefine plugin_type_servermanager
#cmakedefine plugin_type_gui
// We can't check QT_VERSION in the header since its not defined when moc
// is run. Hence we rely on this variable to tell us that we're building
// for Qt4.
#cmakedefine plugin_type_gui_qt4
/// this is set when the plugin has source headers that are wrapped.
#cmakedefine INITIALIZE_WRAPPING
#cmakedefine INITIALIZE_EXTRA_CS_MODULES
......@@ -81,10 +76,7 @@ class @PLUGIN_NAME@_Plugin :
#ifdef plugin_type_gui
Q_OBJECT
Q_INTERFACES(vtkPVGUIPluginInterface)
#ifndef plugin_type_gui_qt4
// Qt 5 only
Q_PLUGIN_METADATA(IID "com.kitware/paraview/@PLUGIN_NAME@_Plugin")
#endif
//#endif
#endif
public:
......
......@@ -495,12 +495,11 @@ if (PARAVIEW_BUILD_QT_GUI)
list (APPEND pqApplicationComponents_REQUEST_BY "Option PARAVIEW_BUILD_QT_GUI")
if (APPLE)
# Enable high resolution when using Qt5, disable it when using Qt4
if (${PARAVIEW_QT_VERSION} EQUAL 5)
set(MAC_HIGH_RESOLUTION_CAPABLE "true")
else()
set(MAC_HIGH_RESOLUTION_CAPABLE "false")
endif()
# Enable high resolution when using Qt5
# This configuring of MacOSXBundleInfo may no longer be needed, but I am
# leaving it in since in future we could build the supported extensions list
# more exhaustively here.
set(MAC_HIGH_RESOLUTION_CAPABLE "true")
file(MAKE_DIRECTORY ${ParaView_CMAKE_BINARY_DIR})
configure_file(
"${ParaView_CMAKE_DIR}/MacOSXBundleInfo.plist.in.in"
......
......@@ -20,22 +20,12 @@ endif()
# include rules for creating custom applications.
include(ParaViewBranding)
pv_find_package_qt(qt_targets
QT4_COMPONENTS QtGui
QT5_COMPONENTS Widgets)
#------------------------------------------------------------------------------
# Add extra library containing custom code for the client.
IF (PARAVIEW_QT_VERSION VERSION_GREATER "4")
QT5_WRAP_CPP(MOC_BUILT_SOURCES
myMainWindow.h)
QT5_WRAP_UI(UI_BUILT_SOURCES
myMainWindow.ui)
ELSE ()
QT4_WRAP_CPP(MOC_BUILT_SOURCES
myMainWindow.h)
QT4_WRAP_UI(UI_BUILT_SOURCES
myMainWindow.ui)
ENDIF ()
pv_qt_wrap_cpp(MOC_BUILT_SOURCES myMainWindow.h)
pv_qt_wrap_ui(UI_BUILT_SOURCES myMainWindow.ui)
SOURCE_GROUP("Generated" FILES
${MOC_BUILT_SOURCES}
......
......@@ -22,17 +22,8 @@ endif()
#------------------------------------------------------------------------------
# Add extra library containing custom code for the client.
IF (PARAVIEW_QT_VERSION VERSION_GREATER "4")
QT5_WRAP_CPP(MOC_BUILT_SOURCES
myMainWindow.h)
QT5_WRAP_UI(UI_BUILT_SOURCES
myMainWindow.ui)
ELSE ()
QT4_WRAP_CPP(MOC_BUILT_SOURCES
myMainWindow.h)
QT4_WRAP_UI(UI_BUILT_SOURCES
myMainWindow.ui)
ENDIF ()
pv_qt_wrap_cpp(MOC_BUILT_SOURCES myMainWindow.h)
pv_qt_wrap_ui(UI_BUILT_SOURCES myMainWindow.ui)
SOURCE_GROUP("Generated" FILES
${MOC_BUILT_SOURCES}
......@@ -52,7 +43,7 @@ INCLUDE_DIRECTORIES(
build_paraview_client(paraview_revised_2
TITLE "ParaView (ReVisEd)"
ORGANIZATION "Kitware Inc."
VERSION_MAJOR 1
VERSION_MAJOR 1
VERSION_MINOR 1
VERSION_PATCH 1
# SPLASH_IMAGE "${CMAKE_CURRENT_SOURCE_DIR}/RSplash.png"
......
......@@ -23,21 +23,8 @@ SET (SOURCE_FILES
myMainWindow.h
)
if (PARAVIEW_QT_VERSION VERSION_GREATER "4")
QT5_WRAP_CPP(MOC_SRCS
myMainWindow.h
)
QT5_WRAP_UI(UI_BUILT_SOURCES
myMainWindow.ui
)
else ()
QT4_WRAP_CPP(MOC_SRCS
myMainWindow.h
)
QT4_WRAP_UI(UI_BUILT_SOURCES
myMainWindow.ui
)
endif ()
pv_qt_wrap_cpp(MOC_SRCS myMainWindow.h)
pv_qt_wrap_ui(UI_BUILT_SOURCES myMainWindow.ui)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
......
......@@ -53,21 +53,8 @@ SET (SOURCE_FILES
MultiServerClientMainWindow.h
)
if (PARAVIEW_QT_VERSION VERSION_GREATER "4")
QT5_WRAP_CPP(MOC_SRCS
MultiServerClientMainWindow.h
)
QT5_WRAP_UI(UI_BUILT_SOURCES
MultiServerClientMainWindow.ui
)
else ()
QT4_WRAP_CPP(MOC_SRCS
MultiServerClientMainWindow.h
)
QT4_WRAP_UI(UI_BUILT_SOURCES
MultiServerClientMainWindow.ui
)
endif ()
pv_qt_wrap_cpp(MOC_SRCS MultiServerClientMainWindow.h)
pv_qt_wrap_ui(UI_BUILT_SOURCES MultiServerClientMainWindow.ui)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
......
......@@ -25,21 +25,8 @@ SET (SOURCE_FILES
SpreadSheetMainWindow.h
)
IF (PARAVIEW_QT_VERSION VERSION_GREATER "4")
QT5_WRAP_CPP(MOC_SRCS
SpreadSheetMainWindow.h
)
QT5_WRAP_UI(UI_BUILT_SOURCES
SpreadSheetMainWindow.ui
)
ELSE ()
QT4_WRAP_CPP(MOC_SRCS
SpreadSheetMainWindow.h
)
QT4_WRAP_UI(UI_BUILT_SOURCES
SpreadSheetMainWindow.ui
)
ENDIF ()
pv_qt_wrap_cpp(MOC_SRCS SpreadSheetMainWindow.h)
pv_qt_wrap_ui(UI_BUILT_SOURCES SpreadSheetMainWindow.ui)
##########################################################################
## Add resources (icons etc.)
......@@ -47,15 +34,7 @@ SET (UI_RESOURCES
SpreadSheet.qrc
)
IF (PARAVIEW_QT_VERSION VERSION_GREATER "4")
QT5_ADD_RESOURCES(RCS_BUILT_SOURCES
${UI_RESOURCES}
)
ELSE ()
QT4_ADD_RESOURCES(RCS_BUILT_SOURCES
${UI_RESOURCES}
)
ENDIF ()
pv_qt_add_resources(RCS_BUILT_SOURCES ${UI_RESOURCES})
SOURCE_GROUP("Resources" FILES
${UI_RESOURCES})
......
......@@ -15,11 +15,7 @@ if(NOT DEFINED CMAKE_MACOSX_RPATH)
set(CMAKE_MACOSX_RPATH 0)
endif()
IF (PARAVIEW_QT_VERSION VERSION_GREATER "4")
QT5_WRAP_CPP(MOC_SRCS pqMyApplicationStarter.h)
ELSE ()
QT4_WRAP_CPP(MOC_SRCS pqMyApplicationStarter.h)
ENDIF ()
QT5_WRAP_CPP(MOC_SRCS pqMyApplicationStarter.h)
ADD_PARAVIEW_AUTO_START(IFACES IFACE_SRCS CLASS_NAME pqMyApplicationStarter
STARTUP onStartup
......
......@@ -17,14 +17,8 @@ if(NOT DEFINED CMAKE_MACOSX_RPATH)
endif()
IF(PARAVIEW_BUILD_QT_GUI)
IF (PARAVIEW_QT_VERSION VERSION_GREATER "4")
QT5_WRAP_CPP(MOC_SRCS ExampleDockPanel.h)
QT5_WRAP_UI(UI_SRCS ExampleDockPanel.ui)
ELSE ()
QT4_WRAP_CPP(MOC_SRCS ExampleDockPanel.h)
QT4_WRAP_UI(UI_SRCS ExampleDockPanel.ui)
ENDIF ()
QT5_WRAP_CPP(MOC_SRCS ExampleDockPanel.h)
QT5_WRAP_UI(UI_SRCS ExampleDockPanel.ui)
ADD_PARAVIEW_DOCK_WINDOW(
OUTIFACES
OUTSRCS
......
......@@ -16,11 +16,7 @@ if(NOT DEFINED CMAKE_MACOSX_RPATH)
endif()
IF(PARAVIEW_BUILD_QT_GUI)
IF (PARAVIEW_QT_VERSION VERSION_GREATER "4")
QT5_WRAP_CPP(MOC_SRCS MyToolBarActions.h)
ELSE ()
QT4_WRAP_CPP(MOC_SRCS MyToolBarActions.h)
ENDIF ()
QT5_WRAP_CPP(MOC_SRCS MyToolBarActions.h)
# we implement a pqConePanel.h for the ConeSource
ADD_PARAVIEW_ACTION_GROUP(IFACES IFACE_SRCS CLASS_NAME MyToolBarActions
......
......@@ -15,17 +15,10 @@ if(NOT DEFINED CMAKE_MACOSX_RPATH)
endif()
if (PARAVIEW_BUILD_QT_GUI)
if (PARAVIEW_QT_VERSION VERSION_GREATER "4")
qt5_wrap_cpp(moc_srcs
pqMyPropertyWidgetForProperty.h
pqMyPropertyWidgetForGroup.h
pqMyPropertyWidgetDecorator.h)
else ()
qt4_wrap_cpp(moc_srcs
pqMyPropertyWidgetForProperty.h
pqMyPropertyWidgetForGroup.h
pqMyPropertyWidgetDecorator.h)
endif ()
qt5_wrap_cpp(moc_srcs
pqMyPropertyWidgetForProperty.h
pqMyPropertyWidgetForGroup.h
pqMyPropertyWidgetDecorator.h)
set (outifaces0)
set (outsrcs0)
......
......@@ -17,15 +17,9 @@ if(NOT DEFINED CMAKE_MACOSX_RPATH)
set(CMAKE_MACOSX_RPATH 0)
endif()
IF (PARAVIEW_QT_VERSION VERSION_GREATER "4")
QT5_WRAP_CPP(MOC_SRCS
pqRepresentationBehaviorStarter.h
pqSurfaceRepresentationBehavior.h)
ELSE ()
QT4_WRAP_CPP(MOC_SRCS
pqRepresentationBehaviorStarter.h
pqSurfaceRepresentationBehavior.h)
ENDIF ()
QT5_WRAP_CPP(MOC_SRCS
pqRepresentationBehaviorStarter.h
pqSurfaceRepresentationBehavior.h)
ADD_PARAVIEW_AUTO_START(
IFACES
......
......@@ -16,11 +16,7 @@ endif()
IF(PARAVIEW_BUILD_QT_GUI)
# We need to wrap for Qt stuff such as signals/slots etc. to work correctly.
IF (PARAVIEW_QT_VERSION VERSION_GREATER "4")
QT5_WRAP_CPP(MOC_SRCS SourceToolbarActions.h)
ELSE ()
QT4_WRAP_CPP(MOC_SRCS SourceToolbarActions.h)
ENDIF ()
QT5_WRAP_CPP(MOC_SRCS SourceToolbarActions.h)
# This is a macro for adding QActionGroup subclasses automatically as toolbars.
ADD_PARAVIEW_ACTION_GROUP(IFACES IFACE_SRCS
......
......@@ -2,7 +2,7 @@
# ParaView ServerManager Unit Tests
if (PARAVIEW_ENABLE_QT_SUPPORT)
include(ParaViewQt)
pv_find_package_qt(qt_targets REQUIRED QT4_COMPONENTS QtTest QT5_COMPONENTS Test)
pv_find_package_qt(qt_targets REQUIRED QT5_COMPONENTS Test)
set(UNITTESTS
SMProxy
SMProxyLink
......
......@@ -20,7 +20,7 @@ SET (CP_SOURCES
pqCPPluginManager.h
)
include(ParaViewQt)
pv_find_package_qt(qt_targets REQUIRED QT4_COMPONENTS QtGui QT5_COMPONENTS Widgets)
pv_find_package_qt(qt_targets REQUIRED QT5_COMPONENTS Widgets)
pv_qt_wrap_cpp(MOC_SRCS
pqCPExportStateWizard.h
......
......@@ -2,7 +2,6 @@ include_directories(${VTK_INCLUDE_DIRS})
if (PARAVIEW_BUILD_QT_GUI)
pv_find_package_qt(qt_targets REQUIRED QUIET
QT4_COMPONENTS QtGui
QT5_COMPONENTS Widgets)
pv_qt_wrap_cpp(MOC_SRCS
......
......@@ -6,7 +6,6 @@ if(PARAVIEW_BUILD_QT_GUI)
pqRemoteControlThread.cxx)
pv_find_package_qt(qt_targets REQUIRED QUIET
QT4_COMPONENTS QtGui QtNetwork
QT5_COMPONENTS Widgets Network)
pv_qt_wrap_cpp(MOC_SRCS pqRemoteControl.h pqRemoteControlThread.h)
......
......@@ -7,7 +7,6 @@ set(sources)
if(PARAVIEW_BUILD_QT_GUI)
pv_find_package_qt(qt_targets REQUIRED QUIET
QT4_COMPONENTS QtGui
QT5_COMPONENTS Widgets)
pv_qt_wrap_cpp(MOC_SRCS pqNonOrthogonalAutoStart.h)
add_paraview_auto_start(IFACES IFACE_SRCS
......
......@@ -8,7 +8,7 @@ else()
endif()
include(ParaViewQt)
pv_find_package_qt(qt_targets REQUIRED QT4_COMPONENTS QtGui QT5_COMPONENTS Widgets)
pv_find_package_qt(qt_targets REQUIRED QT5_COMPONENTS Widgets)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR})
find_package(PythonQt REQUIRED)
......
......@@ -38,7 +38,6 @@ SET(CLIENT_SRCS
IF (PARAVIEW_BUILD_QT_GUI)
pv_find_package_qt(qt_targets REQUIRED QUIET
QT4_COMPONENTS QtGui
QT5_COMPONENTS Widgets)
pv_qt_wrap_cpp(MOC_SRCS ${MOC_HEADERS})
pv_qt_wrap_ui(UI_SRCS ${UI_FILES})
......
......@@ -85,7 +85,7 @@ SET(CLIENT_SRCS
IF (PARAVIEW_BUILD_QT_GUI)
INCLUDE (ParaViewQt)
pv_find_package_qt(qt_targets REQUIRED QT4_COMPONENTS QtGui QT5_COMPONENTS Widgets)
pv_find_package_qt(qt_targets REQUIRED QT5_COMPONENTS Widgets)
pv_qt_wrap_cpp(MOC_SRCS ${MOC_HEADERS})
pv_qt_wrap_ui(UI_SRCS ${UI_FILES})
ADD_PARAVIEW_ACTION_GROUP(SIERRA_PLOT_TOOLS_TOOLBAR_IFACE SIERRA_PLOT_TOOLS_TOOLBAR_IFACE_SRCS
......
......@@ -17,7 +17,6 @@ set(SRCS)
if(PARAVIEW_BUILD_QT_GUI)
pv_find_package_qt(qt_targets REQUIRED QUIET
QT4_COMPONENTS QtGui
QT5_COMPONENTS Widgets)
pv_qt_wrap_cpp(MOC_SRCS
......
......@@ -27,7 +27,7 @@ SET (TP_MOC_SOURCES
pqTPPluginManager.h
)