2012-05-18 09:45:23 +02:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
//
|
2014-09-23 15:04:57 +02:00
|
|
|
// Copyright (C) 2011- Statoil ASA
|
|
|
|
|
// Copyright (C) 2013- Ceetron Solutions AS
|
|
|
|
|
// Copyright (C) 2011-2012 Ceetron AS
|
2019-09-06 10:40:57 +02:00
|
|
|
//
|
2012-05-18 09:45:23 +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
|
|
|
//
|
2012-05-18 09:45:23 +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>
|
2012-05-18 09:45:23 +02:00
|
|
|
// for more details.
|
|
|
|
|
//
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
2015-06-25 13:05:28 +02:00
|
|
|
#include "RimEclipseResultDefinition.h"
|
2012-05-18 09:45:23 +02:00
|
|
|
|
2015-07-31 18:58:23 +02:00
|
|
|
#include "cafPdmChildArrayField.h"
|
|
|
|
|
#include "cafPdmChildField.h"
|
2015-08-06 08:08:00 +02:00
|
|
|
#include "cafPdmPtrField.h"
|
2015-07-31 18:58:23 +02:00
|
|
|
|
2019-03-05 12:37:58 +01:00
|
|
|
class RimEclipseCase;
|
2014-05-06 22:39:53 +02:00
|
|
|
class RimTernaryLegendConfig;
|
2018-04-18 10:10:39 +02:00
|
|
|
class RimRegularLegendConfig;
|
2014-05-06 22:39:53 +02:00
|
|
|
|
2012-05-18 09:45:23 +02:00
|
|
|
//==================================================================================================
|
2019-09-06 10:40:57 +02:00
|
|
|
///
|
|
|
|
|
///
|
2012-05-18 09:45:23 +02:00
|
|
|
//==================================================================================================
|
2015-08-06 08:08:00 +02:00
|
|
|
class RimEclipseCellColors : public RimEclipseResultDefinition
|
2012-05-18 09:45:23 +02:00
|
|
|
{
|
|
|
|
|
CAF_PDM_HEADER_INIT;
|
2019-09-06 10:40:57 +02:00
|
|
|
|
2012-05-18 09:45:23 +02:00
|
|
|
public:
|
2015-06-25 12:04:46 +02:00
|
|
|
RimEclipseCellColors();
|
2018-10-18 19:45:57 +02:00
|
|
|
~RimEclipseCellColors() override;
|
2012-05-18 09:45:23 +02:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
void setReservoirView( RimEclipseView* ownerReservoirView );
|
|
|
|
|
RimEclipseView* reservoirView();
|
2015-08-06 08:08:00 +02:00
|
|
|
|
2019-11-22 12:36:39 +01:00
|
|
|
void updateRangesForEmbeddedLegends( int timestep );
|
2019-09-06 10:40:57 +02:00
|
|
|
RimRegularLegendConfig* legendConfig();
|
|
|
|
|
RimTernaryLegendConfig* ternaryLegendConfig();
|
2012-05-18 09:45:23 +02:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
void setResultVariable( const QString& resultName ) override;
|
|
|
|
|
|
|
|
|
|
void updateIconState();
|
|
|
|
|
|
|
|
|
|
void updateLegendCategorySettings() override;
|
|
|
|
|
void uiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "" );
|
2015-09-23 13:48:25 +02:00
|
|
|
|
2015-09-01 13:56:35 +02:00
|
|
|
protected:
|
2012-05-18 09:45:23 +02:00
|
|
|
// Overridden methods
|
2020-02-12 11:43:15 +01:00
|
|
|
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
2019-09-06 10:40:57 +02:00
|
|
|
void defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "" ) override;
|
2014-06-13 08:12:45 +02:00
|
|
|
|
2015-06-25 12:06:43 +02:00
|
|
|
friend class RimEclipseFaultColors;
|
2016-08-03 16:01:44 +02:00
|
|
|
friend class RimCellEdgeColors;
|
2019-09-06 10:40:57 +02:00
|
|
|
void initAfterRead() override;
|
2012-05-18 09:45:23 +02:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
2019-04-15 11:06:27 +02:00
|
|
|
|
2012-05-18 09:45:23 +02:00
|
|
|
private:
|
2019-09-06 10:40:57 +02:00
|
|
|
void changeLegendConfig( QString resultVarNameOfNewLegend );
|
2012-05-18 09:45:23 +02:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
caf::PdmChildArrayField<RimRegularLegendConfig*> m_legendConfigData;
|
|
|
|
|
caf::PdmPtrField<RimRegularLegendConfig*> m_legendConfigPtrField;
|
|
|
|
|
caf::PdmChildField<RimTernaryLegendConfig*> m_ternaryLegendConfig;
|
2015-09-01 13:56:35 +02:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
caf::PdmPointer<RimEclipseView> m_reservoirView;
|
2015-08-06 08:08:00 +02:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
// Obsolete
|
|
|
|
|
caf::PdmChildField<RimRegularLegendConfig*> obsoleteField_legendConfig;
|
2012-05-18 09:45:23 +02:00
|
|
|
};
|