Files

65 lines
1.9 KiB
C++
Raw Permalink Normal View History

2016-08-24 08:30:12 +02:00
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) Statoil ASA
//
2016-08-24 08:30:12 +02: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.
//
2016-08-24 08:30:12 +02: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.
//
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
2016-08-24 08:30:12 +02:00
// for more details.
//
/////////////////////////////////////////////////////////////////////////////////
#pragma once
#include "cafPdmField.h"
#include "cafPdmObject.h"
2026-02-27 10:30:35 +01:00
#include <expected>
2026-02-27 10:30:35 +01:00
#include <memory>
2016-08-24 08:30:12 +02:00
class RigFormationNames;
class QTextStream;
//==================================================================================================
///
//==================================================================================================
2016-08-24 08:30:12 +02:00
class RimFormationNames : public caf::PdmObject
{
CAF_PDM_HEADER_INIT;
public:
RimFormationNames();
~RimFormationNames() override;
2016-08-24 08:30:12 +02:00
void setFileName( const QString& fileName );
QString fileName();
QString shortName();
2016-08-24 08:30:12 +02:00
2026-02-27 10:30:35 +01:00
const RigFormationNames* formationNamesData() const;
void updateConnectedViews();
std::expected<void, QString> readFormationNamesFile();
2016-08-24 08:30:12 +02:00
static QString layerZoneTableFileName();
2016-08-24 08:30:12 +02:00
protected:
2020-02-12 11:43:15 +01:00
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
2021-04-15 02:14:51 +00:00
void defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "" ) override;
2016-08-24 08:30:12 +02:00
private:
void updateUiTreeName();
2016-08-24 08:30:12 +02:00
private:
caf::PdmField<caf::FilePath> m_formationNamesFileName;
2016-08-24 08:30:12 +02:00
2026-02-27 10:30:35 +01:00
std::unique_ptr<RigFormationNames> m_formationNamesData;
2016-08-24 08:30:12 +02:00
};