2016-08-24 01:30:12 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// Copyright (C) Statoil ASA
|
2019-09-06 03:40:57 -05:00
|
|
|
//
|
2016-08-24 01:30:12 -05:00
|
|
|
// 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.
|
2019-09-06 03:40:57 -05:00
|
|
|
//
|
2016-08-24 01:30:12 -05:00
|
|
|
// 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.
|
2019-09-06 03:40:57 -05:00
|
|
|
//
|
|
|
|
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
2016-08-24 01:30:12 -05:00
|
|
|
// for more details.
|
|
|
|
//
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "cafPdmField.h"
|
2019-09-06 03:40:57 -05:00
|
|
|
#include "cafPdmObject.h"
|
2016-08-24 01:30:12 -05:00
|
|
|
#include "cvfObject.h"
|
|
|
|
|
|
|
|
class RigFormationNames;
|
|
|
|
|
2019-07-26 03:12:08 -05:00
|
|
|
class QTextStream;
|
|
|
|
|
2017-10-19 00:39:16 -05:00
|
|
|
//==================================================================================================
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2017-10-19 00:39:16 -05:00
|
|
|
//==================================================================================================
|
2016-08-24 01:30:12 -05:00
|
|
|
class RimFormationNames : public caf::PdmObject
|
|
|
|
{
|
|
|
|
CAF_PDM_HEADER_INIT;
|
|
|
|
|
|
|
|
public:
|
|
|
|
RimFormationNames();
|
2018-10-18 12:45:57 -05:00
|
|
|
~RimFormationNames() override;
|
2016-08-24 01:30:12 -05:00
|
|
|
|
2019-12-11 02:31:13 -06:00
|
|
|
void setFileName( const QString& fileName );
|
|
|
|
QString fileName();
|
|
|
|
QString fileNameWoPath();
|
2016-08-24 01:30:12 -05:00
|
|
|
|
2020-02-12 04:13:38 -06:00
|
|
|
RigFormationNames* formationNamesData() { return m_formationNamesData.p(); }
|
|
|
|
void updateConnectedViews();
|
2016-08-24 08:19:39 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
void readFormationNamesFile( QString* errorMessage );
|
|
|
|
void updateFilePathsFromProjectPath( const QString& newProjectPath, const QString& oldProjectPath );
|
2016-08-24 01:30:12 -05:00
|
|
|
|
2019-10-18 07:45:12 -05:00
|
|
|
static QString layerZoneTableFileName();
|
|
|
|
|
2016-08-24 01:30:12 -05:00
|
|
|
protected:
|
2020-02-12 04:43:15 -06:00
|
|
|
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
2019-12-12 09:19:50 -06:00
|
|
|
|
2021-04-14 21:14:51 -05:00
|
|
|
void defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "" ) override;
|
2016-08-24 01:30:12 -05:00
|
|
|
|
|
|
|
private:
|
2019-09-06 03:40:57 -05:00
|
|
|
void updateUiTreeName();
|
2016-08-24 01:30:12 -05:00
|
|
|
|
2019-07-26 03:12:08 -05:00
|
|
|
private:
|
2019-12-11 02:31:13 -06:00
|
|
|
caf::PdmField<caf::FilePath> m_formationNamesFileName;
|
2016-08-24 01:30:12 -05:00
|
|
|
|
|
|
|
cvf::ref<RigFormationNames> m_formationNamesData;
|
|
|
|
};
|