Commit ab3a63bc authored by Dave DeMarle's avatar Dave DeMarle

Add newly modularized visitbridge back

The change adds the visitbridge modules in to the module list and then
restores the functionality that is needed to get the readers from them
into ParaView's XML and GUI.

Requires a corresponding change to VisItBridge in which it is modularized.

Conflicts:

	CMakeLists.txt

Change-Id: I703de529d665f962a46d2c0ef924388070d5a8dd
parent 8035da76
...@@ -285,6 +285,26 @@ mark_as_advanced(VTK_VPIC_USE_MPI) ...@@ -285,6 +285,26 @@ mark_as_advanced(VTK_VPIC_USE_MPI)
include_directories(${ParaView_BINARY_DIR}) include_directories(${ParaView_BINARY_DIR})
#tell paraview about the visitbridge classes that it has to wrap and expose
#in the GUI
macro(PARAVIEW_INCLUDE_SERVERMANAGER_RESOURCES RESOURCES)
set(PARAVIEW_EXTRA_SERVERMANAGER_RESOURCES
${PARAVIEW_EXTRA_SERVERMANAGER_RESOURCES} ${RESOURCES})
endmacro(PARAVIEW_INCLUDE_SERVERMANAGER_RESOURCES RESOURCES)
set(VISITBRIDGE_READERS_XML_FILE
"${ParaView_SOURCE_DIR}/Utilities/VisItBridge/databases/visit_readers.xml")
paraview_include_servermanager_resources(${VISITBRIDGE_READERS_XML_FILE})
set(PARAVIEW_EXTRA_GUI_RESOURCES)
macro(PARAVIEW_INCLUDE_GUI_RESOURCES RESOURCES)
set(PARAVIEW_EXTRA_GUI_RESOURCES ${PARAVIEW_EXTRA_GUI_RESOURCES} ${RESOURCES})
endmacro(PARAVIEW_INCLUDE_GUI_RESOURCES RESOURCES)
set(VISITBRIDGE_READERS_GUI_XML_FILE
"${ParaView_SOURCE_DIR}/Utilities/VisItBridge/databases/visit_readers_gui.xml")
paraview_include_gui_resources(${VISITBRIDGE_READERS_GUI_XML_FILE})
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# Bring in VTK # Bring in VTK
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
...@@ -344,7 +364,8 @@ else() ...@@ -344,7 +364,8 @@ else()
Utilities/ProcessXML Utilities/ProcessXML
ThirdParty/protobuf ThirdParty/protobuf
ThirdParty/QtTesting ThirdParty/QtTesting
Utilities/VisItBridge/Library
Utilities/VisItBridge/databases
ParaViewCore/ClientServerStream ParaViewCore/ClientServerStream
ParaViewCore/PythonSupport ParaViewCore/PythonSupport
ParaViewCore/Common ParaViewCore/Common
......
...@@ -76,6 +76,7 @@ SET(resourceFiles ...@@ -76,6 +76,7 @@ SET(resourceFiles
${CMAKE_CURRENT_SOURCE_DIR}/Resources/3d_widgets.xml ${CMAKE_CURRENT_SOURCE_DIR}/Resources/3d_widgets.xml
${CMAKE_CURRENT_SOURCE_DIR}/Resources/internal_writers.xml ${CMAKE_CURRENT_SOURCE_DIR}/Resources/internal_writers.xml
${CMAKE_CURRENT_SOURCE_DIR}/Resources/writers.xml ${CMAKE_CURRENT_SOURCE_DIR}/Resources/writers.xml
${PARAVIEW_EXTRA_SERVERMANAGER_RESOURCES}
) )
if (PARAVIEW_ENABLE_PYTHON) if (PARAVIEW_ENABLE_PYTHON)
......
...@@ -28,6 +28,33 @@ ...@@ -28,6 +28,33 @@
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# #
#========================================================================== #==========================================================================
#------------------------------------------------------------------------------
# GENERATE_QT_RESOURCE_FROM_FILES can be used to generate a Qt resource file
# from a given set of files.
# ARGUMENTS:
# resource_file: IN : full pathname of the qrc file to generate.
# resource_prefix: IN : the name used in the "prefix" attribute for the
# generated qrc file.
# file_list: IN : list of files to be added into the resource file.
#------------------------------------------------------------------------------
macro(generate_qt_resource_from_files resource_file resource_prefix file_list)
set (pq_resource_file_contents "<RCC>\n <qresource prefix=\"${resource_prefix}\">\n")
get_filename_component(current_directory ${resource_file} PATH)
foreach (resource ${file_list})
get_filename_component(alias ${resource} NAME)
get_filename_component(resource ${resource} ABSOLUTE)
file(RELATIVE_PATH resource "${current_directory}" "${resource}")
file(TO_NATIVE_PATH "${resource}" resource)
set (pq_resource_file_contents
"${pq_resource_file_contents} <file alias=\"${alias}\">${resource}</file>\n")
endforeach (resource)
set (pq_resource_file_contents
"${pq_resource_file_contents} </qresource>\n</RCC>\n")
# Generate the resource file.
file (WRITE "${resource_file}" "${pq_resource_file_contents}")
endmacro(generate_qt_resource_from_files)
set (Module_SRCS set (Module_SRCS
pq3DWidget.cxx pq3DWidget.cxx
pq3DWidget.h pq3DWidget.h
...@@ -658,7 +685,7 @@ set (Module_UI_FILES ...@@ -658,7 +685,7 @@ set (Module_UI_FILES
Resources/UI/pqXYChartDisplayPanel.ui Resources/UI/pqXYChartDisplayPanel.ui
) )
GENERATE_QT_RESOURCE_FROM_FILES( generate_qt_resource_from_files(
"${CMAKE_CURRENT_BINARY_DIR}/pqExtraResources.qrc" "${CMAKE_CURRENT_BINARY_DIR}/pqExtraResources.qrc"
"/ParaViewResources" "/ParaViewResources"
${CMAKE_CURRENT_SOURCE_DIR}/Resources/XML/Placeholder.xml ${CMAKE_CURRENT_SOURCE_DIR}/Resources/XML/Placeholder.xml
...@@ -684,7 +711,13 @@ add_custom_command( ...@@ -684,7 +711,13 @@ add_custom_command(
qt4_wrap_cpp(__Module_MOC_SRCS ${Module_MOC_HDRS}) qt4_wrap_cpp(__Module_MOC_SRCS ${Module_MOC_HDRS})
qt4_wrap_ui(__Module_UI_SRCS ${Module_UI_FILES}) qt4_wrap_ui(__Module_UI_SRCS ${Module_UI_FILES})
qt4_add_resources(__Module_RESOURCE_SRCS ${Module_RESOURCE_FILES})
generate_qt_resource_from_files(
"${CMAKE_CURRENT_BINARY_DIR}/pqExtraResources.qrc"
"/ParaViewResources"
${PARAVIEW_EXTRA_GUI_RESOURCES})
qt4_add_resources(__Module_RESOURCE_SRCS ${Module_RESOURCE_FILES} "${CMAKE_CURRENT_BINARY_DIR}/pqExtraResources.qrc")
SOURCE_GROUP("Resources" FILES SOURCE_GROUP("Resources" FILES
${Module_UI_FILES} ${Module_UI_FILES}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment