2016-09-06 10:27:30 +02:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
//
|
|
|
|
|
// Copyright (C) Statoil ASA
|
2019-09-06 10:40:57 +02:00
|
|
|
//
|
2016-09-06 10:27:30 +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.
|
2019-09-06 10:40:57 +02:00
|
|
|
//
|
2016-09-06 10:27:30 +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.
|
2019-09-06 10:40:57 +02:00
|
|
|
//
|
|
|
|
|
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
2016-09-06 10:27:30 +02:00
|
|
|
// for more details.
|
|
|
|
|
//
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <QString>
|
|
|
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
|
|
2020-04-30 16:54:25 +02:00
|
|
|
#include "cvfColor3.h"
|
|
|
|
|
|
2026-02-27 10:30:35 +01:00
|
|
|
class RigFormationNames
|
2016-09-06 10:27:30 +02:00
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
RigFormationNames();
|
|
|
|
|
|
2026-08-04 11:58:15 +02:00
|
|
|
bool isEmpty() const;
|
2026-02-27 10:30:35 +01:00
|
|
|
int formationIndexFromKLayerIdx( size_t Kidx ) const;
|
|
|
|
|
QString formationNameFromKLayerIdx( size_t Kidx ) const;
|
|
|
|
|
bool formationColorFromKLayerIdx( size_t Kidx, cvf::Color3f* formationColor ) const;
|
2016-09-06 10:27:30 +02:00
|
|
|
|
2026-02-27 10:30:35 +01:00
|
|
|
std::vector<QString> formationNames() const;
|
|
|
|
|
std::vector<cvf::Color3f> formationColors() const;
|
2016-09-06 10:27:30 +02:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
void appendFormationRange( const QString& name, int kStartIdx, int kEndIdx );
|
|
|
|
|
void appendFormationRangeHeight( const QString& name, int kLayerCount );
|
2016-09-06 10:27:30 +02:00
|
|
|
|
2020-04-30 16:54:25 +02:00
|
|
|
void appendFormationRange( const QString& name, cvf::Color3f color, int kStartIdx, int kEndIdx );
|
|
|
|
|
void appendFormationRangeHeight( const QString& name, cvf::Color3f color, int kLayerCount );
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
static cvf::Color3f undefinedColor();
|
2023-02-26 10:48:40 +01:00
|
|
|
void appendFormationRangeWithColor( const QString& name, cvf::Color3f color, int kStartIdx, int kEndIdx );
|
2020-04-30 16:54:25 +02:00
|
|
|
|
2016-09-06 10:27:30 +02:00
|
|
|
private:
|
2020-04-30 16:54:25 +02:00
|
|
|
std::vector<int> m_nameIndexPrKLayer;
|
|
|
|
|
std::vector<QString> m_formationNames;
|
|
|
|
|
std::vector<cvf::Color3f> m_formationColors; // optional color per formation
|
2016-09-06 10:27:30 +02:00
|
|
|
};
|