From 0a2b68348f3c229be86f6dc5c9e9682bda7dc4cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacob=20St=C3=B8ren?= Date: Mon, 27 Aug 2018 15:49:57 +0200 Subject: [PATCH] #3249 Refactoring: Rename of classes to PickEventHandler --- ApplicationCode/Commands/CMakeLists_files.cmake | 1 + .../RicNewAzimuthDipIntersectionFeature.h | 2 +- .../RicNewPolylineIntersectionFeature.h | 2 +- ...iewerEventInterface.h => RicPickEventHandler.h} | 0 .../WellLogCommands/CMakeLists_files.cmake | 4 ++-- ...r.cpp => Ric3dWellLogCurvePickEventHandler.cpp} | 8 ++++---- ...ndler.h => Ric3dWellLogCurvePickEventHandler.h} | 6 +++--- .../WellPathCommands/CMakeLists_files.cmake | 8 ++++---- ...ler.cpp => RicIntersectionPickEventHandler.cpp} | 8 ++++---- ...Handler.h => RicIntersectionPickEventHandler.h} | 6 +++--- ...Handler.cpp => RicWellPathPickEventHandler.cpp} | 8 ++++---- ...ventHandler.h => RicWellPathPickEventHandler.h} | 6 +++--- .../UserInterface/RiuViewerCommands.cpp | 14 +++++++------- 13 files changed, 37 insertions(+), 36 deletions(-) rename ApplicationCode/Commands/{RicViewerEventInterface.h => RicPickEventHandler.h} (100%) rename ApplicationCode/Commands/WellLogCommands/{Ric3dWellLogCurveViewerEventHandler.cpp => Ric3dWellLogCurvePickEventHandler.cpp} (91%) rename ApplicationCode/Commands/WellLogCommands/{Ric3dWellLogCurveViewerEventHandler.h => Ric3dWellLogCurvePickEventHandler.h} (86%) rename ApplicationCode/Commands/WellPathCommands/{RicIntersectionViewerEventHandler.cpp => RicIntersectionPickEventHandler.cpp} (89%) rename ApplicationCode/Commands/WellPathCommands/{RicIntersectionViewerEventHandler.h => RicIntersectionPickEventHandler.h} (86%) rename ApplicationCode/Commands/WellPathCommands/{RicWellPathViewerEventHandler.cpp => RicWellPathPickEventHandler.cpp} (95%) rename ApplicationCode/Commands/WellPathCommands/{RicWellPathViewerEventHandler.h => RicWellPathPickEventHandler.h} (87%) diff --git a/ApplicationCode/Commands/CMakeLists_files.cmake b/ApplicationCode/Commands/CMakeLists_files.cmake index c3c5171beb..26bc4e1159 100644 --- a/ApplicationCode/Commands/CMakeLists_files.cmake +++ b/ApplicationCode/Commands/CMakeLists_files.cmake @@ -45,6 +45,7 @@ ${CMAKE_CURRENT_LIST_DIR}/RicExportFeatureImpl.h ${CMAKE_CURRENT_LIST_DIR}/RicSelectOrCreateViewFeatureImpl.h +${CMAKE_CURRENT_LIST_DIR}/RicPickEventHandler.h # General delete of any object in a child array field ${CMAKE_CURRENT_LIST_DIR}/RicDeleteItemExec.h diff --git a/ApplicationCode/Commands/CrossSectionCommands/RicNewAzimuthDipIntersectionFeature.h b/ApplicationCode/Commands/CrossSectionCommands/RicNewAzimuthDipIntersectionFeature.h index 7f4fe88177..0ebafe5d7d 100644 --- a/ApplicationCode/Commands/CrossSectionCommands/RicNewAzimuthDipIntersectionFeature.h +++ b/ApplicationCode/Commands/CrossSectionCommands/RicNewAzimuthDipIntersectionFeature.h @@ -18,7 +18,7 @@ #pragma once -#include "RicViewerEventInterface.h" +#include "RicPickEventHandler.h" #include "cafCmdExecuteCommand.h" #include "cafPdmPointer.h" diff --git a/ApplicationCode/Commands/CrossSectionCommands/RicNewPolylineIntersectionFeature.h b/ApplicationCode/Commands/CrossSectionCommands/RicNewPolylineIntersectionFeature.h index e878b6a2a3..1243bf093e 100644 --- a/ApplicationCode/Commands/CrossSectionCommands/RicNewPolylineIntersectionFeature.h +++ b/ApplicationCode/Commands/CrossSectionCommands/RicNewPolylineIntersectionFeature.h @@ -19,7 +19,7 @@ #pragma once -#include "RicViewerEventInterface.h" +#include "RicPickEventHandler.h" #include "cafCmdExecuteCommand.h" #include "cafPdmPointer.h" diff --git a/ApplicationCode/Commands/RicViewerEventInterface.h b/ApplicationCode/Commands/RicPickEventHandler.h similarity index 100% rename from ApplicationCode/Commands/RicViewerEventInterface.h rename to ApplicationCode/Commands/RicPickEventHandler.h diff --git a/ApplicationCode/Commands/WellLogCommands/CMakeLists_files.cmake b/ApplicationCode/Commands/WellLogCommands/CMakeLists_files.cmake index 06f152c3f9..888789b513 100644 --- a/ApplicationCode/Commands/WellLogCommands/CMakeLists_files.cmake +++ b/ApplicationCode/Commands/WellLogCommands/CMakeLists_files.cmake @@ -26,7 +26,7 @@ ${CMAKE_CURRENT_LIST_DIR}/RicAdd3dWellLogCurveFeature.h ${CMAKE_CURRENT_LIST_DIR}/RicAdd3dWellLogFileCurveFeature.h ${CMAKE_CURRENT_LIST_DIR}/RicAdd3dWellLogRftCurveFeature.h ${CMAKE_CURRENT_LIST_DIR}/Ric3dWellLogCurveDeleteFeature.h -${CMAKE_CURRENT_LIST_DIR}/Ric3dWellLogCurveViewerEventHandler.h +${CMAKE_CURRENT_LIST_DIR}/Ric3dWellLogCurvePickEventHandler.h ${CMAKE_CURRENT_LIST_DIR}/RicNewWellBoreStabilityPlotFeature.h ) @@ -57,7 +57,7 @@ ${CMAKE_CURRENT_LIST_DIR}/RicAdd3dWellLogCurveFeature.cpp ${CMAKE_CURRENT_LIST_DIR}/RicAdd3dWellLogFileCurveFeature.cpp ${CMAKE_CURRENT_LIST_DIR}/RicAdd3dWellLogRftCurveFeature.cpp ${CMAKE_CURRENT_LIST_DIR}/Ric3dWellLogCurveDeleteFeature.cpp -${CMAKE_CURRENT_LIST_DIR}/Ric3dWellLogCurveViewerEventHandler.cpp +${CMAKE_CURRENT_LIST_DIR}/Ric3dWellLogCurvePickEventHandler.cpp ${CMAKE_CURRENT_LIST_DIR}/RicNewWellBoreStabilityPlotFeature.cpp ) diff --git a/ApplicationCode/Commands/WellLogCommands/Ric3dWellLogCurveViewerEventHandler.cpp b/ApplicationCode/Commands/WellLogCommands/Ric3dWellLogCurvePickEventHandler.cpp similarity index 91% rename from ApplicationCode/Commands/WellLogCommands/Ric3dWellLogCurveViewerEventHandler.cpp rename to ApplicationCode/Commands/WellLogCommands/Ric3dWellLogCurvePickEventHandler.cpp index 921995a466..1fb6978c14 100644 --- a/ApplicationCode/Commands/WellLogCommands/Ric3dWellLogCurveViewerEventHandler.cpp +++ b/ApplicationCode/Commands/WellLogCommands/Ric3dWellLogCurvePickEventHandler.cpp @@ -17,7 +17,7 @@ // ///////////////////////////////////////////////////////////////////////////////// -#include "Ric3dWellLogCurveViewerEventHandler.h" +#include "Ric3dWellLogCurvePickEventHandler.h" #include "Rim3dWellLogCurve.h" #include "Rim3dWellLogCurveCollection.h" @@ -30,16 +30,16 @@ //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -Ric3dWellLogCurveViewerEventHandler* Ric3dWellLogCurveViewerEventHandler::instance() +Ric3dWellLogCurvePickEventHandler* Ric3dWellLogCurvePickEventHandler::instance() { - static Ric3dWellLogCurveViewerEventHandler* singleton = new Ric3dWellLogCurveViewerEventHandler; + static Ric3dWellLogCurvePickEventHandler* singleton = new Ric3dWellLogCurvePickEventHandler; return singleton; } //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool Ric3dWellLogCurveViewerEventHandler::handlePickEvent(const Ric3DPickEvent& eventObject) +bool Ric3dWellLogCurvePickEventHandler::handlePickEvent(const Ric3DPickEvent& eventObject) { if (eventObject.m_pickItemInfos.empty()) return false; diff --git a/ApplicationCode/Commands/WellLogCommands/Ric3dWellLogCurveViewerEventHandler.h b/ApplicationCode/Commands/WellLogCommands/Ric3dWellLogCurvePickEventHandler.h similarity index 86% rename from ApplicationCode/Commands/WellLogCommands/Ric3dWellLogCurveViewerEventHandler.h rename to ApplicationCode/Commands/WellLogCommands/Ric3dWellLogCurvePickEventHandler.h index 4c2b9b3a90..78ee086c34 100644 --- a/ApplicationCode/Commands/WellLogCommands/Ric3dWellLogCurveViewerEventHandler.h +++ b/ApplicationCode/Commands/WellLogCommands/Ric3dWellLogCurvePickEventHandler.h @@ -19,15 +19,15 @@ #pragma once -#include "RicViewerEventInterface.h" +#include "RicPickEventHandler.h" //================================================================================================== /// //================================================================================================== -class Ric3dWellLogCurveViewerEventHandler : public RicPickEventHandler +class Ric3dWellLogCurvePickEventHandler : public RicPickEventHandler { public: - static Ric3dWellLogCurveViewerEventHandler* instance(); + static Ric3dWellLogCurvePickEventHandler* instance(); bool handlePickEvent(const Ric3DPickEvent& eventObject) override; }; diff --git a/ApplicationCode/Commands/WellPathCommands/CMakeLists_files.cmake b/ApplicationCode/Commands/WellPathCommands/CMakeLists_files.cmake index b3bea11701..4786535608 100644 --- a/ApplicationCode/Commands/WellPathCommands/CMakeLists_files.cmake +++ b/ApplicationCode/Commands/WellPathCommands/CMakeLists_files.cmake @@ -10,8 +10,8 @@ ${CMAKE_CURRENT_LIST_DIR}/RicDeleteWellPathTargetFeature.h ${CMAKE_CURRENT_LIST_DIR}/RicDeleteWellPathAttributeFeature.h ${CMAKE_CURRENT_LIST_DIR}/RicWellPathsUnitSystemSettingsImpl.h ${CMAKE_CURRENT_LIST_DIR}/RicWellPathsUnitSystemSettingsUi.h -${CMAKE_CURRENT_LIST_DIR}/RicWellPathViewerEventHandler.h -${CMAKE_CURRENT_LIST_DIR}/RicIntersectionViewerEventHandler.h +${CMAKE_CURRENT_LIST_DIR}/RicWellPathPickEventHandler.h +${CMAKE_CURRENT_LIST_DIR}/RicIntersectionPickEventHandler.h ${CMAKE_CURRENT_LIST_DIR}/RicWellPathFormationsImportFileFeature.h ${CMAKE_CURRENT_LIST_DIR}/PointTangentManipulator/RicPointTangentManipulator.h ) @@ -27,8 +27,8 @@ ${CMAKE_CURRENT_LIST_DIR}/RicDeleteWellPathTargetFeature.cpp ${CMAKE_CURRENT_LIST_DIR}/RicDeleteWellPathAttributeFeature.cpp ${CMAKE_CURRENT_LIST_DIR}/RicWellPathsUnitSystemSettingsImpl.cpp ${CMAKE_CURRENT_LIST_DIR}/RicWellPathsUnitSystemSettingsUi.cpp -${CMAKE_CURRENT_LIST_DIR}/RicWellPathViewerEventHandler.cpp -${CMAKE_CURRENT_LIST_DIR}/RicIntersectionViewerEventHandler.cpp +${CMAKE_CURRENT_LIST_DIR}/RicWellPathPickEventHandler.cpp +${CMAKE_CURRENT_LIST_DIR}/RicIntersectionPickEventHandler.cpp ${CMAKE_CURRENT_LIST_DIR}/RicWellPathFormationsImportFileFeature.cpp ${CMAKE_CURRENT_LIST_DIR}/PointTangentManipulator/RicPointTangentManipulator.cpp ) diff --git a/ApplicationCode/Commands/WellPathCommands/RicIntersectionViewerEventHandler.cpp b/ApplicationCode/Commands/WellPathCommands/RicIntersectionPickEventHandler.cpp similarity index 89% rename from ApplicationCode/Commands/WellPathCommands/RicIntersectionViewerEventHandler.cpp rename to ApplicationCode/Commands/WellPathCommands/RicIntersectionPickEventHandler.cpp index 0734ba8807..cb8f2dfe05 100644 --- a/ApplicationCode/Commands/WellPathCommands/RicIntersectionViewerEventHandler.cpp +++ b/ApplicationCode/Commands/WellPathCommands/RicIntersectionPickEventHandler.cpp @@ -16,7 +16,7 @@ // ///////////////////////////////////////////////////////////////////////////////// -#include "RicIntersectionViewerEventHandler.h" +#include "RicIntersectionPickEventHandler.h" #include "RimIntersection.h" #include "Rim3dView.h" @@ -28,16 +28,16 @@ //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RicIntersectionViewerEventHandler* RicIntersectionViewerEventHandler::instance() +RicIntersectionPickEventHandler* RicIntersectionPickEventHandler::instance() { - static RicIntersectionViewerEventHandler* singleton = new RicIntersectionViewerEventHandler; + static RicIntersectionPickEventHandler* singleton = new RicIntersectionPickEventHandler; return singleton; } //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicIntersectionViewerEventHandler::handlePickEvent(const Ric3DPickEvent& eventObject) +bool RicIntersectionPickEventHandler::handlePickEvent(const Ric3DPickEvent& eventObject) { std::vector selection; caf::SelectionManager::instance()->objectsByType(&selection); diff --git a/ApplicationCode/Commands/WellPathCommands/RicIntersectionViewerEventHandler.h b/ApplicationCode/Commands/WellPathCommands/RicIntersectionPickEventHandler.h similarity index 86% rename from ApplicationCode/Commands/WellPathCommands/RicIntersectionViewerEventHandler.h rename to ApplicationCode/Commands/WellPathCommands/RicIntersectionPickEventHandler.h index 418fd66883..b74b9341fb 100644 --- a/ApplicationCode/Commands/WellPathCommands/RicIntersectionViewerEventHandler.h +++ b/ApplicationCode/Commands/WellPathCommands/RicIntersectionPickEventHandler.h @@ -18,15 +18,15 @@ #pragma once -#include "RicViewerEventInterface.h" +#include "RicPickEventHandler.h" //================================================================================================== /// //================================================================================================== -class RicIntersectionViewerEventHandler : public RicPickEventHandler +class RicIntersectionPickEventHandler : public RicPickEventHandler { public: - static RicIntersectionViewerEventHandler* instance(); + static RicIntersectionPickEventHandler* instance(); protected: virtual bool handlePickEvent(const Ric3DPickEvent& eventObject) override; diff --git a/ApplicationCode/Commands/WellPathCommands/RicWellPathViewerEventHandler.cpp b/ApplicationCode/Commands/WellPathCommands/RicWellPathPickEventHandler.cpp similarity index 95% rename from ApplicationCode/Commands/WellPathCommands/RicWellPathViewerEventHandler.cpp rename to ApplicationCode/Commands/WellPathCommands/RicWellPathPickEventHandler.cpp index fcf599b94b..3dd08505e5 100644 --- a/ApplicationCode/Commands/WellPathCommands/RicWellPathViewerEventHandler.cpp +++ b/ApplicationCode/Commands/WellPathCommands/RicWellPathPickEventHandler.cpp @@ -17,7 +17,7 @@ // ///////////////////////////////////////////////////////////////////////////////// -#include "RicWellPathViewerEventHandler.h" +#include "RicWellPathPickEventHandler.h" #include "RiaApplication.h" @@ -41,16 +41,16 @@ //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RicWellPathViewerEventHandler* RicWellPathViewerEventHandler::instance() +RicWellPathPickEventHandler* RicWellPathPickEventHandler::instance() { - static RicWellPathViewerEventHandler* singleton = new RicWellPathViewerEventHandler; + static RicWellPathPickEventHandler* singleton = new RicWellPathPickEventHandler; return singleton; } //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicWellPathViewerEventHandler::handlePickEvent(const Ric3DPickEvent& eventObject) +bool RicWellPathPickEventHandler::handlePickEvent(const Ric3DPickEvent& eventObject) { if (eventObject.m_pickItemInfos.empty()) return false; diff --git a/ApplicationCode/Commands/WellPathCommands/RicWellPathViewerEventHandler.h b/ApplicationCode/Commands/WellPathCommands/RicWellPathPickEventHandler.h similarity index 87% rename from ApplicationCode/Commands/WellPathCommands/RicWellPathViewerEventHandler.h rename to ApplicationCode/Commands/WellPathCommands/RicWellPathPickEventHandler.h index d9a10c9591..9687bf206f 100644 --- a/ApplicationCode/Commands/WellPathCommands/RicWellPathViewerEventHandler.h +++ b/ApplicationCode/Commands/WellPathCommands/RicWellPathPickEventHandler.h @@ -19,16 +19,16 @@ #pragma once -#include "RicViewerEventInterface.h" +#include "RicPickEventHandler.h" //================================================================================================== /// //================================================================================================== -class RicWellPathViewerEventHandler : public RicPickEventHandler +class RicWellPathPickEventHandler : public RicPickEventHandler { public: - static RicWellPathViewerEventHandler* instance(); + static RicWellPathPickEventHandler* instance(); bool handlePickEvent(const Ric3DPickEvent& eventObject) override; }; diff --git a/ApplicationCode/UserInterface/RiuViewerCommands.cpp b/ApplicationCode/UserInterface/RiuViewerCommands.cpp index 3373900c81..ed3114496a 100644 --- a/ApplicationCode/UserInterface/RiuViewerCommands.cpp +++ b/ApplicationCode/UserInterface/RiuViewerCommands.cpp @@ -25,10 +25,10 @@ #include "RicEclipsePropertyFilterNewExec.h" #include "RicGeoMechPropertyFilterNewExec.h" -#include "RicViewerEventInterface.h" -#include "WellLogCommands/Ric3dWellLogCurveViewerEventHandler.h" -#include "WellPathCommands/RicIntersectionViewerEventHandler.h" -#include "WellPathCommands/RicWellPathViewerEventHandler.h" +#include "RicPickEventHandler.h" +#include "WellLogCommands/Ric3dWellLogCurvePickEventHandler.h" +#include "WellPathCommands/RicIntersectionPickEventHandler.h" +#include "WellPathCommands/RicWellPathPickEventHandler.h" #include "RigEclipseCaseData.h" #include "RigFault.h" @@ -120,15 +120,15 @@ RiuViewerCommands::RiuViewerCommands(RiuViewer* ownerViewer) , m_viewer(ownerViewer) { { - m_pickEventHandlers.push_back(dynamic_cast(RicIntersectionViewerEventHandler::instance())); + m_pickEventHandlers.push_back(dynamic_cast(RicIntersectionPickEventHandler::instance())); } { - m_pickEventHandlers.push_back(dynamic_cast(Ric3dWellLogCurveViewerEventHandler::instance())); + m_pickEventHandlers.push_back(dynamic_cast(Ric3dWellLogCurvePickEventHandler::instance())); } { - m_pickEventHandlers.push_back(dynamic_cast(RicWellPathViewerEventHandler::instance())); + m_pickEventHandlers.push_back(dynamic_cast(RicWellPathPickEventHandler::instance())); } }