From d8dc62c5a7e2b2800cccb58c535c25ad7b779deb Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Fri, 19 May 2017 13:40:38 +0200 Subject: [PATCH] #1510 Remove invalid usage of namespace caf for features Also add override keyword --- .../RicCopyReferencesToClipboardFeature.cpp | 19 ++++--------- .../RicCopyReferencesToClipboardFeature.h | 20 ++++++------- .../RicPasteEclipseCasesFeature.cpp | 14 ++++------ .../RicPasteEclipseCasesFeature.h | 13 ++++----- .../RicPasteEclipseViewsFeature.cpp | 15 ++++------ .../RicPasteEclipseViewsFeature.h | 11 ++------ .../RicPasteGeoMechViewsFeature.cpp | 15 ++++------ .../RicPasteGeoMechViewsFeature.h | 14 ++-------- .../RicNewPerforationIntervalFeature.cpp | 5 ---- .../RicNewPerforationIntervalFeature.h | 15 +++------- .../Commands/RicDeleteItemExec.cpp | 25 +++++++---------- ApplicationCode/Commands/RicDeleteItemExec.h | 11 ++------ .../Commands/RicDeleteItemExecData.cpp | 5 ---- .../Commands/RicDeleteItemExecData.h | 12 ++------ .../Commands/RicDeleteItemFeature.cpp | 28 ++++++++----------- .../Commands/RicDeleteItemFeature.h | 15 +++------- .../ToggleCommands/RicToggleItemsFeature.cpp | 9 ++---- .../ToggleCommands/RicToggleItemsFeature.h | 15 +++------- .../RicToggleItemsOffFeature.cpp | 9 ++---- .../ToggleCommands/RicToggleItemsOffFeature.h | 15 +++------- .../RicToggleItemsOnFeature.cpp | 9 ++---- .../ToggleCommands/RicToggleItemsOnFeature.h | 15 +++------- .../RicAddWellLogToPlotFeature.cpp | 6 +--- .../RicAddWellLogToPlotFeature.h | 14 +++------- .../RicWellLogsImportFileFeature.cpp | 7 +---- .../RicWellLogsImportFileFeature.h | 16 ++++------- .../RicWellPathDeleteFeature.cpp | 9 +----- .../RicWellPathDeleteFeature.h | 15 +++------- ...icWellPathImportCompletionsFileFeature.cpp | 7 +---- .../RicWellPathImportCompletionsFileFeature.h | 14 +++------- .../RicWellPathsImportFileFeature.cpp | 6 +--- .../RicWellPathsImportFileFeature.h | 15 +++------- .../RicWellPathsImportSsihubFeature.cpp | 6 +--- .../RicWellPathsImportSsihubFeature.h | 15 +++------- ApplicationCode/UserInterface/RiuDragDrop.cpp | 4 +-- 35 files changed, 125 insertions(+), 318 deletions(-) diff --git a/ApplicationCode/Commands/OperationsUsingObjReferences/RicCopyReferencesToClipboardFeature.cpp b/ApplicationCode/Commands/OperationsUsingObjReferences/RicCopyReferencesToClipboardFeature.cpp index ac8ff487fd..150fc76b89 100644 --- a/ApplicationCode/Commands/OperationsUsingObjReferences/RicCopyReferencesToClipboardFeature.cpp +++ b/ApplicationCode/Commands/OperationsUsingObjReferences/RicCopyReferencesToClipboardFeature.cpp @@ -38,8 +38,6 @@ #include -namespace caf -{ CAF_CMD_SOURCE_INIT(RicCopyReferencesToClipboardFeature, "RicCopyReferencesToClipboardFeature"); @@ -63,14 +61,14 @@ void RicCopyReferencesToClipboardFeature::onActionTriggered(bool isChecked) std::vector referenceList; - std::vector selectedFormationNamesCollObjs; + std::vector selectedFormationNamesCollObjs; caf::SelectionManager::instance()->objectsByType(&selectedFormationNamesCollObjs); - for (PdmObject* pdmObject : selectedFormationNamesCollObjs) + for (caf::PdmObject* pdmObject : selectedFormationNamesCollObjs) { if (RicCopyReferencesToClipboardFeature::isCopyOfObjectSupported(pdmObject)) { - QString itemRef = PdmReferenceHelper::referenceFromRootToObject(SelectionManager::instance()->pdmRootObject(), pdmObject); + QString itemRef = caf::PdmReferenceHelper::referenceFromRootToObject(caf::SelectionManager::instance()->pdmRootObject(), pdmObject); referenceList.push_back(itemRef); } @@ -96,16 +94,15 @@ void RicCopyReferencesToClipboardFeature::setupActionLook(QAction* actionToSetup actionToSetup->setShortcuts(QKeySequence::Copy); } - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- bool RicCopyReferencesToClipboardFeature::isAnyCopyableObjectSelected() { - std::vector selectedFormationNamesCollObjs; + std::vector selectedFormationNamesCollObjs; caf::SelectionManager::instance()->objectsByType(&selectedFormationNamesCollObjs); - for (PdmObject* pdmObject : selectedFormationNamesCollObjs) + for (caf::PdmObject* pdmObject : selectedFormationNamesCollObjs) { if (RicCopyReferencesToClipboardFeature::isCopyOfObjectSupported(pdmObject)) { @@ -116,12 +113,10 @@ bool RicCopyReferencesToClipboardFeature::isAnyCopyableObjectSelected() return false; } - - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicCopyReferencesToClipboardFeature::isCopyOfObjectSupported(PdmObject* pdmObject) +bool RicCopyReferencesToClipboardFeature::isCopyOfObjectSupported(caf::PdmObject* pdmObject) { RimWellAllocationPlot* wellAllocPlot = nullptr; pdmObject->firstAncestorOrThisOfType(wellAllocPlot); @@ -161,5 +156,3 @@ bool RicCopyReferencesToClipboardFeature::isCopyOfObjectSupported(PdmObject* pdm return false; } - -} // end namespace caf diff --git a/ApplicationCode/Commands/OperationsUsingObjReferences/RicCopyReferencesToClipboardFeature.h b/ApplicationCode/Commands/OperationsUsingObjReferences/RicCopyReferencesToClipboardFeature.h index 477eba8a15..ff1b55f966 100644 --- a/ApplicationCode/Commands/OperationsUsingObjReferences/RicCopyReferencesToClipboardFeature.h +++ b/ApplicationCode/Commands/OperationsUsingObjReferences/RicCopyReferencesToClipboardFeature.h @@ -22,29 +22,25 @@ #include "cafCmdFeature.h" -namespace caf +namespace caf { - -class PdmObject; + class PdmObject; +} //================================================================================================== /// //================================================================================================== -class RicCopyReferencesToClipboardFeature : public CmdFeature +class RicCopyReferencesToClipboardFeature : public caf::CmdFeature { CAF_CMD_HEADER_INIT; protected: // Overrides - virtual bool isCommandEnabled(); - virtual void onActionTriggered( bool isChecked ); - virtual void setupActionLook( QAction* actionToSetup ); + virtual bool isCommandEnabled() override; + virtual void onActionTriggered( bool isChecked ) override; + virtual void setupActionLook( QAction* actionToSetup ) override; private: static bool isAnyCopyableObjectSelected(); - static bool isCopyOfObjectSupported(PdmObject* pdmObject); + static bool isCopyOfObjectSupported(caf::PdmObject* pdmObject); }; - - - -} // end namespace caf diff --git a/ApplicationCode/Commands/OperationsUsingObjReferences/RicPasteEclipseCasesFeature.cpp b/ApplicationCode/Commands/OperationsUsingObjReferences/RicPasteEclipseCasesFeature.cpp index 1ef1447676..596c28adbc 100644 --- a/ApplicationCode/Commands/OperationsUsingObjReferences/RicPasteEclipseCasesFeature.cpp +++ b/ApplicationCode/Commands/OperationsUsingObjReferences/RicPasteEclipseCasesFeature.cpp @@ -42,8 +42,6 @@ #include #include -namespace caf -{ CAF_CMD_SOURCE_INIT(RicPasteEclipseCasesFeature, "RicPasteEclipseCasesFeature"); @@ -53,7 +51,7 @@ CAF_CMD_SOURCE_INIT(RicPasteEclipseCasesFeature, "RicPasteEclipseCasesFeature"); //-------------------------------------------------------------------------------------------------- bool RicPasteEclipseCasesFeature::isCommandEnabled() { - PdmObjectGroup objectGroup; + caf::PdmObjectGroup objectGroup; RicPasteFeatureImpl::findObjectsFromClipboardRefs(&objectGroup); std::vector > typedObjects; @@ -64,7 +62,7 @@ bool RicPasteEclipseCasesFeature::isCommandEnabled() return false; } - PdmObjectHandle* destinationObject = dynamic_cast(SelectionManager::instance()->selectedItem()); + caf::PdmObjectHandle* destinationObject = dynamic_cast(caf::SelectionManager::instance()->selectedItem()); RimIdenticalGridCaseGroup* gridCaseGroup = RicPasteFeatureImpl::findGridCaseGroup(destinationObject); if (gridCaseGroup) return true; @@ -77,12 +75,12 @@ bool RicPasteEclipseCasesFeature::isCommandEnabled() //-------------------------------------------------------------------------------------------------- void RicPasteEclipseCasesFeature::onActionTriggered(bool isChecked) { - PdmObjectHandle* destinationObject = dynamic_cast(SelectionManager::instance()->selectedItem()); + caf::PdmObjectHandle* destinationObject = dynamic_cast(caf::SelectionManager::instance()->selectedItem()); RimIdenticalGridCaseGroup* gridCaseGroup = RicPasteFeatureImpl::findGridCaseGroup(destinationObject); if (!gridCaseGroup) return; - PdmObjectGroup objectGroup; + caf::PdmObjectGroup objectGroup; RicPasteFeatureImpl::findObjectsFromClipboardRefs(&objectGroup); if (objectGroup.objects.size() == 0) return; @@ -105,7 +103,7 @@ void RicPasteEclipseCasesFeature::setupActionLook(QAction* actionToSetup) //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RicPasteEclipseCasesFeature::addCasesToGridCaseGroup(PdmObjectGroup& objectGroup, RimIdenticalGridCaseGroup* gridCaseGroup) +void RicPasteEclipseCasesFeature::addCasesToGridCaseGroup(caf::PdmObjectGroup& objectGroup, RimIdenticalGridCaseGroup* gridCaseGroup) { RimProject* proj = RiaApplication::instance()->project(); CVF_ASSERT(proj); @@ -202,5 +200,3 @@ void RicPasteEclipseCasesFeature::addCasesToGridCaseGroup(PdmObjectGroup& object } } - -} // end namespace caf diff --git a/ApplicationCode/Commands/OperationsUsingObjReferences/RicPasteEclipseCasesFeature.h b/ApplicationCode/Commands/OperationsUsingObjReferences/RicPasteEclipseCasesFeature.h index 648f62c5ed..5a1ed65387 100644 --- a/ApplicationCode/Commands/OperationsUsingObjReferences/RicPasteEclipseCasesFeature.h +++ b/ApplicationCode/Commands/OperationsUsingObjReferences/RicPasteEclipseCasesFeature.h @@ -28,6 +28,7 @@ class RimIdenticalGridCaseGroup; namespace caf { class PdmObjectGroup; +} //================================================================================================== /// @@ -37,15 +38,11 @@ class RicPasteEclipseCasesFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; public: - static void addCasesToGridCaseGroup(PdmObjectGroup& objectGroup, RimIdenticalGridCaseGroup* gridCaseGroup); + static void addCasesToGridCaseGroup(caf::PdmObjectGroup& objectGroup, RimIdenticalGridCaseGroup* gridCaseGroup); protected: // Overrides - virtual bool isCommandEnabled(); - virtual void onActionTriggered(bool isChecked); - virtual void setupActionLook(QAction* actionToSetup); + virtual bool isCommandEnabled() override; + virtual void onActionTriggered(bool isChecked) override; + virtual void setupActionLook(QAction* actionToSetup) override; }; - - - -} // end namespace caf diff --git a/ApplicationCode/Commands/OperationsUsingObjReferences/RicPasteEclipseViewsFeature.cpp b/ApplicationCode/Commands/OperationsUsingObjReferences/RicPasteEclipseViewsFeature.cpp index 97fb22d65a..aecc75ee64 100644 --- a/ApplicationCode/Commands/OperationsUsingObjReferences/RicPasteEclipseViewsFeature.cpp +++ b/ApplicationCode/Commands/OperationsUsingObjReferences/RicPasteEclipseViewsFeature.cpp @@ -35,8 +35,6 @@ #include -namespace caf -{ CAF_CMD_SOURCE_INIT(RicPasteEclipseViewsFeature, "RicPasteEclipseViewsFeature"); @@ -45,7 +43,7 @@ CAF_CMD_SOURCE_INIT(RicPasteEclipseViewsFeature, "RicPasteEclipseViewsFeature"); //-------------------------------------------------------------------------------------------------- bool RicPasteEclipseViewsFeature::isCommandEnabled() { - PdmObjectGroup objectGroup; + caf::PdmObjectGroup objectGroup; RicPasteFeatureImpl::findObjectsFromClipboardRefs(&objectGroup); std::vector > typedObjects; @@ -56,7 +54,7 @@ bool RicPasteEclipseViewsFeature::isCommandEnabled() return false; } - PdmObjectHandle* destinationObject = dynamic_cast(SelectionManager::instance()->selectedItem()); + caf::PdmObjectHandle* destinationObject = dynamic_cast(caf::SelectionManager::instance()->selectedItem()); RimIdenticalGridCaseGroup* gridCaseGroup = RicPasteFeatureImpl::findGridCaseGroup(destinationObject); if (gridCaseGroup) return false; @@ -72,12 +70,12 @@ bool RicPasteEclipseViewsFeature::isCommandEnabled() //-------------------------------------------------------------------------------------------------- void RicPasteEclipseViewsFeature::onActionTriggered(bool isChecked) { - PdmObjectHandle* destinationObject = dynamic_cast(SelectionManager::instance()->selectedItem()); + caf::PdmObjectHandle* destinationObject = dynamic_cast(caf::SelectionManager::instance()->selectedItem()); RimEclipseCase* eclipseCase = RicPasteFeatureImpl::findEclipseCase(destinationObject); assert(eclipseCase); - PdmObjectGroup objectGroup; + caf::PdmObjectGroup objectGroup; RicPasteFeatureImpl::findObjectsFromClipboardRefs(&objectGroup); if (objectGroup.objects.size() == 0) return; @@ -90,7 +88,7 @@ void RicPasteEclipseViewsFeature::onActionTriggered(bool isChecked) // Add cases to case group for (size_t i = 0; i < eclipseViews.size(); i++) { - RimEclipseView* rimReservoirView = dynamic_cast(eclipseViews[i]->xmlCapability()->copyByXmlSerialization(PdmDefaultObjectFactory::instance())); + RimEclipseView* rimReservoirView = dynamic_cast(eclipseViews[i]->xmlCapability()->copyByXmlSerialization(caf::PdmDefaultObjectFactory::instance())); CVF_ASSERT(rimReservoirView); QString nameOfCopy = QString("Copy of ") + rimReservoirView->name; @@ -124,6 +122,3 @@ void RicPasteEclipseViewsFeature::setupActionLook(QAction* actionToSetup) RicPasteFeatureImpl::setIconAndShortcuts(actionToSetup); } - - -} // end namespace caf diff --git a/ApplicationCode/Commands/OperationsUsingObjReferences/RicPasteEclipseViewsFeature.h b/ApplicationCode/Commands/OperationsUsingObjReferences/RicPasteEclipseViewsFeature.h index 8ddd2ea5f7..3f0b0ca454 100644 --- a/ApplicationCode/Commands/OperationsUsingObjReferences/RicPasteEclipseViewsFeature.h +++ b/ApplicationCode/Commands/OperationsUsingObjReferences/RicPasteEclipseViewsFeature.h @@ -23,8 +23,6 @@ #include "cafCmdFeature.h" -namespace caf -{ //================================================================================================== /// @@ -35,11 +33,8 @@ CAF_CMD_HEADER_INIT; protected: // Overrides - virtual bool isCommandEnabled(); - virtual void onActionTriggered(bool isChecked); - virtual void setupActionLook(QAction* actionToSetup); + virtual bool isCommandEnabled() override; + virtual void onActionTriggered(bool isChecked) override; + virtual void setupActionLook(QAction* actionToSetup) override; }; - - -} // end namespace caf diff --git a/ApplicationCode/Commands/OperationsUsingObjReferences/RicPasteGeoMechViewsFeature.cpp b/ApplicationCode/Commands/OperationsUsingObjReferences/RicPasteGeoMechViewsFeature.cpp index b5c6505452..cf1b63151f 100644 --- a/ApplicationCode/Commands/OperationsUsingObjReferences/RicPasteGeoMechViewsFeature.cpp +++ b/ApplicationCode/Commands/OperationsUsingObjReferences/RicPasteGeoMechViewsFeature.cpp @@ -32,8 +32,6 @@ #include -namespace caf -{ CAF_CMD_SOURCE_INIT(RicPasteGeoMechViewsFeature, "RicPasteGeoMechViewsFeature"); @@ -42,7 +40,7 @@ CAF_CMD_SOURCE_INIT(RicPasteGeoMechViewsFeature, "RicPasteGeoMechViewsFeature"); //-------------------------------------------------------------------------------------------------- bool RicPasteGeoMechViewsFeature::isCommandEnabled() { - PdmObjectGroup objectGroup; + caf::PdmObjectGroup objectGroup; RicPasteFeatureImpl::findObjectsFromClipboardRefs(&objectGroup); std::vector > typedObjects; @@ -53,7 +51,7 @@ bool RicPasteGeoMechViewsFeature::isCommandEnabled() return false; } - PdmObjectHandle* destinationObject = dynamic_cast(SelectionManager::instance()->selectedItem()); + caf::PdmObjectHandle* destinationObject = dynamic_cast(caf::SelectionManager::instance()->selectedItem()); RimGeoMechCase* geoMechCase = RicPasteFeatureImpl::findGeoMechCase(destinationObject); if (geoMechCase) return true; @@ -66,12 +64,12 @@ bool RicPasteGeoMechViewsFeature::isCommandEnabled() //-------------------------------------------------------------------------------------------------- void RicPasteGeoMechViewsFeature::onActionTriggered(bool isChecked) { - PdmObjectHandle* destinationObject = dynamic_cast(SelectionManager::instance()->selectedItem()); + caf::PdmObjectHandle* destinationObject = dynamic_cast(caf::SelectionManager::instance()->selectedItem()); RimGeoMechCase* geomCase = RicPasteFeatureImpl::findGeoMechCase(destinationObject); assert(geomCase); - PdmObjectGroup objectGroup; + caf::PdmObjectGroup objectGroup; RicPasteFeatureImpl::findObjectsFromClipboardRefs(&objectGroup); if (objectGroup.objects.size() == 0) return; @@ -84,7 +82,7 @@ void RicPasteGeoMechViewsFeature::onActionTriggered(bool isChecked) // Add cases to case group for (size_t i = 0; i < geomViews.size(); i++) { - RimGeoMechView* rimReservoirView = dynamic_cast(geomViews[i]->xmlCapability()->copyByXmlSerialization(PdmDefaultObjectFactory::instance())); + RimGeoMechView* rimReservoirView = dynamic_cast(geomViews[i]->xmlCapability()->copyByXmlSerialization(caf::PdmDefaultObjectFactory::instance())); QString nameOfCopy = QString("Copy of ") + rimReservoirView->name; rimReservoirView->name = nameOfCopy; geomCase->geoMechViews().push_back(rimReservoirView); @@ -117,6 +115,3 @@ void RicPasteGeoMechViewsFeature::setupActionLook(QAction* actionToSetup) RicPasteFeatureImpl::setIconAndShortcuts(actionToSetup); } - - -} // end namespace caf diff --git a/ApplicationCode/Commands/OperationsUsingObjReferences/RicPasteGeoMechViewsFeature.h b/ApplicationCode/Commands/OperationsUsingObjReferences/RicPasteGeoMechViewsFeature.h index 98c991b722..143534f8e6 100644 --- a/ApplicationCode/Commands/OperationsUsingObjReferences/RicPasteGeoMechViewsFeature.h +++ b/ApplicationCode/Commands/OperationsUsingObjReferences/RicPasteGeoMechViewsFeature.h @@ -22,10 +22,6 @@ #include "cafCmdFeature.h" - -namespace caf -{ - //================================================================================================== /// //================================================================================================== @@ -35,11 +31,7 @@ CAF_CMD_HEADER_INIT; protected: // Overrides - virtual bool isCommandEnabled(); - virtual void onActionTriggered(bool isChecked); - virtual void setupActionLook(QAction* actionToSetup); + virtual bool isCommandEnabled() override; + virtual void onActionTriggered(bool isChecked) override; + virtual void setupActionLook(QAction* actionToSetup) override; }; - - - -} // end namespace caf diff --git a/ApplicationCode/Commands/PerforationCommands/RicNewPerforationIntervalFeature.cpp b/ApplicationCode/Commands/PerforationCommands/RicNewPerforationIntervalFeature.cpp index cb0b5e780c..2682a634bc 100644 --- a/ApplicationCode/Commands/PerforationCommands/RicNewPerforationIntervalFeature.cpp +++ b/ApplicationCode/Commands/PerforationCommands/RicNewPerforationIntervalFeature.cpp @@ -30,9 +30,6 @@ #include -namespace caf -{ - CAF_CMD_SOURCE_INIT(RicNewPerforationIntervalFeature, "RicNewPerforationIntervalFeature"); @@ -92,5 +89,3 @@ RimWellPath * RicNewPerforationIntervalFeature::selectedWellPath() return wellPath; } - -} // end namespace caf diff --git a/ApplicationCode/Commands/PerforationCommands/RicNewPerforationIntervalFeature.h b/ApplicationCode/Commands/PerforationCommands/RicNewPerforationIntervalFeature.h index 573349e0f7..9c72ebaafe 100644 --- a/ApplicationCode/Commands/PerforationCommands/RicNewPerforationIntervalFeature.h +++ b/ApplicationCode/Commands/PerforationCommands/RicNewPerforationIntervalFeature.h @@ -23,26 +23,19 @@ class RimWellPath; -namespace caf -{ - //================================================================================================== /// //================================================================================================== -class RicNewPerforationIntervalFeature : public CmdFeature +class RicNewPerforationIntervalFeature : public caf::CmdFeature { CAF_CMD_HEADER_INIT; protected: // Overrides - virtual bool isCommandEnabled(); - virtual void onActionTriggered( bool isChecked ); - virtual void setupActionLook( QAction* actionToSetup ); + virtual bool isCommandEnabled() override; + virtual void onActionTriggered( bool isChecked ) override; + virtual void setupActionLook( QAction* actionToSetup ) override; private: RimWellPath* selectedWellPath(); }; - - - -} // end namespace caf diff --git a/ApplicationCode/Commands/RicDeleteItemExec.cpp b/ApplicationCode/Commands/RicDeleteItemExec.cpp index a8fa3ec22e..c6a31d6a50 100644 --- a/ApplicationCode/Commands/RicDeleteItemExec.cpp +++ b/ApplicationCode/Commands/RicDeleteItemExec.cpp @@ -21,8 +21,10 @@ #include "RicDeleteItemExec.h" #include "RicDeleteItemExecData.h" +#include "RimCase.h" #include "RimCellRangeFilterCollection.h" #include "RimEclipsePropertyFilterCollection.h" +#include "RimFormationNamesCollection.h" #include "RimGeoMechPropertyFilterCollection.h" #include "RimIntersectionCollection.h" #include "RimProject.h" @@ -39,13 +41,8 @@ #include "cafPdmReferenceHelper.h" #include "cafPdmUiFieldHandle.h" #include "cafSelectionManager.h" -#include "RimFormationNamesCollection.h" -#include "RimCase.h" -namespace caf -{ - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -59,15 +56,15 @@ QString RicDeleteItemExec::name() //-------------------------------------------------------------------------------------------------- void RicDeleteItemExec::redo() { - PdmFieldHandle* field = PdmReferenceHelper::fieldFromReference(m_commandData->m_rootObject, m_commandData->m_pathToField); + caf::PdmFieldHandle* field = caf::PdmReferenceHelper::fieldFromReference(m_commandData->m_rootObject, m_commandData->m_pathToField); - PdmChildArrayFieldHandle* listField = dynamic_cast(field); + caf::PdmChildArrayFieldHandle* listField = dynamic_cast(field); if (listField) { - std::vector children; + std::vector children; listField->childObjects(&children); - PdmObjectHandle* obj = children[m_commandData->m_indexToObject]; + caf::PdmObjectHandle* obj = children[m_commandData->m_indexToObject]; caf::SelectionManager::instance()->removeObjectFromAllSelections(obj); std::vector referringObjects; @@ -204,12 +201,12 @@ void RicDeleteItemExec::redo() //-------------------------------------------------------------------------------------------------- void RicDeleteItemExec::undo() { - PdmFieldHandle* field = PdmReferenceHelper::fieldFromReference(m_commandData->m_rootObject, m_commandData->m_pathToField); + caf::PdmFieldHandle* field = caf::PdmReferenceHelper::fieldFromReference(m_commandData->m_rootObject, m_commandData->m_pathToField); - PdmChildArrayFieldHandle* listField = dynamic_cast(field); + caf::PdmChildArrayFieldHandle* listField = dynamic_cast(field); if (listField) { - PdmObjectHandle* obj = PdmXmlObjectHandle::readUnknownObjectFromXmlString(m_commandData->m_deletedObjectAsXml(), PdmDefaultObjectFactory::instance()); + caf::PdmObjectHandle* obj = caf::PdmXmlObjectHandle::readUnknownObjectFromXmlString(m_commandData->m_deletedObjectAsXml(), caf::PdmDefaultObjectFactory::instance()); listField->insertAt(m_commandData->m_indexToObject, obj); @@ -225,7 +222,7 @@ void RicDeleteItemExec::undo() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RicDeleteItemExec::RicDeleteItemExec(NotificationCenter* notificationCenter) +RicDeleteItemExec::RicDeleteItemExec(caf::NotificationCenter* notificationCenter) : CmdExecuteCommand(notificationCenter) { m_commandData = new RicDeleteItemExecData; @@ -238,5 +235,3 @@ RicDeleteItemExecData* RicDeleteItemExec::commandData() { return m_commandData; } - -} // end namespace caf diff --git a/ApplicationCode/Commands/RicDeleteItemExec.h b/ApplicationCode/Commands/RicDeleteItemExec.h index e733702f45..38bef07d1e 100644 --- a/ApplicationCode/Commands/RicDeleteItemExec.h +++ b/ApplicationCode/Commands/RicDeleteItemExec.h @@ -22,18 +22,15 @@ #include "cafCmdExecuteCommand.h" -namespace caf -{ - class RicDeleteItemExecData; //================================================================================================== /// //================================================================================================== -class RicDeleteItemExec : public CmdExecuteCommand +class RicDeleteItemExec : public caf::CmdExecuteCommand { public: - explicit RicDeleteItemExec(NotificationCenter* notificationCenter); + explicit RicDeleteItemExec(caf::NotificationCenter* notificationCenter); RicDeleteItemExecData* commandData(); @@ -44,7 +41,3 @@ public: private: RicDeleteItemExecData* m_commandData; }; - - - -} // end namespace caf diff --git a/ApplicationCode/Commands/RicDeleteItemExecData.cpp b/ApplicationCode/Commands/RicDeleteItemExecData.cpp index 6f0a20bb6a..0a00e9752e 100644 --- a/ApplicationCode/Commands/RicDeleteItemExecData.cpp +++ b/ApplicationCode/Commands/RicDeleteItemExecData.cpp @@ -21,9 +21,4 @@ #include "RicDeleteItemExecData.h" -namespace caf -{ - CAF_PDM_SOURCE_INIT(RicDeleteItemExecData, "RicDeleteItemExecData"); - -} // end namespace caf diff --git a/ApplicationCode/Commands/RicDeleteItemExecData.h b/ApplicationCode/Commands/RicDeleteItemExecData.h index e8000233b4..f5af3a7874 100644 --- a/ApplicationCode/Commands/RicDeleteItemExecData.h +++ b/ApplicationCode/Commands/RicDeleteItemExecData.h @@ -23,14 +23,10 @@ #include "cafPdmObject.h" #include "cafPdmField.h" -namespace caf -{ - - //================================================================================================== /// //================================================================================================== -class RicDeleteItemExecData : public PdmObject +class RicDeleteItemExecData : public caf::PdmObject { CAF_PDM_HEADER_INIT; @@ -44,13 +40,9 @@ public: CAF_PDM_InitField(&m_deletedObjectAsXml, "deletedObjectAsXml", QString(), "deletedObjectAsXml", "", "deletedObjectAsXml tooltip", "deletedObjectAsXml whatsthis"); } - caf::PdmPointer m_rootObject; + caf::PdmPointer m_rootObject; caf::PdmField m_pathToField; caf::PdmField m_indexToObject; caf::PdmField m_deletedObjectAsXml; }; - - - -} // end namespace caf diff --git a/ApplicationCode/Commands/RicDeleteItemFeature.cpp b/ApplicationCode/Commands/RicDeleteItemFeature.cpp index 6cf56c7118..e92f40bbe4 100644 --- a/ApplicationCode/Commands/RicDeleteItemFeature.cpp +++ b/ApplicationCode/Commands/RicDeleteItemFeature.cpp @@ -55,11 +55,9 @@ #include -namespace caf -{ - CAF_CMD_SOURCE_INIT(RicDeleteItemFeature, "RicDeleteItemFeature"); +CAF_CMD_SOURCE_INIT(RicDeleteItemFeature, "RicDeleteItemFeature"); -bool isDeletable(PdmUiItem * uiItem) +bool isDeletable(caf::PdmUiItem* uiItem) { // Enable delete of well allocation plots if (dynamic_cast(uiItem)) return true; @@ -107,12 +105,12 @@ bool isDeletable(PdmUiItem * uiItem) //-------------------------------------------------------------------------------------------------- bool RicDeleteItemFeature::isCommandEnabled() { - std::vector items; + std::vector items; caf::SelectionManager::instance()->selectedItems(items); if (items.empty() ) return false; - for (PdmUiItem* item : items) + for (caf::PdmUiItem* item : items) { if (!isDeletable(item)) return false; @@ -131,11 +129,11 @@ bool RicDeleteItemFeature::isCommandEnabled() //-------------------------------------------------------------------------------------------------- void RicDeleteItemFeature::onActionTriggered(bool isChecked) { - std::vector items; - SelectionManager::instance()->selectedItems(items); + std::vector items; + caf::SelectionManager::instance()->selectedItems(items); assert(items.size() > 0); - for (PdmUiItem* item: items) + for (caf::PdmUiItem* item: items) { if (!isDeletable(item)) continue; @@ -147,7 +145,7 @@ void RicDeleteItemFeature::onActionTriggered(bool isChecked) int indexAfter = -1; - std::vector childObjects; + std::vector childObjects; childArrayFieldHandle->childObjects(&childObjects); for ( size_t i = 0; i < childObjects.size(); i++ ) @@ -161,15 +159,15 @@ void RicDeleteItemFeature::onActionTriggered(bool isChecked) // Did not find currently selected pdm object in the current list field assert(indexAfter != -1); - RicDeleteItemExec* executeCmd = new RicDeleteItemExec(SelectionManager::instance()->notificationCenter()); + RicDeleteItemExec* executeCmd = new RicDeleteItemExec(caf::SelectionManager::instance()->notificationCenter()); RicDeleteItemExecData* data = executeCmd->commandData(); - data->m_rootObject = PdmReferenceHelper::findRoot(childArrayFieldHandle); - data->m_pathToField = PdmReferenceHelper::referenceFromRootToField(data->m_rootObject, childArrayFieldHandle); + data->m_rootObject = caf::PdmReferenceHelper::findRoot(childArrayFieldHandle); + data->m_pathToField = caf::PdmReferenceHelper::referenceFromRootToField(data->m_rootObject, childArrayFieldHandle); data->m_indexToObject = indexAfter; - CmdExecCommandManager::instance()->processExecuteCommand(executeCmd); + caf::CmdExecCommandManager::instance()->processExecuteCommand(executeCmd); } } @@ -181,5 +179,3 @@ void RicDeleteItemFeature::setupActionLook(QAction* actionToSetup) actionToSetup->setText("Delete"); actionToSetup->setIcon(QIcon(":/Erase.png")); } - -} // end namespace caf diff --git a/ApplicationCode/Commands/RicDeleteItemFeature.h b/ApplicationCode/Commands/RicDeleteItemFeature.h index 5cde0517ef..466b2bcf17 100644 --- a/ApplicationCode/Commands/RicDeleteItemFeature.h +++ b/ApplicationCode/Commands/RicDeleteItemFeature.h @@ -21,23 +21,16 @@ #include "cafCmdFeature.h" -namespace caf -{ - //================================================================================================== /// //================================================================================================== -class RicDeleteItemFeature : public CmdFeature +class RicDeleteItemFeature : public caf::CmdFeature { CAF_CMD_HEADER_INIT; protected: // Overrides - virtual bool isCommandEnabled(); - virtual void onActionTriggered( bool isChecked ); - virtual void setupActionLook( QAction* actionToSetup ); + virtual bool isCommandEnabled() override; + virtual void onActionTriggered( bool isChecked ) override; + virtual void setupActionLook( QAction* actionToSetup ) override; }; - - - -} // end namespace caf diff --git a/ApplicationCode/Commands/ToggleCommands/RicToggleItemsFeature.cpp b/ApplicationCode/Commands/ToggleCommands/RicToggleItemsFeature.cpp index 75e5e7be2f..24023e0790 100644 --- a/ApplicationCode/Commands/ToggleCommands/RicToggleItemsFeature.cpp +++ b/ApplicationCode/Commands/ToggleCommands/RicToggleItemsFeature.cpp @@ -19,14 +19,11 @@ #include "RicToggleItemsFeature.h" -#include "cafSelectionManager.h" - #include "RicToggleItemsFeatureImpl.h" -#include +#include "cafSelectionManager.h" -namespace caf -{ +#include CAF_CMD_SOURCE_INIT(RicToggleItemsFeature, "RicToggleItemsFeature"); @@ -56,5 +53,3 @@ void RicToggleItemsFeature::setupActionLook(QAction* actionToSetup) else actionToSetup->setText("Toggle"); } - -} // end namespace caf diff --git a/ApplicationCode/Commands/ToggleCommands/RicToggleItemsFeature.h b/ApplicationCode/Commands/ToggleCommands/RicToggleItemsFeature.h index 8698dc3237..13aac4e39d 100644 --- a/ApplicationCode/Commands/ToggleCommands/RicToggleItemsFeature.h +++ b/ApplicationCode/Commands/ToggleCommands/RicToggleItemsFeature.h @@ -21,23 +21,16 @@ #include "cafCmdFeature.h" -namespace caf -{ - //================================================================================================== /// //================================================================================================== -class RicToggleItemsFeature : public CmdFeature +class RicToggleItemsFeature : public caf::CmdFeature { CAF_CMD_HEADER_INIT; protected: // Overrides - virtual bool isCommandEnabled(); - virtual void onActionTriggered( bool isChecked ); - virtual void setupActionLook( QAction* actionToSetup ); + virtual bool isCommandEnabled() override; + virtual void onActionTriggered( bool isChecked ) override; + virtual void setupActionLook( QAction* actionToSetup ) override; }; - - - -} // end namespace caf diff --git a/ApplicationCode/Commands/ToggleCommands/RicToggleItemsOffFeature.cpp b/ApplicationCode/Commands/ToggleCommands/RicToggleItemsOffFeature.cpp index 0d61886c90..027e33d5ca 100644 --- a/ApplicationCode/Commands/ToggleCommands/RicToggleItemsOffFeature.cpp +++ b/ApplicationCode/Commands/ToggleCommands/RicToggleItemsOffFeature.cpp @@ -19,14 +19,11 @@ #include "RicToggleItemsOffFeature.h" -#include "cafSelectionManager.h" - #include "RicToggleItemsFeatureImpl.h" -#include +#include "cafSelectionManager.h" -namespace caf -{ +#include CAF_CMD_SOURCE_INIT(RicToggleItemsOffFeature, "RicToggleItemsOffFeature"); @@ -56,5 +53,3 @@ void RicToggleItemsOffFeature::setupActionLook(QAction* actionToSetup) else actionToSetup->setText("Off"); } - -} // end namespace caf diff --git a/ApplicationCode/Commands/ToggleCommands/RicToggleItemsOffFeature.h b/ApplicationCode/Commands/ToggleCommands/RicToggleItemsOffFeature.h index 2ae4f4a0fe..0f9b77f87a 100644 --- a/ApplicationCode/Commands/ToggleCommands/RicToggleItemsOffFeature.h +++ b/ApplicationCode/Commands/ToggleCommands/RicToggleItemsOffFeature.h @@ -21,23 +21,16 @@ #include "cafCmdFeature.h" -namespace caf -{ - //================================================================================================== /// //================================================================================================== -class RicToggleItemsOffFeature : public CmdFeature +class RicToggleItemsOffFeature : public caf::CmdFeature { CAF_CMD_HEADER_INIT; protected: // Overrides - virtual bool isCommandEnabled(); - virtual void onActionTriggered( bool isChecked ); - virtual void setupActionLook( QAction* actionToSetup ); + virtual bool isCommandEnabled() override; + virtual void onActionTriggered( bool isChecked ) override; + virtual void setupActionLook( QAction* actionToSetup ) override; }; - - - -} // end namespace caf diff --git a/ApplicationCode/Commands/ToggleCommands/RicToggleItemsOnFeature.cpp b/ApplicationCode/Commands/ToggleCommands/RicToggleItemsOnFeature.cpp index ecb20cb108..0f2467c5ff 100644 --- a/ApplicationCode/Commands/ToggleCommands/RicToggleItemsOnFeature.cpp +++ b/ApplicationCode/Commands/ToggleCommands/RicToggleItemsOnFeature.cpp @@ -19,14 +19,11 @@ #include "RicToggleItemsOnFeature.h" -#include "cafSelectionManager.h" - #include "RicToggleItemsFeatureImpl.h" -#include +#include "cafSelectionManager.h" -namespace caf -{ +#include CAF_CMD_SOURCE_INIT(RicToggleItemsOnFeature, "RicToggleItemsOnFeature"); @@ -56,5 +53,3 @@ void RicToggleItemsOnFeature::setupActionLook(QAction* actionToSetup) else actionToSetup->setText("On"); } - -} // end namespace caf diff --git a/ApplicationCode/Commands/ToggleCommands/RicToggleItemsOnFeature.h b/ApplicationCode/Commands/ToggleCommands/RicToggleItemsOnFeature.h index e92b543e26..97d8c3fed1 100644 --- a/ApplicationCode/Commands/ToggleCommands/RicToggleItemsOnFeature.h +++ b/ApplicationCode/Commands/ToggleCommands/RicToggleItemsOnFeature.h @@ -21,23 +21,16 @@ #include "cafCmdFeature.h" -namespace caf -{ - //================================================================================================== /// //================================================================================================== -class RicToggleItemsOnFeature : public CmdFeature +class RicToggleItemsOnFeature : public caf::CmdFeature { CAF_CMD_HEADER_INIT; protected: // Overrides - virtual bool isCommandEnabled(); - virtual void onActionTriggered( bool isChecked ); - virtual void setupActionLook( QAction* actionToSetup ); + virtual bool isCommandEnabled() override; + virtual void onActionTriggered( bool isChecked ) override; + virtual void setupActionLook( QAction* actionToSetup ) override; }; - - - -} // end namespace caf diff --git a/ApplicationCode/Commands/WellLogCommands/RicAddWellLogToPlotFeature.cpp b/ApplicationCode/Commands/WellLogCommands/RicAddWellLogToPlotFeature.cpp index 45bb637df2..4f040b8252 100644 --- a/ApplicationCode/Commands/WellLogCommands/RicAddWellLogToPlotFeature.cpp +++ b/ApplicationCode/Commands/WellLogCommands/RicAddWellLogToPlotFeature.cpp @@ -43,9 +43,7 @@ #include -namespace caf -{ - CAF_CMD_SOURCE_INIT(RicAddWellLogToPlotFeature, "RicAddWellLogToPlotFeature"); +CAF_CMD_SOURCE_INIT(RicAddWellLogToPlotFeature, "RicAddWellLogToPlotFeature"); //-------------------------------------------------------------------------------------------------- @@ -135,5 +133,3 @@ std::vector RicAddWellLogToPlotFeature::selectedWellLogs caf::SelectionManager::instance()->objectsByType(&selection); return selection; } - -} // end namespace caf diff --git a/ApplicationCode/Commands/WellLogCommands/RicAddWellLogToPlotFeature.h b/ApplicationCode/Commands/WellLogCommands/RicAddWellLogToPlotFeature.h index 987000abb8..cd47047e75 100644 --- a/ApplicationCode/Commands/WellLogCommands/RicAddWellLogToPlotFeature.h +++ b/ApplicationCode/Commands/WellLogCommands/RicAddWellLogToPlotFeature.h @@ -28,26 +28,20 @@ class RimWellLogPlotCollection; class RimWellLogPlot; class RimWellLogFileChannel; -namespace caf -{ //================================================================================================== /// //================================================================================================== -class RicAddWellLogToPlotFeature : public CmdFeature +class RicAddWellLogToPlotFeature : public caf::CmdFeature { CAF_CMD_HEADER_INIT; protected: // Overrides - virtual bool isCommandEnabled(); - virtual void onActionTriggered( bool isChecked ); - virtual void setupActionLook( QAction* actionToSetup ); + virtual bool isCommandEnabled() override; + virtual void onActionTriggered( bool isChecked ) override; + virtual void setupActionLook( QAction* actionToSetup ) override; private: std::vector selectedWellLogs(); }; - - - -} // end namespace caf diff --git a/ApplicationCode/Commands/WellLogCommands/RicWellLogsImportFileFeature.cpp b/ApplicationCode/Commands/WellLogCommands/RicWellLogsImportFileFeature.cpp index bdbdef20ef..0cc2aebcc7 100644 --- a/ApplicationCode/Commands/WellLogCommands/RicWellLogsImportFileFeature.cpp +++ b/ApplicationCode/Commands/WellLogCommands/RicWellLogsImportFileFeature.cpp @@ -26,10 +26,7 @@ #include #include -namespace caf -{ - CAF_CMD_SOURCE_INIT(RicWellLogsImportFileFeature, "RicWellLogsImportFileFeature"); - +CAF_CMD_SOURCE_INIT(RicWellLogsImportFileFeature, "RicWellLogsImportFileFeature"); //-------------------------------------------------------------------------------------------------- /// @@ -65,5 +62,3 @@ void RicWellLogsImportFileFeature::setupActionLook(QAction* actionToSetup) actionToSetup->setText("Import Well &Logs from File"); actionToSetup->setIcon(QIcon(":/LasFile16x16.png")); } - -} // end namespace caf diff --git a/ApplicationCode/Commands/WellLogCommands/RicWellLogsImportFileFeature.h b/ApplicationCode/Commands/WellLogCommands/RicWellLogsImportFileFeature.h index c82e9bf70e..11eaec4b12 100644 --- a/ApplicationCode/Commands/WellLogCommands/RicWellLogsImportFileFeature.h +++ b/ApplicationCode/Commands/WellLogCommands/RicWellLogsImportFileFeature.h @@ -21,23 +21,17 @@ #include "cafCmdFeature.h" -namespace caf -{ - //================================================================================================== /// //================================================================================================== -class RicWellLogsImportFileFeature : public CmdFeature +class RicWellLogsImportFileFeature : public caf::CmdFeature { CAF_CMD_HEADER_INIT; + protected: // Overrides - virtual bool isCommandEnabled(); - virtual void onActionTriggered( bool isChecked ); - virtual void setupActionLook( QAction* actionToSetup ); + virtual bool isCommandEnabled() override; + virtual void onActionTriggered( bool isChecked ) override; + virtual void setupActionLook( QAction* actionToSetup ) override; }; - - - -} // end namespace caf diff --git a/ApplicationCode/Commands/WellPathCommands/RicWellPathDeleteFeature.cpp b/ApplicationCode/Commands/WellPathCommands/RicWellPathDeleteFeature.cpp index 9ee57e1033..d419766521 100644 --- a/ApplicationCode/Commands/WellPathCommands/RicWellPathDeleteFeature.cpp +++ b/ApplicationCode/Commands/WellPathCommands/RicWellPathDeleteFeature.cpp @@ -20,19 +20,14 @@ #include "RicWellPathDeleteFeature.h" #include "RimWellPathCollection.h" +#include "RimWellPath.h" #include "cafSelectionManager.h" #include -#include "RimWellPath.h" - -namespace caf -{ - CAF_CMD_SOURCE_INIT(RicWellPathDeleteFeature, "RicWellPathDeleteFeature"); - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -83,5 +78,3 @@ void RicWellPathDeleteFeature::setupActionLook(QAction* actionToSetup) actionToSetup->setText("Delete Well Path(s)"); actionToSetup->setIcon(QIcon(":/Erase.png")); } - -} // end namespace caf diff --git a/ApplicationCode/Commands/WellPathCommands/RicWellPathDeleteFeature.h b/ApplicationCode/Commands/WellPathCommands/RicWellPathDeleteFeature.h index 7f39370eaa..6f8e0bc97b 100644 --- a/ApplicationCode/Commands/WellPathCommands/RicWellPathDeleteFeature.h +++ b/ApplicationCode/Commands/WellPathCommands/RicWellPathDeleteFeature.h @@ -21,23 +21,16 @@ #include "cafCmdFeature.h" -namespace caf -{ - //================================================================================================== /// //================================================================================================== -class RicWellPathDeleteFeature : public CmdFeature +class RicWellPathDeleteFeature : public caf::CmdFeature { CAF_CMD_HEADER_INIT; protected: // Overrides - virtual bool isCommandEnabled(); - virtual void onActionTriggered( bool isChecked ); - virtual void setupActionLook( QAction* actionToSetup ); + virtual bool isCommandEnabled() override; + virtual void onActionTriggered( bool isChecked ) override; + virtual void setupActionLook( QAction* actionToSetup ) override; }; - - - -} // end namespace caf diff --git a/ApplicationCode/Commands/WellPathCommands/RicWellPathImportCompletionsFileFeature.cpp b/ApplicationCode/Commands/WellPathCommands/RicWellPathImportCompletionsFileFeature.cpp index d1e319471f..d658b54d2b 100644 --- a/ApplicationCode/Commands/WellPathCommands/RicWellPathImportCompletionsFileFeature.cpp +++ b/ApplicationCode/Commands/WellPathCommands/RicWellPathImportCompletionsFileFeature.cpp @@ -32,10 +32,7 @@ #include #include -namespace caf -{ - CAF_CMD_SOURCE_INIT(RicWellPathImportCompletionsFileFeature, "RicWellPathImportCompletionsFileFeature"); - +CAF_CMD_SOURCE_INIT(RicWellPathImportCompletionsFileFeature, "RicWellPathImportCompletionsFileFeature"); //-------------------------------------------------------------------------------------------------- /// @@ -88,5 +85,3 @@ void RicWellPathImportCompletionsFileFeature::setupActionLook(QAction* actionToS actionToSetup->setText("Import Completions from File"); actionToSetup->setIcon(QIcon(":/Well.png")); } - -} // end namespace caf diff --git a/ApplicationCode/Commands/WellPathCommands/RicWellPathImportCompletionsFileFeature.h b/ApplicationCode/Commands/WellPathCommands/RicWellPathImportCompletionsFileFeature.h index 1967c04d89..dc26985bb0 100644 --- a/ApplicationCode/Commands/WellPathCommands/RicWellPathImportCompletionsFileFeature.h +++ b/ApplicationCode/Commands/WellPathCommands/RicWellPathImportCompletionsFileFeature.h @@ -21,23 +21,17 @@ #include "cafCmdFeature.h" -namespace caf -{ - //================================================================================================== /// //================================================================================================== -class RicWellPathImportCompletionsFileFeature : public CmdFeature +class RicWellPathImportCompletionsFileFeature : public caf::CmdFeature { CAF_CMD_HEADER_INIT; protected: // Overrides - virtual bool isCommandEnabled(); - virtual void onActionTriggered( bool isChecked ); - virtual void setupActionLook( QAction* actionToSetup ); + virtual bool isCommandEnabled() override; + virtual void onActionTriggered( bool isChecked ) override; + virtual void setupActionLook( QAction* actionToSetup ) override; }; - - -} // end namespace caf diff --git a/ApplicationCode/Commands/WellPathCommands/RicWellPathsImportFileFeature.cpp b/ApplicationCode/Commands/WellPathCommands/RicWellPathsImportFileFeature.cpp index f94a3c0a4d..fc313108fd 100644 --- a/ApplicationCode/Commands/WellPathCommands/RicWellPathsImportFileFeature.cpp +++ b/ApplicationCode/Commands/WellPathCommands/RicWellPathsImportFileFeature.cpp @@ -26,9 +26,7 @@ #include #include -namespace caf -{ - CAF_CMD_SOURCE_INIT(RicWellPathsImportFileFeature, "RicWellPathsImportFileFeature"); +CAF_CMD_SOURCE_INIT(RicWellPathsImportFileFeature, "RicWellPathsImportFileFeature"); //-------------------------------------------------------------------------------------------------- @@ -69,5 +67,3 @@ void RicWellPathsImportFileFeature::setupActionLook(QAction* actionToSetup) actionToSetup->setText("Import &Well Paths from File"); actionToSetup->setIcon(QIcon(":/Well.png")); } - -} // end namespace caf diff --git a/ApplicationCode/Commands/WellPathCommands/RicWellPathsImportFileFeature.h b/ApplicationCode/Commands/WellPathCommands/RicWellPathsImportFileFeature.h index 40bf0afa2f..08d3650e0d 100644 --- a/ApplicationCode/Commands/WellPathCommands/RicWellPathsImportFileFeature.h +++ b/ApplicationCode/Commands/WellPathCommands/RicWellPathsImportFileFeature.h @@ -21,23 +21,16 @@ #include "cafCmdFeature.h" -namespace caf -{ - //================================================================================================== /// //================================================================================================== -class RicWellPathsImportFileFeature : public CmdFeature +class RicWellPathsImportFileFeature : public caf::CmdFeature { CAF_CMD_HEADER_INIT; protected: // Overrides - virtual bool isCommandEnabled(); - virtual void onActionTriggered( bool isChecked ); - virtual void setupActionLook( QAction* actionToSetup ); + virtual bool isCommandEnabled() override; + virtual void onActionTriggered( bool isChecked ) override; + virtual void setupActionLook( QAction* actionToSetup ) override; }; - - - -} // end namespace caf diff --git a/ApplicationCode/Commands/WellPathCommands/RicWellPathsImportSsihubFeature.cpp b/ApplicationCode/Commands/WellPathCommands/RicWellPathsImportSsihubFeature.cpp index e4be65a2b6..f33403840b 100644 --- a/ApplicationCode/Commands/WellPathCommands/RicWellPathsImportSsihubFeature.cpp +++ b/ApplicationCode/Commands/WellPathCommands/RicWellPathsImportSsihubFeature.cpp @@ -33,9 +33,7 @@ #include #include -namespace caf -{ - CAF_CMD_SOURCE_INIT(RicWellPathsImportSsihubFeature, "RicWellPathsImportSsihubFeature"); +CAF_CMD_SOURCE_INIT(RicWellPathsImportSsihubFeature, "RicWellPathsImportSsihubFeature"); //-------------------------------------------------------------------------------------------------- @@ -125,5 +123,3 @@ void RicWellPathsImportSsihubFeature::setupActionLook(QAction* actionToSetup) actionToSetup->setText("Import Well Paths from &SSI-hub"); actionToSetup->setIcon(QIcon(":/WellCollection.png")); } - -} // end namespace caf diff --git a/ApplicationCode/Commands/WellPathCommands/RicWellPathsImportSsihubFeature.h b/ApplicationCode/Commands/WellPathCommands/RicWellPathsImportSsihubFeature.h index 46bfc99c33..ae107e2571 100644 --- a/ApplicationCode/Commands/WellPathCommands/RicWellPathsImportSsihubFeature.h +++ b/ApplicationCode/Commands/WellPathCommands/RicWellPathsImportSsihubFeature.h @@ -21,23 +21,16 @@ #include "cafCmdFeature.h" -namespace caf -{ - //================================================================================================== /// //================================================================================================== -class RicWellPathsImportSsihubFeature : public CmdFeature +class RicWellPathsImportSsihubFeature : public caf::CmdFeature { CAF_CMD_HEADER_INIT; protected: // Overrides - virtual bool isCommandEnabled(); - virtual void onActionTriggered( bool isChecked ); - virtual void setupActionLook( QAction* actionToSetup ); + virtual bool isCommandEnabled() override; + virtual void onActionTriggered( bool isChecked ) override; + virtual void setupActionLook( QAction* actionToSetup ) override; }; - - - -} // end namespace caf diff --git a/ApplicationCode/UserInterface/RiuDragDrop.cpp b/ApplicationCode/UserInterface/RiuDragDrop.cpp index d0e54b3007..bca4bf933f 100644 --- a/ApplicationCode/UserInterface/RiuDragDrop.cpp +++ b/ApplicationCode/UserInterface/RiuDragDrop.cpp @@ -312,7 +312,7 @@ void RiuDragDrop::moveCasesToGridGroup(caf::PdmObjectGroup& objectGroup, RimIden if (RicCloseCaseFeature::userConfirmedGridCaseGroupChange(casesToBeDeleted)) { - caf::RicPasteEclipseCasesFeature::addCasesToGridCaseGroup(objectGroup, gridCaseGroup); + RicPasteEclipseCasesFeature::addCasesToGridCaseGroup(objectGroup, gridCaseGroup); for (size_t i = 0; i < casesToBeDeleted.size(); i++) { @@ -328,7 +328,7 @@ bool RiuDragDrop::handleGridCaseGroupDrop(Qt::DropAction action, caf::PdmObjectG { if (action == Qt::CopyAction) { - caf::RicPasteEclipseCasesFeature::addCasesToGridCaseGroup(objectGroup, gridCaseGroup); + RicPasteEclipseCasesFeature::addCasesToGridCaseGroup(objectGroup, gridCaseGroup); } else if (action == Qt::MoveAction) {