Skip to content

Commit

Permalink
Refs #7363. Changes required to build with paraview 4.3
Browse files Browse the repository at this point in the history
  • Loading branch information
quantumsteve committed Mar 18, 2015
1 parent 3be5360 commit 25df544
Show file tree
Hide file tree
Showing 14 changed files with 26 additions and 30 deletions.
Expand Up @@ -7,8 +7,7 @@ GUI_RESOURCE_FILES PeaksFilterGUI.xml)
# Add to the 'VatesParaViewPlugins' group in VS
set_property( TARGET MantidParaViewPeaksFilterSMPlugin PROPERTY FOLDER "MantidVatesParaViewPlugins")

target_link_libraries( MantidParaViewPeaksFilterSMPlugin
${MANTID_SUBPROJECT_LIBS} )
target_link_libraries( MantidParaViewPeaksFilterSMPlugin LINK_PUBLIC ${MANTID_SUBPROJECT_LIBS} )

# Put library into subfolder.
SET_TARGET_OUTPUT_DIRECTORY(MantidParaViewPeaksFilterSMPlugin ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/${PVPLUGINS_DIR}/${PVPLUGINS_SUBDIR})
Expand Down
Expand Up @@ -11,7 +11,7 @@ set_property( TARGET MantidParaViewSplatterPlotSMPlugin PROPERTY FOLDER "MantidV

include_directories ( SYSTEM ${QWT_INCLUDE_DIR} )

target_link_libraries( MantidParaViewSplatterPlotSMPlugin
target_link_libraries( MantidParaViewSplatterPlotSMPlugin LINK_PUBLIC
${MANTID_SUBPROJECT_LIBS} ${QWT_LIBRARIES})

# Put library into subfolder.
Expand Down
Expand Up @@ -10,8 +10,7 @@ set_property( TARGET MantidParaViewEventNexusReaderSMPlugin PROPERTY FOLDER "Man

include_directories ( SYSTEM ${QWT_INCLUDE_DIR} )

target_link_libraries( MantidParaViewEventNexusReaderSMPlugin
${MANTID_SUBPROJECT_LIBS} ${QWT_LIBRARIES})
target_link_libraries( MantidParaViewEventNexusReaderSMPlugin LINK_PUBLIC ${MANTID_SUBPROJECT_LIBS} ${QWT_LIBRARIES})

# Put library into subfolder.
SET_TARGET_OUTPUT_DIRECTORY(MantidParaViewEventNexusReaderSMPlugin ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/${PVPLUGINS_DIR}/${PVPLUGINS_SUBDIR})
Expand Down
Expand Up @@ -10,8 +10,7 @@ set_property( TARGET MantidParaViewMDEWNexusReaderSMPlugin PROPERTY FOLDER "Mant

include_directories ( SYSTEM ${QWT_INCLUDE_DIR} )

target_link_libraries( MantidParaViewMDEWNexusReaderSMPlugin
${MANTID_SUBPROJECT_LIBS} ${QWT_LIBRARIES})
target_link_libraries( MantidParaViewMDEWNexusReaderSMPlugin LINK_PUBLIC ${MANTID_SUBPROJECT_LIBS} ${QWT_LIBRARIES})

# Put library into subfolder.
SET_TARGET_OUTPUT_DIRECTORY(MantidParaViewMDEWNexusReaderSMPlugin ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/${PVPLUGINS_DIR}/${PVPLUGINS_SUBDIR})
Expand Down
Expand Up @@ -10,8 +10,7 @@ set_property( TARGET MantidParaViewMDHWNexusReaderSMPlugin PROPERTY FOLDER "Mant

include_directories ( SYSTEM ${QWT_INCLUDE_DIR} )

target_link_libraries( MantidParaViewMDHWNexusReaderSMPlugin
${MANTID_SUBPROJECT_LIBS} ${QWT_LIBRARIES})
target_link_libraries( MantidParaViewMDHWNexusReaderSMPlugin LINK_PUBLIC ${MANTID_SUBPROJECT_LIBS} ${QWT_LIBRARIES})

# Put library into subfolder.
SET_TARGET_OUTPUT_DIRECTORY(MantidParaViewMDHWNexusReaderSMPlugin ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/${PVPLUGINS_DIR}/${PVPLUGINS_SUBDIR})
Expand Down
Expand Up @@ -10,8 +10,7 @@ set_property( TARGET MantidParaViewSQWEventReaderSMPlugin PROPERTY FOLDER "Manti

include_directories ( SYSTEM ${QWT_INCLUDE_DIR} )

target_link_libraries( MantidParaViewSQWEventReaderSMPlugin
${MANTID_SUBPROJECT_LIBS} ${QWT_LIBRARIES})
target_link_libraries( MantidParaViewSQWEventReaderSMPlugin LINK_PUBLIC ${MANTID_SUBPROJECT_LIBS} ${QWT_LIBRARIES})

# Put library into subfolder.
SET_TARGET_OUTPUT_DIRECTORY(MantidParaViewSQWEventReaderSMPlugin ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/${PVPLUGINS_DIR}/${PVPLUGINS_SUBDIR})
Expand Down
Expand Up @@ -8,8 +8,7 @@ ADD_PARAVIEW_PLUGIN(MantidParaViewMDEWSourceSMPlugin "1.0"
set_property( TARGET MantidParaViewMDEWSourceSMPlugin PROPERTY FOLDER "MantidVatesParaViewPlugins" )

include_directories ( SYSTEM ${QWT_INCLUDE_DIR} )
target_link_libraries( MantidParaViewMDEWSourceSMPlugin
${MANTID_SUBPROJECT_LIBS} ${QWT_LIBRARIES})
target_link_libraries( MantidParaViewMDEWSourceSMPlugin LINK_PUBLIC ${MANTID_SUBPROJECT_LIBS} ${QWT_LIBRARIES})

# Put library into subfolder.
SET_TARGET_OUTPUT_DIRECTORY(MantidParaViewMDEWSourceSMPlugin ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/${PVPLUGINS_DIR}/${PVPLUGINS_SUBDIR})
Expand Down
Expand Up @@ -9,8 +9,7 @@ set_property( TARGET MantidParaViewMDHWSourceSMPlugin PROPERTY FOLDER "MantidVat

include_directories ( SYSTEM ${QWT_INCLUDE_DIR} )

target_link_libraries( MantidParaViewMDHWSourceSMPlugin
${MANTID_SUBPROJECT_LIBS} ${QWT_LIBRARIES})
target_link_libraries( MantidParaViewMDHWSourceSMPlugin LINK_PUBLIC ${MANTID_SUBPROJECT_LIBS} ${QWT_LIBRARIES})

# Put library into subfolder.
SET_TARGET_OUTPUT_DIRECTORY(MantidParaViewMDHWSourceSMPlugin ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/${PVPLUGINS_DIR}/${PVPLUGINS_SUBDIR})
Expand Down
Expand Up @@ -7,8 +7,7 @@ ADD_PARAVIEW_PLUGIN(MantidParaViewSinglePeakMarkerSourceSMPlugin "1.0"
# Add to the 'VatesParaViewPlugins' group in VS
set_property( TARGET MantidParaViewSinglePeakMarkerSourceSMPlugin PROPERTY FOLDER "MantidVatesParaViewPlugins" )

target_link_libraries( MantidParaViewSinglePeakMarkerSourceSMPlugin
${MANTID_SUBPROJECT_LIBS} )
target_link_libraries( MantidParaViewSinglePeakMarkerSourceSMPlugin LINK_PUBLIC ${MANTID_SUBPROJECT_LIBS} )

# Put library into subfolder.
SET_TARGET_OUTPUT_DIRECTORY(MantidParaViewSinglePeakMarkerSourceSMPlugin ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/${PVPLUGINS_DIR}/${PVPLUGINS_SUBDIR})
Expand Down
4 changes: 2 additions & 2 deletions Code/Mantid/Vates/VatesSimpleGui/ViewWidgets/CMakeLists.txt
Expand Up @@ -146,15 +146,15 @@ MantidWidgets

# Create test file projects
if( CXXTEST_FOUND AND GMOCK_FOUND AND GTEST_FOUND )
include_directories ( SYSTEM ${CXXTEST_INCLUDE_DIR} ${GMOCK_INCLUDE_DIR} ${GTEST_INCLUDE_DIR} )
include_directories ( SYSTEM ${CXXTEST_INCLUDE_DIR} ${GMOCK_INCLUDE_DIR} ${GTEST_INCLUDE_DIR})

include_directories( inc ../../../Framework/TestHelpers/inc ../../../Framework/DataHandling/inc ../../../Framework/DataObjects/inc)
set ( TESTHELPER_SRCS ../../../Framework/TestHelpers/src/ComponentCreationHelper.cpp
../../../Framework/TestHelpers/src/WorkspaceCreationHelper.cpp
../../../Framework/TestHelpers/src/MDEventsTestHelper.cpp
../../../Framework/TestHelpers/src/StartFrameworkManager.cpp )
cxxtest_add_test( VatesSimpleGuiViewWidgetsTest ${TEST_FILES} )
target_link_libraries( VatesSimpleGuiViewWidgetsTest VatesSimpleGuiViewWidgets DataHandling Kernel DataObjects ${GMOCK_LIBRARIES} ${GTEST_LIBRARIES} )
target_link_libraries( VatesSimpleGuiViewWidgetsTest VatesSimpleGuiViewWidgets DataHandling Kernel DataObjects ${GMOCK_LIBRARIES} ${GTEST_LIBRARIES})
add_dependencies( AllTests VatesSimpleGuiViewWidgetsTest )
# Add to the 'UnitTests' group in VS
set_property ( TARGET VatesSimpleGuiViewWidgetsTest PROPERTY FOLDER "UnitTests" )
Expand Down
Expand Up @@ -239,11 +239,11 @@ namespace SimpleGui
}

// Otherwise get the data range of the representation for the active view
pqPipelineRepresentation* pipelineRepresenation = qobject_cast<pqPipelineRepresentation*>(source->getRepresentation(pqActiveObjects::instance().activeView()));
pqPipelineRepresentation* pipelineRepresentation = qobject_cast<pqPipelineRepresentation*>(source->getRepresentation(pqActiveObjects::instance().activeView()));

if (pipelineRepresenation)
if (pipelineRepresentation)
{
QPair<double, double> range = pipelineRepresenation->getColorFieldRange();
QPair<double, double> range = pipelineRepresentation->getLookupTable()->getScalarRange();

minValue = range.first;
maxValue = range.second;
Expand Down Expand Up @@ -304,4 +304,4 @@ namespace SimpleGui
}
}
}
}
}
Expand Up @@ -7,7 +7,7 @@
#endif

#include <pqView.h>
#include <pqActiveView.h>
#include <pqActiveObjects.h>
#include <vtkSMRenderViewProxy.h>
#include <vtkCamera.h>
#include <vtkRenderer.h>
Expand Down Expand Up @@ -44,7 +44,7 @@ namespace Mantid
double far[4];
double near[4];

pqView * view = pqActiveView::instance().current();
pqView * view = pqActiveObjects::instance().activeView();

vtkSMRenderViewProxy* proxy = NULL;

Expand Down Expand Up @@ -111,7 +111,7 @@ namespace Mantid
*/
void CameraManager::setCameraToPeak(double xpos, double ypos, double zpos, double peakRadius)
{
pqView * view = pqActiveView::instance().current();
pqView * view = pqActiveObjects::instance().activeView();
vtkSMRenderViewProxy* proxy = NULL;

if (view)
Expand Down Expand Up @@ -140,4 +140,4 @@ namespace Mantid
}
}
}
}
}
Expand Up @@ -85,7 +85,7 @@
#include <pqStandardViewFrameActionsImplementation.h>
#include <pqUndoRedoBehavior.h>
#include <pqView.h>
#include <pqViewFrameActionsBehavior.h>
//#include <pqViewFrameActionsBehavior.h>
#include <pqViewStreamingBehavior.h>
#include <pqVerifyRequiredPluginBehavior.h>
#include <pqSaveDataReaction.h>
Expand Down
Expand Up @@ -498,8 +498,12 @@ void SplatterPlotView::createPeaksFilter()
vtkSMPropertyHelper(dataRepresentation->getProxy(), "PointSize").Set(pointSize);
dataRepresentation->getProxy()->UpdateVTKObjects();

pqPipelineRepresentation *pipelineRepresentation = qobject_cast<pqPipelineRepresentation*>(dataRepresentation);
pipelineRepresentation->colorByArray("signal", vtkDataObject::FIELD_ASSOCIATION_CELLS);
if (!this->isPeaksWorkspace(this->origSrc))
{
vtkSMPVRepresentationProxy::SetScalarColoring(dataRepresentation->getProxy(), "signal",
vtkDataObject::FIELD_ASSOCIATION_CELLS);
dataRepresentation->getProxy()->UpdateVTKObjects();
}
this->resetDisplay();
this->setVisibilityListener();
this->renderAll();
Expand Down

0 comments on commit 25df544

Please sign in to comment.