diff --git a/Vates/VatesSimpleGui/ViewWidgets/CMakeLists.txt b/Vates/VatesSimpleGui/ViewWidgets/CMakeLists.txt index 306d8931c18e8e42e06c928d901434c7733e313e..6ba725e55cf06bd3d13fe5f7be4cbcbed03cd57b 100644 --- a/Vates/VatesSimpleGui/ViewWidgets/CMakeLists.txt +++ b/Vates/VatesSimpleGui/ViewWidgets/CMakeLists.txt @@ -11,6 +11,8 @@ set( INCLUDE_FILES inc/MantidVatesSimpleGuiViewWidgets/LibHelper.h inc/MantidVatesSimpleGuiViewWidgets/MdViewerWidget.h inc/MantidVatesSimpleGuiViewWidgets/MultisliceView.h + inc/MantidVatesSimpleGuiViewWidgets/pqCameraToolbarNonOrthogonalAxes.h + inc/MantidVatesSimpleGuiViewWidgets/pqCameraReactionNonOrthogonalAxes.h inc/MantidVatesSimpleGuiViewWidgets/VatesParaViewApplication.h inc/MantidVatesSimpleGuiViewWidgets/RebinAlgorithmDialogProvider.h inc/MantidVatesSimpleGuiViewWidgets/PeaksTableControllerVsi.h @@ -40,6 +42,8 @@ set( SOURCE_FILES src/PeaksTableControllerVsi.cpp src/PeaksTabWidget.cpp src/PeaksWidget.cpp + src/pqCameraToolbarNonOrthogonalAxes.cpp + src/pqCameraReactionNonOrthogonalAxes.cpp src/SaveScreenshotReaction.cpp src/RebinnedSourcesManager.cpp src/StandardView.cpp @@ -64,6 +68,8 @@ qt4_wrap_cpp( MOC_SOURCES inc/MantidVatesSimpleGuiViewWidgets/PeaksTableControllerVsi.h inc/MantidVatesSimpleGuiViewWidgets/PeaksWidget.h inc/MantidVatesSimpleGuiViewWidgets/PeaksTabWidget.h + inc/MantidVatesSimpleGuiViewWidgets/pqCameraToolbarNonOrthogonalAxes.h + inc/MantidVatesSimpleGuiViewWidgets/pqCameraReactionNonOrthogonalAxes.h inc/MantidVatesSimpleGuiViewWidgets/SaveScreenshotReaction.h inc/MantidVatesSimpleGuiViewWidgets/RebinnedSourcesManager.h inc/MantidVatesSimpleGuiViewWidgets/StandardView.h @@ -84,6 +90,7 @@ qt4_wrap_ui( UI_BUILT_SOURCES inc/MantidVatesSimpleGuiViewWidgets/MultisliceView.ui inc/MantidVatesSimpleGuiViewWidgets/PeaksWidget.ui inc/MantidVatesSimpleGuiViewWidgets/PeaksTabWidget.ui + inc/MantidVatesSimpleGuiViewWidgets/pqCameraToolbarNonOrthogonalAxes.ui inc/MantidVatesSimpleGuiViewWidgets/StandardView.ui inc/MantidVatesSimpleGuiViewWidgets/SplatterPlotView.ui inc/MantidVatesSimpleGuiViewWidgets/ThreesliceView.ui diff --git a/Vates/VatesSimpleGui/ViewWidgets/icons/ViewWidgetsIcons.qrc b/Vates/VatesSimpleGui/ViewWidgets/icons/ViewWidgetsIcons.qrc index 42c9f3ff235499481befdd156a949bd49fc681d7..f36928170a5d3504d6b705b171faf838478fef78 100644 --- a/Vates/VatesSimpleGui/ViewWidgets/icons/ViewWidgetsIcons.qrc +++ b/Vates/VatesSimpleGui/ViewWidgets/icons/ViewWidgetsIcons.qrc @@ -9,4 +9,53 @@ <file>pqSlice24.png</file> <file>pqThreshold24.png</file> </qresource> + <qresource prefix="/VatesSimpleGuiViewWidgets/icons"> + <file>pqWidgets/Icons/pqResetCamera.png</file> + <file>pqWidgets/Icons/pqResetCamera@2x.png</file> + <file>pqWidgets/Icons/pqResetCamera16.png</file> + <file>pqWidgets/Icons/pqResetCamera24.png</file> + <file>pqWidgets/Icons/pqResetCamera32.png</file> + <file>pqWidgets/Icons/pqRotateCameraCCW.png</file> + <file>pqWidgets/Icons/pqRotateCameraCCW@2x.png</file> + <file>pqWidgets/Icons/pqRotateCameraCCW24.png</file> + <file>pqWidgets/Icons/pqRotateCameraCW.png</file> + <file>pqWidgets/Icons/pqRotateCameraCW@2x.png</file> + <file>pqWidgets/Icons/pqRotateCameraCW24.png</file> + <file>pqWidgets/Icons/pqXMinus.png</file> + <file>pqWidgets/Icons/pqXMinus@2x.png</file> + <file>pqWidgets/Icons/pqXMinus16.png</file> + <file>pqWidgets/Icons/pqXMinus24.png</file> + <file>pqWidgets/Icons/pqXMinus32.png</file> + <file>pqWidgets/Icons/pqXPlus.png</file> + <file>pqWidgets/Icons/pqXPlus@2x.png</file> + <file>pqWidgets/Icons/pqXPlus16.png</file> + <file>pqWidgets/Icons/pqXPlus24.png</file> + <file>pqWidgets/Icons/pqXPlus32.png</file> + <file>pqWidgets/Icons/pqYMinus.png</file> + <file>pqWidgets/Icons/pqYMinus@2x.png</file> + <file>pqWidgets/Icons/pqYMinus16.png</file> + <file>pqWidgets/Icons/pqYMinus24.png</file> + <file>pqWidgets/Icons/pqYMinus32.png</file> + <file>pqWidgets/Icons/pqYPlus.png</file> + <file>pqWidgets/Icons/pqYPlus@2x.png</file> + <file>pqWidgets/Icons/pqYPlus16.png</file> + <file>pqWidgets/Icons/pqYPlus24.png</file> + <file>pqWidgets/Icons/pqYPlus32.png</file> + <file>pqWidgets/Icons/pqZMinus.png</file> + <file>pqWidgets/Icons/pqZMinus@2x.png</file> + <file>pqWidgets/Icons/pqZMinus16.png</file> + <file>pqWidgets/Icons/pqZMinus24.png</file> + <file>pqWidgets/Icons/pqZMinus32.png</file> + <file>pqWidgets/Icons/pqZoomToData.png</file> + <file>pqWidgets/Icons/pqZoomToData@2x.png</file> + <file>pqWidgets/Icons/pqZoomToData24.png</file> + <file>pqWidgets/Icons/pqZoomToSelection.png</file> + <file>pqWidgets/Icons/pqZoomToSelection@2x.png</file> + <file>pqWidgets/Icons/pqZoomToSelection24.png</file> + <file>pqWidgets/Icons/pqZPlus.png</file> + <file>pqWidgets/Icons/pqZPlus@2x.png</file> + <file>pqWidgets/Icons/pqZPlus16.png</file> + <file>pqWidgets/Icons/pqZPlus24.png</file> + <file>pqWidgets/Icons/pqZPlus32.png</file> + </qresource> </RCC> diff --git a/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqResetCamera.png b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqResetCamera.png new file mode 100644 index 0000000000000000000000000000000000000000..26fd199b247575f2411a1013e181b977f9f078da Binary files /dev/null and b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqResetCamera.png differ diff --git a/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqResetCamera16.png b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqResetCamera16.png new file mode 100644 index 0000000000000000000000000000000000000000..174ced15e3defd3873bff0780104b3f0f9477ad7 Binary files /dev/null and b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqResetCamera16.png differ diff --git a/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqResetCamera24.png b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqResetCamera24.png new file mode 100644 index 0000000000000000000000000000000000000000..f9f02c167c71cba21dc3aa31d01dcca83ba9ed71 Binary files /dev/null and b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqResetCamera24.png differ diff --git a/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqResetCamera32.png b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqResetCamera32.png new file mode 100644 index 0000000000000000000000000000000000000000..5749c2005defc3c2b0bf84ea75e8fa132f78f48d Binary files /dev/null and b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqResetCamera32.png differ diff --git a/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqResetCamera@2x.png b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqResetCamera@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..738ff69d77556fafba7fafd43d1bc16ed0a3418b Binary files /dev/null and b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqResetCamera@2x.png differ diff --git a/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqRotateCameraCCW.png b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqRotateCameraCCW.png new file mode 100644 index 0000000000000000000000000000000000000000..f2567f6822440f4640a9806ef963d3ad05cc9db9 Binary files /dev/null and b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqRotateCameraCCW.png differ diff --git a/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqRotateCameraCCW24.png b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqRotateCameraCCW24.png new file mode 100644 index 0000000000000000000000000000000000000000..03699d10fa097550499fdaa169b2b77e9b34128a Binary files /dev/null and b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqRotateCameraCCW24.png differ diff --git a/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqRotateCameraCCW@2x.png b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqRotateCameraCCW@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..f16b6e3590a3374bb2e100253a2deafff794ca2e Binary files /dev/null and b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqRotateCameraCCW@2x.png differ diff --git a/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqRotateCameraCW.png b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqRotateCameraCW.png new file mode 100644 index 0000000000000000000000000000000000000000..9c2555f2088605baad75251d7930935c3f87329a Binary files /dev/null and b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqRotateCameraCW.png differ diff --git a/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqRotateCameraCW24.png b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqRotateCameraCW24.png new file mode 100644 index 0000000000000000000000000000000000000000..b2ca65fb3fdb69bd81c4c34cfa60297ebb06beba Binary files /dev/null and b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqRotateCameraCW24.png differ diff --git a/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqRotateCameraCW@2x.png b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqRotateCameraCW@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..46a230736d67392556bd69a5571724453738b92b Binary files /dev/null and b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqRotateCameraCW@2x.png differ diff --git a/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqXMinus.png b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqXMinus.png new file mode 100644 index 0000000000000000000000000000000000000000..c6ef7ce3881eb402384efbde55dd7601e2ed95d1 Binary files /dev/null and b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqXMinus.png differ diff --git a/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqXMinus16.png b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqXMinus16.png new file mode 100644 index 0000000000000000000000000000000000000000..26e72f80491e36733955b5ba6cbc2242676ab1de Binary files /dev/null and b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqXMinus16.png differ diff --git a/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqXMinus24.png b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqXMinus24.png new file mode 100644 index 0000000000000000000000000000000000000000..3099381904a7e750612ca4db2f1ec962eca42781 Binary files /dev/null and b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqXMinus24.png differ diff --git a/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqXMinus32.png b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqXMinus32.png new file mode 100644 index 0000000000000000000000000000000000000000..3b99a595fb06722810590056b913ef6b1ba4e261 Binary files /dev/null and b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqXMinus32.png differ diff --git a/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqXMinus@2x.png b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqXMinus@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..32190423c268dba15752ae375dce06bddd40c9ef Binary files /dev/null and b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqXMinus@2x.png differ diff --git a/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqXPlus.png b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqXPlus.png new file mode 100644 index 0000000000000000000000000000000000000000..b8f46e28e1370aff7babe8e6ffbca3033c874982 Binary files /dev/null and b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqXPlus.png differ diff --git a/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqXPlus16.png b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqXPlus16.png new file mode 100644 index 0000000000000000000000000000000000000000..e83bcca9c37a9dbc513a3f14b69b47a2a7110877 Binary files /dev/null and b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqXPlus16.png differ diff --git a/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqXPlus24.png b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqXPlus24.png new file mode 100644 index 0000000000000000000000000000000000000000..64a150acfb3478664b319770c2bc926b65bb81e4 Binary files /dev/null and b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqXPlus24.png differ diff --git a/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqXPlus32.png b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqXPlus32.png new file mode 100644 index 0000000000000000000000000000000000000000..e0e7c081a24c1c1474ff72b02d4fca5cd0c2fdb1 Binary files /dev/null and b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqXPlus32.png differ diff --git a/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqXPlus@2x.png b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqXPlus@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..e449a7afe11b707d88f0e5a100e5a17cbd7c8c67 Binary files /dev/null and b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqXPlus@2x.png differ diff --git a/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqYMinus.png b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqYMinus.png new file mode 100644 index 0000000000000000000000000000000000000000..7216239eb4e2d03769cabb77fa6b9b7f749f23b0 Binary files /dev/null and b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqYMinus.png differ diff --git a/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqYMinus16.png b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqYMinus16.png new file mode 100644 index 0000000000000000000000000000000000000000..fe658469054f97f6096893fbcac4ee6c4727281c Binary files /dev/null and b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqYMinus16.png differ diff --git a/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqYMinus24.png b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqYMinus24.png new file mode 100644 index 0000000000000000000000000000000000000000..7b2eb4f931bb1f900e31073f4adc9b32c9eccee2 Binary files /dev/null and b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqYMinus24.png differ diff --git a/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqYMinus32.png b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqYMinus32.png new file mode 100644 index 0000000000000000000000000000000000000000..6f9edd45191a5ead6ffe88f5361871c72ba15b2f Binary files /dev/null and b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqYMinus32.png differ diff --git a/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqYMinus@2x.png b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqYMinus@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..8bee79c630518dd03b92b6183078c5fe4f970d8b Binary files /dev/null and b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqYMinus@2x.png differ diff --git a/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqYPlus.png b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqYPlus.png new file mode 100644 index 0000000000000000000000000000000000000000..76393488b07567caf8bcfb059635d9b17fd7390b Binary files /dev/null and b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqYPlus.png differ diff --git a/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqYPlus16.png b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqYPlus16.png new file mode 100644 index 0000000000000000000000000000000000000000..2e3ae495224aad089a29ef263879dc20232b9137 Binary files /dev/null and b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqYPlus16.png differ diff --git a/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqYPlus24.png b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqYPlus24.png new file mode 100644 index 0000000000000000000000000000000000000000..f09b9f73ad4eacce7b40327a5bf245eb86a76437 Binary files /dev/null and b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqYPlus24.png differ diff --git a/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqYPlus32.png b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqYPlus32.png new file mode 100644 index 0000000000000000000000000000000000000000..70689768e49189dbde8a657e92d2fd09f3ad5464 Binary files /dev/null and b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqYPlus32.png differ diff --git a/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqYPlus@2x.png b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqYPlus@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..c9bd5bed8db8572948046139c787e56fdbfdfc74 Binary files /dev/null and b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqYPlus@2x.png differ diff --git a/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqZMinus.png b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqZMinus.png new file mode 100644 index 0000000000000000000000000000000000000000..71852198301762fbc9191bfadbd41176b4962cbf Binary files /dev/null and b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqZMinus.png differ diff --git a/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqZMinus16.png b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqZMinus16.png new file mode 100644 index 0000000000000000000000000000000000000000..0512de9c8386009240c0703c4f98985bf216112d Binary files /dev/null and b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqZMinus16.png differ diff --git a/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqZMinus24.png b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqZMinus24.png new file mode 100644 index 0000000000000000000000000000000000000000..7a59a3826470722703482745483dd711a2046206 Binary files /dev/null and b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqZMinus24.png differ diff --git a/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqZMinus32.png b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqZMinus32.png new file mode 100644 index 0000000000000000000000000000000000000000..edbdc6b5ff98825194a15aada5fa4466617d2dec Binary files /dev/null and b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqZMinus32.png differ diff --git a/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqZMinus@2x.png b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqZMinus@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..6778748d1d67ad4d2b9d3777533304962e66faad Binary files /dev/null and b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqZMinus@2x.png differ diff --git a/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqZPlus.png b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqZPlus.png new file mode 100644 index 0000000000000000000000000000000000000000..53c4f4ec1e19c55022813c1098c6b9aef01a54be Binary files /dev/null and b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqZPlus.png differ diff --git a/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqZPlus16.png b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqZPlus16.png new file mode 100644 index 0000000000000000000000000000000000000000..95c7f59cc733a5cdadc4e301e6e1eea7bf1bf296 Binary files /dev/null and b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqZPlus16.png differ diff --git a/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqZPlus24.png b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqZPlus24.png new file mode 100644 index 0000000000000000000000000000000000000000..49a69bc7afe16409433a385c3d30f982de5ea9ff Binary files /dev/null and b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqZPlus24.png differ diff --git a/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqZPlus32.png b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqZPlus32.png new file mode 100644 index 0000000000000000000000000000000000000000..dde5dedcbddcb4132ca3cfc2fbad55010f9324e0 Binary files /dev/null and b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqZPlus32.png differ diff --git a/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqZPlus@2x.png b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqZPlus@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..d93ddaf8bc3916033c433d7d5be2246b005560e3 Binary files /dev/null and b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqZPlus@2x.png differ diff --git a/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqZoomToData.png b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqZoomToData.png new file mode 100644 index 0000000000000000000000000000000000000000..454ec3f2f9616fccda87e81b427bd004bb7a70a1 Binary files /dev/null and b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqZoomToData.png differ diff --git a/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqZoomToData24.png b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqZoomToData24.png new file mode 100644 index 0000000000000000000000000000000000000000..1a06b0ba4b522c097cb8989585cba0c1716b8929 Binary files /dev/null and b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqZoomToData24.png differ diff --git a/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqZoomToData@2x.png b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqZoomToData@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..6012846b724dc99cd87bbf5aee9ae68519ccdf8a Binary files /dev/null and b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqZoomToData@2x.png differ diff --git a/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqZoomToSelection.png b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqZoomToSelection.png new file mode 100644 index 0000000000000000000000000000000000000000..ec6af6c0d1d16ab8366493eda941e6a3097f6359 Binary files /dev/null and b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqZoomToSelection.png differ diff --git a/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqZoomToSelection24.png b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqZoomToSelection24.png new file mode 100644 index 0000000000000000000000000000000000000000..414b3e7d108c1aaa17df4930ba74b68ed86a8544 Binary files /dev/null and b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqZoomToSelection24.png differ diff --git a/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqZoomToSelection@2x.png b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqZoomToSelection@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..b8976b51772eb4892eeee16acbdb6fcf612357f6 Binary files /dev/null and b/Vates/VatesSimpleGui/ViewWidgets/icons/pqWidgets/Icons/pqZoomToSelection@2x.png differ diff --git a/Vates/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/MdViewerWidget.ui b/Vates/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/MdViewerWidget.ui index f9b7ddbb5f656c6bdce8961b185db0d39b2022c1..ccf4c8b0a4132cbba6b92c4df77d89fcbd216abe 100644 --- a/Vates/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/MdViewerWidget.ui +++ b/Vates/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/MdViewerWidget.ui @@ -73,7 +73,7 @@ </spacer> </item> <item> - <widget class="pqCameraToolbar" name="cameraWidget" native="true"/> + <widget class="pqCameraToolbarNonOrthogonalAxes" name="cameraWidget" native="true"/> </item> <item> <widget class="QToolButton" name="parallelProjButton"> @@ -332,9 +332,9 @@ <container>1</container> </customwidget> <customwidget> - <class>pqCameraToolbar</class> + <class>pqCameraToolbarNonOrthogonalAxes</class> <extends>QWidget</extends> - <header>pqCameraToolbar.h</header> + <header>MantidVatesSimpleGuiViewWidgets/pqCameraToolbarNonOrthogonalAxes.h</header> <container>1</container> </customwidget> <customwidget> diff --git a/Vates/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/pqCameraReactionNonOrthogonalAxes.h b/Vates/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/pqCameraReactionNonOrthogonalAxes.h new file mode 100644 index 0000000000000000000000000000000000000000..04f8ba4dcfb17ca45f34b685529965aac762de6e --- /dev/null +++ b/Vates/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/pqCameraReactionNonOrthogonalAxes.h @@ -0,0 +1,123 @@ +/*========================================================================= + + Program: ParaView + Module: pqCameraReaction.h + + Copyright (c) 2005,2006 Sandia Corporation, Kitware Inc. + All rights reserved. + + ParaView is a free software; you can redistribute it and/or modify it + under the terms of the ParaView license version 1.2. + + See License_v1.2.txt for the full ParaView license. + A copy of this license can be obtained by contacting + Kitware Inc. + 28 Corporate Drive + Clifton Park, NY 12065 + USA + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR +CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +========================================================================*/ + +/** + * Modified Camera reaction to adjust view along nonorthogonal axes + + @date 19/04/2017 + + Copyright © 2013 ISIS Rutherford Appleton Laboratory, NScD Oak Ridge + National Laboratory & European Spallation Source + + This file is part of Mantid. + + Mantid is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + Mantid is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. + + File change history is stored at: <https://github.com/mantidproject/mantid> + Code Documentation is available at: <http://doxygen.mantidproject.org> +*/ + +#ifndef pqCameraReactionNonOrthogonalAxes_h +#define pqCameraReactionNonOrthogonalAxes_h + +#include "pqReaction.h" + +/** +* @ingroup Reactions +* pqCameraReaction has the logic to handle common operations associated with +* the camera such as reset view along X axis etc. +*/ +class PQAPPLICATIONCOMPONENTS_EXPORT pqCameraReactionNonOrthogonalAxes + : public pqReaction { + Q_OBJECT + typedef pqReaction Superclass; + +public: + enum Mode { + RESET_CAMERA, + RESET_POSITIVE_U, + RESET_POSITIVE_V, + RESET_POSITIVE_W, + RESET_NEGATIVE_U, + RESET_NEGATIVE_V, + RESET_NEGATIVE_W, + ZOOM_TO_DATA, + ROTATE_CAMERA_CW, + ROTATE_CAMERA_CCW + }; + + pqCameraReactionNonOrthogonalAxes(QAction *parent, Mode mode); + pqCameraReactionNonOrthogonalAxes(const pqCameraReactionNonOrthogonalAxes &) = + delete; + pqCameraReactionNonOrthogonalAxes & + operator=(const pqCameraReactionNonOrthogonalAxes &) = delete; + static void resetCamera(); + static void resetPositiveU(); + static void resetPositiveV(); + static void resetPositiveW(); + static void resetNegativeU(); + static void resetNegativeV(); + static void resetNegativeW(); + static void resetDirection(double look_u, double look_v, double look_w, + double up_u, double up_v, double up_w); + static void zoomToData(); + static void rotateCamera(double angle); + +public slots: + /** + * Updates the enabled state. Applications need not explicitly call + * this. + */ + void updateEnableState(); + +protected: + /** + * Called when the action is triggered. + */ + virtual void onTriggered(); + +private: + Mode ReactionMode; +}; + +#endif diff --git a/Vates/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/pqCameraToolbarNonOrthogonalAxes.h b/Vates/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/pqCameraToolbarNonOrthogonalAxes.h new file mode 100644 index 0000000000000000000000000000000000000000..1481f932d92972dd53e45265f725df7531db6bdb --- /dev/null +++ b/Vates/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/pqCameraToolbarNonOrthogonalAxes.h @@ -0,0 +1,98 @@ +/*========================================================================= + + Program: ParaView + Module: pqCameraToolbar.h + + Copyright (c) 2005,2006 Sandia Corporation, Kitware Inc. + All rights reserved. + + ParaView is a free software; you can redistribute it and/or modify it + under the terms of the ParaView license version 1.2. + + See License_v1.2.txt for the full ParaView license. + A copy of this license can be obtained by contacting + Kitware Inc. + 28 Corporate Drive + Clifton Park, NY 12065 + USA + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR +CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +========================================================================*/ + +/** + * Modified Camera toolbar to adjust view along nonorthogonal axes + + @date 19/04/2017 + + Copyright © 2013 ISIS Rutherford Appleton Laboratory, NScD Oak Ridge + National Laboratory & European Spallation Source + + This file is part of Mantid. + + Mantid is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + Mantid is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. + + File change history is stored at: <https://github.com/mantidproject/mantid> + Code Documentation is available at: <http://doxygen.mantidproject.org> +*/ + +#ifndef pqCameraToolbarNonOrthogonalAxes_h +#define pqCameraToolbarNonOrthogonalAxes_h + +#include "pqApplicationComponentsModule.h" +#include <QToolBar> + +/** +* pqCameraToolbarNonOrthogonalAxes is the toolbar that has icons for resetting +* camera +* orientations as well as zoom-to-data and zoom-to-box. +*/ +class PQAPPLICATIONCOMPONENTS_EXPORT pqCameraToolbarNonOrthogonalAxes + : public QToolBar { + Q_OBJECT + typedef QToolBar Superclass; + +public: + pqCameraToolbarNonOrthogonalAxes(const QString &title, + QWidget *parentObject = 0) + : Superclass(title, parentObject) { + this->constructor(); + } + pqCameraToolbarNonOrthogonalAxes(QWidget *parentObject = 0) + : Superclass(parentObject) { + this->constructor(); + } + pqCameraToolbarNonOrthogonalAxes(const pqCameraToolbarNonOrthogonalAxes &) = + delete; + pqCameraToolbarNonOrthogonalAxes & + operator=(const pqCameraToolbarNonOrthogonalAxes &) = delete; +private slots: + void updateEnabledState(); + +private: + void constructor(); + QAction *ZoomToDataAction; +}; + +#endif diff --git a/Vates/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/pqCameraToolbarNonOrthogonalAxes.ui b/Vates/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/pqCameraToolbarNonOrthogonalAxes.ui new file mode 100644 index 0000000000000000000000000000000000000000..47b7da8e99a439e29e7d02800b7fbabbd553ab7e --- /dev/null +++ b/Vates/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/pqCameraToolbarNonOrthogonalAxes.ui @@ -0,0 +1,248 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>pqCameraToolbarNonOrthogonalAxes</class> + <widget class="QToolBar" name="pqCameraToolbarNonOrthogonalAxes"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>336</width> + <height>44</height> + </rect> + </property> + <property name="windowTitle"> + <string>Camera Controls</string> + </property> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <action name="actionResetCamera"> + <property name="enabled"> + <bool>false</bool> + </property> + <property name="icon"> + <iconset resource="../../icons/ViewWidgetsIcons.qrc"> + <normaloff>:/VatesSimpleGuiViewWidgets/icons/pqWidgets/Icons/pqResetCamera.png</normaloff>:/VatesSimpleGuiViewWidgets/icons/pqWidgets/Icons/pqResetCamera.png</iconset> + </property> + <property name="text"> + <string>&Reset</string> + </property> + <property name="iconText"> + <string>Reset Camera</string> + </property> + <property name="statusTip"> + <string>Reset Camera</string> + </property> + </action> + <action name="actionPositiveU"> + <property name="enabled"> + <bool>false</bool> + </property> + <property name="icon"> + <iconset resource="../../icons/ViewWidgetsIcons.qrc"> + <normaloff>:/VatesSimpleGuiViewWidgets/icons/pqWidgets/Icons/pqXPlus.png</normaloff>:/VatesSimpleGuiViewWidgets/icons/pqWidgets/Icons/pqXPlus.png</iconset> + </property> + <property name="text"> + <string>+U</string> + </property> + <property name="toolTip"> + <string>Set view direction to +U</string> + </property> + <property name="statusTip"> + <string>Set view direction to +U</string> + </property> + <property name="whatsThis"> + <string>Set view direction to +U</string> + </property> + </action> + <action name="actionNegativeU"> + <property name="enabled"> + <bool>false</bool> + </property> + <property name="icon"> + <iconset resource="../../icons/ViewWidgetsIcons.qrc"> + <normaloff>:/VatesSimpleGuiViewWidgets/icons/pqWidgets/Icons/pqXMinus.png</normaloff>:/VatesSimpleGuiViewWidgets/icons/pqWidgets/Icons/pqXMinus.png</iconset> + </property> + <property name="text"> + <string>-U</string> + </property> + <property name="toolTip"> + <string>Set view direction to -U</string> + </property> + <property name="statusTip"> + <string>Set view direction to -U</string> + </property> + <property name="whatsThis"> + <string>Set view direction to -U</string> + </property> + </action> + <action name="actionPositiveV"> + <property name="enabled"> + <bool>false</bool> + </property> + <property name="icon"> + <iconset resource="../../icons/ViewWidgetsIcons.qrc"> + <normaloff>:/VatesSimpleGuiViewWidgets/icons/pqWidgets/Icons/pqYPlus.png</normaloff>:/VatesSimpleGuiViewWidgets/icons/pqWidgets/Icons/pqYPlus.png</iconset> + </property> + <property name="text"> + <string>+V</string> + </property> + <property name="toolTip"> + <string>Set view direction to +V</string> + </property> + <property name="statusTip"> + <string>Set view direction to +V</string> + </property> + <property name="whatsThis"> + <string>Set view direction to +V</string> + </property> + </action> + <action name="actionNegativeV"> + <property name="enabled"> + <bool>false</bool> + </property> + <property name="icon"> + <iconset resource="../../icons/ViewWidgetsIcons.qrc"> + <normaloff>:/VatesSimpleGuiViewWidgets/icons/pqWidgets/Icons/pqYMinus.png</normaloff>:/VatesSimpleGuiViewWidgets/icons/pqWidgets/Icons/pqYMinus.png</iconset> + </property> + <property name="text"> + <string>-V</string> + </property> + <property name="toolTip"> + <string>Set view direction to -V</string> + </property> + <property name="statusTip"> + <string>Set view direction to -V</string> + </property> + <property name="whatsThis"> + <string>Set view direction to -V</string> + </property> + </action> + <action name="actionPositiveW"> + <property name="enabled"> + <bool>false</bool> + </property> + <property name="icon"> + <iconset resource="../../icons/ViewWidgetsIcons.qrc"> + <normaloff>:/VatesSimpleGuiViewWidgets/icons/pqWidgets/Icons/pqZPlus.png</normaloff>:/VatesSimpleGuiViewWidgets/icons/pqWidgets/Icons/pqZPlus.png</iconset> + </property> + <property name="text"> + <string>+W</string> + </property> + <property name="toolTip"> + <string>Set view direction to +W</string> + </property> + <property name="statusTip"> + <string>Set view direction to +W</string> + </property> + <property name="whatsThis"> + <string>Set view direction to +W</string> + </property> + </action> + <action name="actionNegativeW"> + <property name="enabled"> + <bool>false</bool> + </property> + <property name="icon"> + <iconset resource="../../icons/ViewWidgetsIcons.qrc"> + <normaloff>:/VatesSimpleGuiViewWidgets/icons/pqWidgets/Icons/pqZMinus.png</normaloff>:/VatesSimpleGuiViewWidgets/icons/pqWidgets/Icons/pqZMinus.png</iconset> + </property> + <property name="text"> + <string>-W</string> + </property> + <property name="toolTip"> + <string>Set view direction to -W</string> + </property> + <property name="statusTip"> + <string>Set view direction to -W</string> + </property> + <property name="whatsThis"> + <string>Set view direction to -W</string> + </property> + </action> + <action name="actionRotate90degCW"> + <property name="enabled"> + <bool>false</bool> + </property> + <property name="icon"> + <iconset resource="../../icons/ViewWidgetsIcons.qrc"> + <normaloff>:/VatesSimpleGuiViewWidgets/icons/pqWidgets/Icons/pqRotateCameraCW.png</normaloff>:/VatesSimpleGuiViewWidgets/icons/pqWidgets/Icons/pqRotateCameraCW.png</iconset> + </property> + <property name="text"> + <string/> + </property> + <property name="toolTip"> + <string>Rotate 90° clockwise</string> + </property> + <property name="statusTip"> + <string>Rotate 90° clockwise</string> + </property> + <property name="whatsThis"> + <string>Rotate 90° clockwise</string> + </property> + </action> + <action name="actionRotate90degCCW"> + <property name="enabled"> + <bool>false</bool> + </property> + <property name="icon"> + <iconset resource="../../icons/ViewWidgetsIcons.qrc"> + <normaloff>:/VatesSimpleGuiViewWidgets/icons/pqWidgets/Icons/pqRotateCameraCCW.png</normaloff>:/VatesSimpleGuiViewWidgets/icons/pqWidgets/Icons/pqRotateCameraCCW.png</iconset> + </property> + <property name="text"> + <string/> + </property> + <property name="toolTip"> + <string>Rotate 90° counterclockwise</string> + </property> + <property name="statusTip"> + <string>Rotate 90° counterclockwise</string> + </property> + <property name="whatsThis"> + <string>Rotate 90° counterclockwise</string> + </property> + </action> + <action name="actionZoomToBox"> + <property name="checkable"> + <bool>true</bool> + </property> + <property name="icon"> + <iconset resource="../../icons/ViewWidgetsIcons.qrc"> + <normaloff>:/VatesSimpleGuiViewWidgets/icons/pqWidgets/Icons/pqZoomToSelection.png</normaloff>:/VatesSimpleGuiViewWidgets/icons/pqWidgets/Icons/pqZoomToSelection.png</iconset> + </property> + <property name="text"> + <string>Zoom to Box</string> + </property> + <property name="statusTip"> + <string>Zoom to Box</string> + </property> + </action> + <action name="actionZoomToData"> + <property name="icon"> + <iconset resource="../../icons/ViewWidgetsIcons.qrc"> + <normaloff>:/VatesSimpleGuiViewWidgets/icons/pqWidgets/Icons/pqZoomToData.png</normaloff>:/VatesSimpleGuiViewWidgets/icons/pqWidgets/Icons/pqZoomToData.png</iconset> + </property> + <property name="text"> + <string>ZTD</string> + </property> + <property name="toolTip"> + <string>Zoom To Data</string> + </property> + </action> + <addaction name="actionResetCamera"/> + <addaction name="actionZoomToData"/> + <addaction name="actionZoomToBox"/> + <addaction name="actionPositiveU"/> + <addaction name="actionNegativeU"/> + <addaction name="actionPositiveV"/> + <addaction name="actionNegativeV"/> + <addaction name="actionPositiveW"/> + <addaction name="actionNegativeW"/> + <addaction name="actionRotate90degCW"/> + <addaction name="actionRotate90degCCW"/> + </widget> + <resources> + <include location="../../icons/ViewWidgetsIcons.qrc"/> + </resources> + <connections/> +</ui> diff --git a/Vates/VatesSimpleGui/ViewWidgets/src/pqCameraReactionNonOrthogonalAxes.cpp b/Vates/VatesSimpleGui/ViewWidgets/src/pqCameraReactionNonOrthogonalAxes.cpp new file mode 100644 index 0000000000000000000000000000000000000000..86b9bdf9caf754a305aa5dbcabf05d51b1a0b748 --- /dev/null +++ b/Vates/VatesSimpleGui/ViewWidgets/src/pqCameraReactionNonOrthogonalAxes.cpp @@ -0,0 +1,245 @@ +/*========================================================================= + + Program: ParaView + Module: pqCameraReaction.cxx + + Copyright (c) 2005,2006 Sandia Corporation, Kitware Inc. + All rights reserved. + + ParaView is a free software; you can redistribute it and/or modify it + under the terms of the ParaView license version 1.2. + + See License_v1.2.txt for the full ParaView license. + A copy of this license can be obtained by contacting + Kitware Inc. + 28 Corporate Drive + Clifton Park, NY 12065 + USA + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR +CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +========================================================================*/ +#include "MantidVatesSimpleGuiViewWidgets/pqCameraReactionNonOrthogonalAxes.h" + +#include "pqActiveObjects.h" +#include "pqModelTransformSupportBehavior.h" +#include "pqPipelineRepresentation.h" +#include "pqRenderView.h" + +#include "vtkCamera.h" +#include "vtkDataObject.h" +#include "vtkMatrix4x4.h" +#include "vtkMatrixToLinearTransform.h" +#include "vtkPVArrayInformation.h" +#include "vtkPVDataInformation.h" +#include "vtkPVXMLElement.h" +#include "vtkSMRenderViewProxy.h" +#include "vtkSMSourceProxy.h" + +#include <algorithm> +#include <array> + +namespace { +static vtkSMSourceProxy * +FindVisibleProducerWithChangeOfBasisMatrix(pqView *view) { + foreach (pqRepresentation *repr, view->getRepresentations()) { + pqDataRepresentation *drepr = qobject_cast<pqDataRepresentation *>(repr); + if (!drepr || !drepr->isVisible()) { + continue; + } + + vtkPVDataInformation *info = drepr->getInputDataInformation(); + vtkPVArrayInformation *cobm = + info->GetArrayInformation("ChangeOfBasisMatrix", vtkDataObject::FIELD); + vtkPVArrayInformation *bbimc = + cobm + ? info->GetArrayInformation("BoundingBoxInModelCoordinates", + vtkDataObject::FIELD) + : nullptr; + if (cobm && bbimc) { + return vtkSMSourceProxy::SafeDownCast(drepr->getInput()->getProxy()); + } + } + return nullptr; +} +} + +//----------------------------------------------------------------------------- +pqCameraReactionNonOrthogonalAxes::pqCameraReactionNonOrthogonalAxes( + QAction *parentObject, pqCameraReactionNonOrthogonalAxes::Mode mode) + : Superclass(parentObject) { + this->ReactionMode = mode; + QObject::connect(&pqActiveObjects::instance(), SIGNAL(viewChanged(pqView *)), + this, SLOT(updateEnableState()), Qt::QueuedConnection); + this->updateEnableState(); +} + +//----------------------------------------------------------------------------- +void pqCameraReactionNonOrthogonalAxes::updateEnableState() { + pqView *view = pqActiveObjects::instance().activeView(); + pqPipelineSource *source = pqActiveObjects::instance().activeSource(); + pqRenderView *rview = qobject_cast<pqRenderView *>(view); + if (view && this->ReactionMode == RESET_CAMERA) { + this->parentAction()->setEnabled(true); + } else if (rview) { + if (this->ReactionMode == ZOOM_TO_DATA) { + this->parentAction()->setEnabled(source != 0); + } else { + // Check hints to see if actions should be disabled + bool cameraResetButtonsEnabled = true; + vtkPVXMLElement *hints = rview->getHints(); + if (hints) { + cameraResetButtonsEnabled = + hints->FindNestedElementByName("DisableCameraToolbarButtons") == + nullptr; + } + + this->parentAction()->setEnabled(cameraResetButtonsEnabled); + } + } else { + this->parentAction()->setEnabled(false); + } +} + +//----------------------------------------------------------------------------- +void pqCameraReactionNonOrthogonalAxes::onTriggered() { + switch (this->ReactionMode) { + case RESET_CAMERA: + this->resetCamera(); + break; + + case RESET_POSITIVE_U: + this->resetPositiveU(); + break; + + case RESET_POSITIVE_V: + this->resetPositiveV(); + break; + + case RESET_POSITIVE_W: + this->resetPositiveW(); + break; + + case RESET_NEGATIVE_U: + this->resetNegativeU(); + break; + + case RESET_NEGATIVE_V: + this->resetNegativeV(); + break; + + case RESET_NEGATIVE_W: + this->resetNegativeW(); + break; + + case ZOOM_TO_DATA: + this->zoomToData(); + break; + + case ROTATE_CAMERA_CW: + this->rotateCamera(90.0); + break; + + case ROTATE_CAMERA_CCW: + this->rotateCamera(-90.0); + break; + } +} + +//----------------------------------------------------------------------------- +void pqCameraReactionNonOrthogonalAxes::resetCamera() { + pqView *view = pqActiveObjects::instance().activeView(); + if (view) { + view->resetDisplay(); + } +} + +//----------------------------------------------------------------------------- +void pqCameraReactionNonOrthogonalAxes::resetDirection(double look_x, + double look_y, + double look_z, + double up_x, double up_y, + double up_z) { + pqRenderView *ren = + qobject_cast<pqRenderView *>(pqActiveObjects::instance().activeView()); + if (ren) { + double look[3] = {look_x, look_y, look_z}; + vtkSMSourceProxy *nonOrthogonalSource = + FindVisibleProducerWithChangeOfBasisMatrix(ren); + if (nonOrthogonalSource) { + vtkTuple<double, 16> cobm = + pqModelTransformSupportBehavior::getChangeOfBasisMatrix( + nonOrthogonalSource); + vtkNew<vtkMatrix4x4> mat; + mat->DeepCopy(cobm.GetData()); + vtkNew<vtkMatrixToLinearTransform> transform; + transform->SetInput(mat.Get()); + transform->TransformPoint(look, look); + // vtkPerspectiveTransform::SetupCamera will orthogonalize viewUp. + } + ren->resetViewDirection(look[0], look[1], look[2], up_x, up_y, up_z); + } +} + +//----------------------------------------------------------------------------- +void pqCameraReactionNonOrthogonalAxes::resetPositiveU() { + pqCameraReactionNonOrthogonalAxes::resetDirection(1, 0, 0, 0, 0, 1); +} + +//----------------------------------------------------------------------------- +void pqCameraReactionNonOrthogonalAxes::resetNegativeU() { + pqCameraReactionNonOrthogonalAxes::resetDirection(-1, 0, 0, 0, 0, 1); +} + +//----------------------------------------------------------------------------- +void pqCameraReactionNonOrthogonalAxes::resetPositiveV() { + pqCameraReactionNonOrthogonalAxes::resetDirection(0, 1, 0, 0, 0, 1); +} + +//----------------------------------------------------------------------------- +void pqCameraReactionNonOrthogonalAxes::resetNegativeV() { + pqCameraReactionNonOrthogonalAxes::resetDirection(0, -1, 0, 0, 0, 1); +} + +//----------------------------------------------------------------------------- +void pqCameraReactionNonOrthogonalAxes::resetPositiveW() { + pqCameraReactionNonOrthogonalAxes::resetDirection(0, 0, 1, 0, 1, 0); +} + +//----------------------------------------------------------------------------- +void pqCameraReactionNonOrthogonalAxes::resetNegativeW() { + pqCameraReactionNonOrthogonalAxes::resetDirection(0, 0, -1, 0, 1, 0); +} + +//----------------------------------------------------------------------------- +void pqCameraReactionNonOrthogonalAxes::zoomToData() { + pqRenderView *renModule = + qobject_cast<pqRenderView *>(pqActiveObjects::instance().activeView()); + pqPipelineRepresentation *repr = qobject_cast<pqPipelineRepresentation *>( + pqActiveObjects::instance().activeRepresentation()); + if (renModule && repr) { + vtkSMRenderViewProxy *rm = renModule->getRenderViewProxy(); + rm->ZoomTo(repr->getProxy()); + renModule->render(); + } +} + +//----------------------------------------------------------------------------- +void pqCameraReactionNonOrthogonalAxes::rotateCamera(double angle) { + pqRenderView *renModule = + qobject_cast<pqRenderView *>(pqActiveObjects::instance().activeView()); + if (renModule) { + renModule->getRenderViewProxy()->GetActiveCamera()->Roll(angle); + renModule->render(); + } +} diff --git a/Vates/VatesSimpleGui/ViewWidgets/src/pqCameraToolbarNonOrthogonalAxes.cpp b/Vates/VatesSimpleGui/ViewWidgets/src/pqCameraToolbarNonOrthogonalAxes.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1b9410c7dffefc0e3974689cbfe763d803092a61 --- /dev/null +++ b/Vates/VatesSimpleGui/ViewWidgets/src/pqCameraToolbarNonOrthogonalAxes.cpp @@ -0,0 +1,85 @@ +/*========================================================================= + + Program: ParaView + Module: pqCameraToolbar.cxx + + Copyright (c) 2005,2006 Sandia Corporation, Kitware Inc. + All rights reserved. + + ParaView is a free software; you can redistribute it and/or modify it + under the terms of the ParaView license version 1.2. + + See License_v1.2.txt for the full ParaView license. + A copy of this license can be obtained by contacting + Kitware Inc. + 28 Corporate Drive + Clifton Park, NY 12065 + USA + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR +CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +========================================================================*/ +#include "MantidVatesSimpleGuiViewWidgets/pqCameraToolbarNonOrthogonalAxes.h" +#include "ui_pqCameraToolbarNonOrthogonalAxes.h" + +#include "MantidVatesSimpleGuiViewWidgets/pqCameraReactionNonOrthogonalAxes.h" +#include "pqActiveObjects.h" +#include "pqRenderViewSelectionReaction.h" + +//----------------------------------------------------------------------------- +void pqCameraToolbarNonOrthogonalAxes::constructor() { + Ui::pqCameraToolbarNonOrthogonalAxes ui; + ui.setupUi(this); + new pqCameraReactionNonOrthogonalAxes( + ui.actionResetCamera, pqCameraReactionNonOrthogonalAxes::RESET_CAMERA); + new pqCameraReactionNonOrthogonalAxes( + ui.actionZoomToData, pqCameraReactionNonOrthogonalAxes::ZOOM_TO_DATA); + new pqCameraReactionNonOrthogonalAxes( + ui.actionPositiveU, pqCameraReactionNonOrthogonalAxes::RESET_POSITIVE_U); + new pqCameraReactionNonOrthogonalAxes( + ui.actionNegativeU, pqCameraReactionNonOrthogonalAxes::RESET_NEGATIVE_U); + new pqCameraReactionNonOrthogonalAxes( + ui.actionPositiveV, pqCameraReactionNonOrthogonalAxes::RESET_POSITIVE_V); + new pqCameraReactionNonOrthogonalAxes( + ui.actionNegativeV, pqCameraReactionNonOrthogonalAxes::RESET_NEGATIVE_V); + new pqCameraReactionNonOrthogonalAxes( + ui.actionPositiveW, pqCameraReactionNonOrthogonalAxes::RESET_POSITIVE_W); + new pqCameraReactionNonOrthogonalAxes( + ui.actionNegativeW, pqCameraReactionNonOrthogonalAxes::RESET_NEGATIVE_W); + new pqCameraReactionNonOrthogonalAxes( + ui.actionRotate90degCW, + pqCameraReactionNonOrthogonalAxes::ROTATE_CAMERA_CCW); + new pqCameraReactionNonOrthogonalAxes( + ui.actionRotate90degCCW, + pqCameraReactionNonOrthogonalAxes::ROTATE_CAMERA_CW); + + new pqRenderViewSelectionReaction(ui.actionZoomToBox, NULL, + pqRenderViewSelectionReaction::ZOOM_TO_BOX); + + this->ZoomToDataAction = ui.actionZoomToData; + this->ZoomToDataAction->setEnabled( + pqActiveObjects::instance().activeSource() != 0); + + QObject::connect(&pqActiveObjects::instance(), SIGNAL(viewChanged(pqView *)), + this, SLOT(updateEnabledState())); + QObject::connect(&pqActiveObjects::instance(), + SIGNAL(sourceChanged(pqPipelineSource *)), this, + SLOT(updateEnabledState())); +} + +//----------------------------------------------------------------------------- +void pqCameraToolbarNonOrthogonalAxes::updateEnabledState() { + pqView *view = pqActiveObjects::instance().activeView(); + pqPipelineSource *source = pqActiveObjects::instance().activeSource(); + this->ZoomToDataAction->setEnabled(source && view); +}