From 0513608924f2f731c900e447d3d93078c87a1727 Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Wed, 26 Aug 2015 15:41:47 +0200 Subject: [PATCH] Removed obsolete files --- .../ProjectDataModel/RimConnectedViews.cpp | 95 ------------------- .../ProjectDataModel/RimConnectedViews.h | 48 ---------- 2 files changed, 143 deletions(-) delete mode 100644 ApplicationCode/ProjectDataModel/RimConnectedViews.cpp delete mode 100644 ApplicationCode/ProjectDataModel/RimConnectedViews.h diff --git a/ApplicationCode/ProjectDataModel/RimConnectedViews.cpp b/ApplicationCode/ProjectDataModel/RimConnectedViews.cpp deleted file mode 100644 index 1d81743235..0000000000 --- a/ApplicationCode/ProjectDataModel/RimConnectedViews.cpp +++ /dev/null @@ -1,95 +0,0 @@ -///////////////////////////////////////////////////////////////////////////////// -// -// Copyright (C) 2015- Statoil ASA -// Copyright (C) 2015- Ceetron Solutions AS -// -// ResInsight 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. -// -// ResInsight 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 at -// for more details. -// -///////////////////////////////////////////////////////////////////////////////// - -#include "RimConnectedViews.h" - -#include "RimView.h" - -#include "cafPdmFieldHandle.h" -#include "RimProject.h" -#include "RiaApplication.h" -#include "RimCase.h" - -CAF_PDM_SOURCE_INIT(RimConnectedViews, "RimConnectedViews"); -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -RimConnectedViews::RimConnectedViews(void) -{ - CAF_PDM_InitObject("Connected Views", "", "", ""); - - CAF_PDM_InitFieldNoDefault(&masterView, "MasterView", "Master View", "", "", ""); - CAF_PDM_InitFieldNoDefault(&slaveView, "SlaveView", "Slave View", "", "", ""); - -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -RimConnectedViews::~RimConnectedViews(void) -{ -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -QList RimConnectedViews::calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool * useOptionsOnly) -{ - QList optionList; - - std::vector views; - allViews(views); - - for (size_t i = 0; i< views.size(); i++) - { - optionList.push_back(caf::PdmOptionItemInfo(views[i]->name(), QVariant::fromValue(caf::PdmPointer(views[i])))); - } - - if (optionList.size() > 0) - { - optionList.push_front(caf::PdmOptionItemInfo("None", QVariant::fromValue(caf::PdmPointer(NULL)))); - } - - return optionList; -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimConnectedViews::allViews(std::vector& views) -{ - RimProject* proj = RiaApplication::instance()->project(); - - if (proj) - { - std::vector cases; - proj->allCases(cases); - for (size_t caseIdx = 0; caseIdx < cases.size(); caseIdx++) - { - RimCase* rimCase = cases[caseIdx]; - - std::vector caseViews = rimCase->views(); - for (size_t viewIdx = 0; viewIdx < caseViews.size(); viewIdx++) - { - views.push_back(caseViews[viewIdx]); - } - } - } -} - diff --git a/ApplicationCode/ProjectDataModel/RimConnectedViews.h b/ApplicationCode/ProjectDataModel/RimConnectedViews.h deleted file mode 100644 index 81f6640028..0000000000 --- a/ApplicationCode/ProjectDataModel/RimConnectedViews.h +++ /dev/null @@ -1,48 +0,0 @@ -///////////////////////////////////////////////////////////////////////////////// -// -// Copyright (C) 2015- Statoil ASA -// Copyright (C) 2015- Ceetron Solutions AS -// -// ResInsight 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. -// -// ResInsight 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 at -// for more details. -// -///////////////////////////////////////////////////////////////////////////////// - -#pragma once - -#include "cafPdmObject.h" -#include "cafPdmPtrField.h" - -class RimView; - -//================================================================================================== -/// -/// -//================================================================================================== -class RimConnectedViews : public caf::PdmObject -{ - CAF_PDM_HEADER_INIT; - -public: - RimConnectedViews(void); - virtual ~RimConnectedViews(void); - - caf::PdmPtrField masterView; - caf::PdmPtrField slaveView; - -protected: - virtual QList calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool * useOptionsOnly); - -private: - void allViews(std::vector& views); - -};