diff --git a/Code/Mantid/MantidPlot/CMakeLists.txt b/Code/Mantid/MantidPlot/CMakeLists.txt index 4e6427a4f0f0d1a58f6cf9f12fe8b4ba6c81843c..4dceb633ca165bdce38debd7e0f4e68420da303b 100644 --- a/Code/Mantid/MantidPlot/CMakeLists.txt +++ b/Code/Mantid/MantidPlot/CMakeLists.txt @@ -174,11 +174,7 @@ set ( MANTID_SRCS src/Mantid/AbstractMantidLog.cpp src/Mantid/Preferences.cpp src/Mantid/RemoveErrorsDialog.cpp src/Mantid/UserFitFunctionDialog.cpp - src/Mantid/SliceViewer/CustomTools.cpp - src/Mantid/SliceViewer/SliceViewer.cpp src/Mantid/SliceViewer/SliceViewerWindow.cpp - src/Mantid/SliceViewer/DimensionSliceWidget.cpp - src/Mantid/SliceViewer/QwtRasterDataMD.cpp src/Mantid/InstrumentWidget/BinDialog.cpp src/Mantid/InstrumentWidget/CompAssemblyActor.cpp src/Mantid/InstrumentWidget/ComponentActor.cpp @@ -391,11 +387,7 @@ set ( MANTID_HDRS src/Mantid/AbstractMantidLog.h src/Mantid/Preferences.h src/Mantid/RemoveErrorsDialog.h src/Mantid/UserFitFunctionDialog.h - src/Mantid/SliceViewer/SliceViewer.h src/Mantid/SliceViewer/SliceViewerWindow.h - src/Mantid/SliceViewer/CustomTools.h - src/Mantid/SliceViewer/QwtRasterDataMD.h - src/Mantid/SliceViewer/DimensionSliceWidget.h src/Mantid/InstrumentWidget/BinDialog.h src/Mantid/InstrumentWidget/CompAssemblyActor.h src/Mantid/InstrumentWidget/ComponentActor.h @@ -656,10 +648,7 @@ set ( MANTID_MOC_FILES src/Mantid/AlgMonitor.h src/Mantid/PeakPickerTool.h src/Mantid/RemoveErrorsDialog.h src/Mantid/UserFitFunctionDialog.h - src/Mantid/SliceViewer/CustomTools.h - src/Mantid/SliceViewer/SliceViewer.h src/Mantid/SliceViewer/SliceViewerWindow.h - src/Mantid/SliceViewer/DimensionSliceWidget.h src/Mantid/InstrumentWidget/XIntegrationControl.h src/Mantid/InstrumentWidget/BinDialog.h src/Mantid/InstrumentWidget/InstrumentTreeModel.h @@ -684,8 +673,6 @@ set ( UI_FILES src/SendToProgramDialog.ui src/Mantid/MantidAbout.ui src/Mantid/RemoveErrorsDialog.ui src/Mantid/ManageCustomMenus.ui - src/Mantid/SliceViewer/SliceViewer.ui - src/Mantid/SliceViewer/DimensionSliceWidget.ui ) # Create Vates configuration file @@ -764,7 +751,7 @@ add_executable ( MantidPlot ${WIN_CONSOLE} MACOSX_BUNDLE ${ALL_SRC} src/main.cpp # Library dependencies target_link_libraries ( MantidPlot - ${CORE_MANTIDLIBS} MantidQtAPI MantidWidgets + ${CORE_MANTIDLIBS} MantidQtAPI MantidWidgets MantidQtSliceViewer QtPropertyBrowser ${QT_LIBRARIES} ${QWT_LIBRARIES} ${QWTPLOT3D_LIBRARIES} ${QSCINTILLA_LIBRARIES} @@ -786,17 +773,13 @@ else () include_directories ( ../Framework/Geometry/inc ) # Extra, optional target for demoing a GUI element - add_executable ( SliceViewerDemo ${WIN_CONSOLE} MACOSX_BUNDLE ${ALL_SRC} src/Mantid/SliceViewer/main.cpp - ${INC_FILES} ${QTIPLOT_C_SRC} ${UI_HDRS} ${RES_FILES} ${MANTID_RC_FILE} ) + add_executable ( SliceViewerDemo ${WIN_CONSOLE} MACOSX_BUNDLE ${ALL_SRC} ../MantidQt/SliceViewer/src/main.cpp + ${INC_FILES} ${QTIPLOT_C_SRC} ${UI_HDRS} ${RES_FILES} ${MANTID_RC_FILE} ) target_link_libraries ( SliceViewerDemo - ${CORE_MANTIDLIBS} MantidQtAPI MantidWidgets - MDEvents Geometry - QtPropertyBrowser ${QT_LIBRARIES} - ${QWT_LIBRARIES} ${QWTPLOT3D_LIBRARIES} - ${QSCINTILLA_LIBRARIES} - ${PYTHON_LIBRARIES} - ${ZLIB_LIBRARIES} - ) + ${CORE_MANTIDLIBS} MantidQtAPI MantidWidgets MantidQtSliceViewer + MDEvents Geometry + QtPropertyBrowser ${QT_LIBRARIES} ${ZLIB_LIBRARIES} + ${QWT_LIBRARIES} ${QWTPLOT3D_LIBRARIES} ${QSCINTILLA_LIBRARIES} ${PYTHON_LIBRARIES} ) endif () ########################################################################### diff --git a/Code/Mantid/MantidPlot/src/Mantid/MantidUI.cpp b/Code/Mantid/MantidPlot/src/Mantid/MantidUI.cpp index 5dd137adb0c6e1cf2e1ae3669973ed3e567d490d..5e4902cb15e93642013d79a15333dc033ad0dae9 100644 --- a/Code/Mantid/MantidPlot/src/Mantid/MantidUI.cpp +++ b/Code/Mantid/MantidPlot/src/Mantid/MantidUI.cpp @@ -55,7 +55,6 @@ #include <iostream> #include <sstream> #include "MantidAPI/IMDWorkspace.h" -#include "Mantid/SliceViewer/SliceViewer.h" #include "Mantid/SliceViewer/SliceViewerWindow.h" diff --git a/Code/Mantid/MantidPlot/src/Mantid/SliceViewer/SliceViewerWindow.cpp b/Code/Mantid/MantidPlot/src/Mantid/SliceViewer/SliceViewerWindow.cpp index 32bd413d27020164b04e007862d02ccb34762a5b..fadf1adc2b8c7b6425642d1c629534e7b78c6166 100644 --- a/Code/Mantid/MantidPlot/src/Mantid/SliceViewer/SliceViewerWindow.cpp +++ b/Code/Mantid/MantidPlot/src/Mantid/SliceViewer/SliceViewerWindow.cpp @@ -4,7 +4,7 @@ #include "MantidAPI/IMDWorkspace.h" #include "MantidKernel/DataService.h" #include "MantidKernel/SingletonHolder.h" -#include "SliceViewer.h" +#include "../../../MantidQt/SliceViewer/inc/MantidQtSliceViewer/SliceViewer.h" #include "SliceViewerWindow.h" #include <qlayout.h> diff --git a/Code/Mantid/MantidPlot/src/Mantid/SliceViewer/SliceViewerWindow.h b/Code/Mantid/MantidPlot/src/Mantid/SliceViewer/SliceViewerWindow.h index f145f2c0b3dc9c158b2c4d5602c84fe5563a685c..08edd6e7646e1890bb3871738dfc4bc230d3908d 100644 --- a/Code/Mantid/MantidPlot/src/Mantid/SliceViewer/SliceViewerWindow.h +++ b/Code/Mantid/MantidPlot/src/Mantid/SliceViewer/SliceViewerWindow.h @@ -5,7 +5,7 @@ #include "../../MdiSubWindow.h" #include "MantidQtAPI/WorkspaceObserver.h" #include "MantidAPI/IMDWorkspace.h" -#include "SliceViewer.h" +#include "../../../MantidQt/SliceViewer/inc/MantidQtSliceViewer/SliceViewer.h" /** A MDI sub window that contains only a diff --git a/Code/Mantid/MantidQt/CMakeLists.txt b/Code/Mantid/MantidQt/CMakeLists.txt index 64bae3f43ab7e6ed8e8b32a944784aea71271933..33e56938606e9d635de6c5ef869c76865e3f0cf9 100644 --- a/Code/Mantid/MantidQt/CMakeLists.txt +++ b/Code/Mantid/MantidQt/CMakeLists.txt @@ -8,6 +8,7 @@ add_subdirectory ( MantidWidgets ) add_subdirectory ( CustomDialogs ) add_subdirectory ( CustomInterfaces ) add_subdirectory ( DesignerPlugins ) +add_subdirectory ( SliceViewer ) ########################################################################### # Add a custom target to build all of the MantidQt packages diff --git a/Code/Mantid/MantidQt/SliceViewer/CMakeLists.txt b/Code/Mantid/MantidQt/SliceViewer/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..f7d48784d1d1cd8a907d98227485fb9b53d272b1 --- /dev/null +++ b/Code/Mantid/MantidQt/SliceViewer/CMakeLists.txt @@ -0,0 +1,50 @@ +set ( SRC_FILES + src/CustomTools.cpp + src/DimensionSliceWidget.cpp + src/QwtRasterDataMD.cpp + src/SliceViewer.cpp +) + +# Include files aren't required, but this makes them appear in Visual Studio +set ( INC_FILES + inc/MantidQtSliceViewer/CustomTools.h + inc/MantidQtSliceViewer/DimensionSliceWidget.h + inc/MantidQtSliceViewer/QwtRasterDataMD.h + inc/MantidQtSliceViewer/SliceViewer.h +) + +set ( MOC_FILES + inc/MantidQtSliceViewer/CustomTools.h + inc/MantidQtSliceViewer/DimensionSliceWidget.h + inc/MantidQtSliceViewer/SliceViewer.h +) + +set ( UI_FILES + inc/MantidQtSliceViewer/DimensionSliceWidget.ui + inc/MantidQtSliceViewer/SliceViewer.ui +) + + +include_directories ( inc ) +include_directories ( ${QWT_INCLUDE_DIR} ) +include_directories ( ../../QtPropertyBrowser/src ) + +qt4_wrap_cpp ( MOCCED_FILES ${MOC_FILES} ) + + +set ( ALL_SRC ${SRC_FILES} ${MOCCED_FILES} ) + +qt4_wrap_ui ( UI_HDRS ${UI_FILES} ) +include_directories ( ${CMAKE_CURRENT_BINARY_DIR} ) + +# For Windows: +add_definitions ( -DIN_MANTIDQT_SLICEVIEWER ) +add_library ( MantidQtSliceViewer ${ALL_SRC} ${INC_FILES} ${UI_HDRS} ) + +target_link_libraries ( MantidQtSliceViewer MantidQtAPI QtPropertyBrowser ${QT_LIBRARIES} ${QWT_LIBRARIES} ) + +########################################################################### +# Installation settings +########################################################################### + +install ( TARGETS MantidQtSliceViewer DESTINATION ${LIB_DIR} ) diff --git a/Code/Mantid/MantidPlot/src/Mantid/SliceViewer/CustomTools.h b/Code/Mantid/MantidQt/SliceViewer/inc/MantidQtSliceViewer/CustomTools.h similarity index 100% rename from Code/Mantid/MantidPlot/src/Mantid/SliceViewer/CustomTools.h rename to Code/Mantid/MantidQt/SliceViewer/inc/MantidQtSliceViewer/CustomTools.h diff --git a/Code/Mantid/MantidPlot/src/Mantid/SliceViewer/DimensionSliceWidget.h b/Code/Mantid/MantidQt/SliceViewer/inc/MantidQtSliceViewer/DimensionSliceWidget.h similarity index 100% rename from Code/Mantid/MantidPlot/src/Mantid/SliceViewer/DimensionSliceWidget.h rename to Code/Mantid/MantidQt/SliceViewer/inc/MantidQtSliceViewer/DimensionSliceWidget.h diff --git a/Code/Mantid/MantidPlot/src/Mantid/SliceViewer/DimensionSliceWidget.ui b/Code/Mantid/MantidQt/SliceViewer/inc/MantidQtSliceViewer/DimensionSliceWidget.ui similarity index 100% rename from Code/Mantid/MantidPlot/src/Mantid/SliceViewer/DimensionSliceWidget.ui rename to Code/Mantid/MantidQt/SliceViewer/inc/MantidQtSliceViewer/DimensionSliceWidget.ui diff --git a/Code/Mantid/MantidPlot/src/Mantid/SliceViewer/QwtRasterDataMD.h b/Code/Mantid/MantidQt/SliceViewer/inc/MantidQtSliceViewer/QwtRasterDataMD.h similarity index 100% rename from Code/Mantid/MantidPlot/src/Mantid/SliceViewer/QwtRasterDataMD.h rename to Code/Mantid/MantidQt/SliceViewer/inc/MantidQtSliceViewer/QwtRasterDataMD.h diff --git a/Code/Mantid/MantidPlot/src/Mantid/SliceViewer/SliceViewer.h b/Code/Mantid/MantidQt/SliceViewer/inc/MantidQtSliceViewer/SliceViewer.h similarity index 100% rename from Code/Mantid/MantidPlot/src/Mantid/SliceViewer/SliceViewer.h rename to Code/Mantid/MantidQt/SliceViewer/inc/MantidQtSliceViewer/SliceViewer.h diff --git a/Code/Mantid/MantidPlot/src/Mantid/SliceViewer/SliceViewer.ui b/Code/Mantid/MantidQt/SliceViewer/inc/MantidQtSliceViewer/SliceViewer.ui similarity index 100% rename from Code/Mantid/MantidPlot/src/Mantid/SliceViewer/SliceViewer.ui rename to Code/Mantid/MantidQt/SliceViewer/inc/MantidQtSliceViewer/SliceViewer.ui diff --git a/Code/Mantid/MantidPlot/src/Mantid/SliceViewer/CustomTools.cpp b/Code/Mantid/MantidQt/SliceViewer/src/CustomTools.cpp similarity index 86% rename from Code/Mantid/MantidPlot/src/Mantid/SliceViewer/CustomTools.cpp rename to Code/Mantid/MantidQt/SliceViewer/src/CustomTools.cpp index 86337d1083f236afefff4146ca47f5b1c3e563c0..209092f512c069a8b5ae0af6a028bf2a4b534bfb 100644 --- a/Code/Mantid/MantidPlot/src/Mantid/SliceViewer/CustomTools.cpp +++ b/Code/Mantid/MantidQt/SliceViewer/src/CustomTools.cpp @@ -1,4 +1,4 @@ -#include "CustomTools.h" +#include "MantidQtSliceViewer/CustomTools.h" #include <iomanip> #include <iosfwd> #include <iostream> diff --git a/Code/Mantid/MantidPlot/src/Mantid/SliceViewer/DimensionSliceWidget.cpp b/Code/Mantid/MantidQt/SliceViewer/src/DimensionSliceWidget.cpp similarity index 98% rename from Code/Mantid/MantidPlot/src/Mantid/SliceViewer/DimensionSliceWidget.cpp rename to Code/Mantid/MantidQt/SliceViewer/src/DimensionSliceWidget.cpp index d2e2d011de350f026ba270de0775dd2ae78e8907..d3620a2041a802d5412e6c6593059977b3f521f5 100644 --- a/Code/Mantid/MantidPlot/src/Mantid/SliceViewer/DimensionSliceWidget.cpp +++ b/Code/Mantid/MantidQt/SliceViewer/src/DimensionSliceWidget.cpp @@ -1,4 +1,4 @@ -#include "DimensionSliceWidget.h" +#include "MantidQtSliceViewer/DimensionSliceWidget.h" #include <iosfwd> #include <iostream> #include <iomanip> diff --git a/Code/Mantid/MantidPlot/src/Mantid/SliceViewer/QwtRasterDataMD.cpp b/Code/Mantid/MantidQt/SliceViewer/src/QwtRasterDataMD.cpp similarity index 98% rename from Code/Mantid/MantidPlot/src/Mantid/SliceViewer/QwtRasterDataMD.cpp rename to Code/Mantid/MantidQt/SliceViewer/src/QwtRasterDataMD.cpp index 8bd6c53b89371925c18e3b44270cb2e703fe1f99..e59bb76db96e0eac4c654953eec9d7ac154361d3 100644 --- a/Code/Mantid/MantidPlot/src/Mantid/SliceViewer/QwtRasterDataMD.cpp +++ b/Code/Mantid/MantidQt/SliceViewer/src/QwtRasterDataMD.cpp @@ -1,4 +1,4 @@ -#include "QwtRasterDataMD.h" +#include "MantidQtSliceViewer/QwtRasterDataMD.h" #include <math.h> #include "MantidGeometry/MDGeometry/MDTypes.h" #include "MantidGeometry/MDGeometry/IMDDimension.h" diff --git a/Code/Mantid/MantidPlot/src/Mantid/SliceViewer/SliceViewer.cpp b/Code/Mantid/MantidQt/SliceViewer/src/SliceViewer.cpp similarity index 98% rename from Code/Mantid/MantidPlot/src/Mantid/SliceViewer/SliceViewer.cpp rename to Code/Mantid/MantidQt/SliceViewer/src/SliceViewer.cpp index 61435fa4c1e2c4e70526aecb40ef807ad74d0c33..20be910bd5e2ec387c46a215cd34395e269b2156 100644 --- a/Code/Mantid/MantidPlot/src/Mantid/SliceViewer/SliceViewer.cpp +++ b/Code/Mantid/MantidQt/SliceViewer/src/SliceViewer.cpp @@ -1,14 +1,18 @@ -#include "CustomTools.h" -#include "DimensionSliceWidget.h" #include "MantidAPI/IMDIterator.h" #include "MantidGeometry/MDGeometry/IMDDimension.h" +#include "MantidGeometry/MDGeometry/MDBoxImplicitFunction.h" #include "MantidGeometry/MDGeometry/MDTypes.h" #include "MantidKernel/VMD.h" -#include "QwtRasterDataMD.h" -#include "SliceViewer.h" +#include "MantidQtSliceViewer/CustomTools.h" +#include "MantidQtSliceViewer/DimensionSliceWidget.h" +#include "MantidQtSliceViewer/QwtRasterDataMD.h" +#include "MantidQtSliceViewer/SliceViewer.h" +#include "qmenubar.h" #include <iomanip> #include <iosfwd> #include <iostream> +#include <qmenu.h> +#include <QtGui/qaction.h> #include <qwt_color_map.h> #include <qwt_plot_magnifier.h> #include <qwt_plot_panner.h> @@ -19,11 +23,6 @@ #include <qwt_scale_engine.h> #include <sstream> #include <vector> -#include "MantidGeometry/MDGeometry/MDBoxImplicitFunction.h" -#include "../../ColorMapDialog.h" -#include <qmenu.h> -#include <QtGui/qaction.h> -#include "qmenubar.h" using namespace Mantid; using namespace Mantid::Geometry; diff --git a/Code/Mantid/MantidPlot/src/Mantid/SliceViewer/main.cpp b/Code/Mantid/MantidQt/SliceViewer/src/main.cpp similarity index 98% rename from Code/Mantid/MantidPlot/src/Mantid/SliceViewer/main.cpp rename to Code/Mantid/MantidQt/SliceViewer/src/main.cpp index 9838a0bfa4d91a1ebcbf8214af482a584ead6e06..1bd2f9a596c3be81757df9cf9ea8d8414d94c0c5 100644 --- a/Code/Mantid/MantidPlot/src/Mantid/SliceViewer/main.cpp +++ b/Code/Mantid/MantidQt/SliceViewer/src/main.cpp @@ -11,7 +11,7 @@ #include "Mantid/MantidApplication.h" #include "qmainwindow.h" -#include "Mantid/SliceViewer/SliceViewer.h" +#include "../inc/MantidQtSliceViewer/SliceViewer.h" #include "MantidMDEvents/MDHistoWorkspace.h" #include "MantidGeometry/MDGeometry/MDHistoDimension.h"