///////////////////////////////////////////////////////////////////////////////// // // Copyright (C) 2011- Statoil ASA // Copyright (C) 2013- Ceetron Solutions AS // Copyright (C) 2011-2012 Ceetron 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 "RigWellPath.h" #include "RimWellPathCollection.h" #include "cafPdmField.h" #include "cafPdmObject.h" #include "cafPdmPointer.h" #include "cafPdmChildField.h" #include "cafAppEnum.h" // Include to make Pdm work for cvf::Color #include "cafPdmFieldCvfColor.h" class RimProject; class RivWellPathPartMgr; class RimWellLogFile; //================================================================================================== /// /// //================================================================================================== class RimWellPath : public caf::PdmObject { CAF_PDM_HEADER_INIT; public: RimWellPath(); virtual ~RimWellPath(); void setLogFileInfo(RimWellLogFile* logFileInfo); virtual caf::PdmFieldHandle* userDescriptionField(); virtual caf::PdmFieldHandle* objectToggleField(); virtual void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ); caf::PdmField name; caf::PdmField filepath; caf::PdmField wellPathIndexInFile; // -1 means none. caf::PdmField showWellPathLabel; caf::PdmField showWellPath; caf::PdmField wellPathColor; caf::PdmField wellPathRadiusScaleFactor; caf::PdmChildField m_wellLogFile; RigWellPath* wellPathGeometry() { return m_wellPath.p(); } RivWellPathPartMgr* partMgr(); bool readWellPathFile(QString * errorMessage, RifWellPathAsciiFileReader* asciiReader); void updateFilePathsFromProjectPath(const QString& newProjectPath, const QString& oldProjectPath); private: void setWellPathGeometry(RigWellPath* wellPathModel) { m_wellPath = wellPathModel; } void readJsonWellPathFile(); void readAsciiWellPathFile(RifWellPathAsciiFileReader* asciiReader); QString surveyType() { return m_surveyType; } void setSurveyType(QString surveyType); virtual void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ); bool isStoredInCache(); QString getCacheFileName(); QString getCacheDirectoryPath(); virtual void setupBeforeSave(); caf::PdmField id; caf::PdmField sourceSystem; caf::PdmField utmZone; caf::PdmField updateDate; caf::PdmField updateUser; caf::PdmField m_surveyType; cvf::ref m_wellPath; cvf::ref m_wellPathPartMgr; };