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
|
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.
|
|
|
|
|
//
|
|
|
|
|
// 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>
|
|
|
|
|
// 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
|
|
|
|
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
|
|
|
//==================================================================================================
|
|
|
|
|
///
|
|
|
|
|
///
|
|
|
|
|
//==================================================================================================
|
2015-08-06 08:08:00 +02:00
|
|
|
class RimEclipseCellColors : public RimEclipseResultDefinition
|
2012-05-18 09:45:23 +02:00
|
|
|
{
|
|
|
|
|
CAF_PDM_HEADER_INIT;
|
|
|
|
|
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
|
|
|
|
2015-09-01 13:56:35 +02:00
|
|
|
void setReservoirView(RimEclipseView* ownerReservoirView);
|
|
|
|
|
RimEclipseView* reservoirView();
|
2015-08-06 08:08:00 +02:00
|
|
|
|
2018-02-01 17:45:22 +01:00
|
|
|
void updateLegendData(size_t timestep,
|
2018-04-18 10:10:39 +02:00
|
|
|
RimRegularLegendConfig* legendConfig = nullptr,
|
2018-02-01 17:45:22 +01:00
|
|
|
RimTernaryLegendConfig* ternaryLegendConfig = nullptr);
|
2018-09-24 22:26:14 +02:00
|
|
|
|
2018-04-18 10:10:39 +02:00
|
|
|
RimRegularLegendConfig* legendConfig();
|
2018-09-24 22:26:14 +02:00
|
|
|
RimTernaryLegendConfig* ternaryLegendConfig();
|
2012-05-18 09:45:23 +02:00
|
|
|
|
2018-10-18 19:45:57 +02:00
|
|
|
void setResultVariable(const QString& resultName) override;
|
2015-09-23 13:48:25 +02:00
|
|
|
|
|
|
|
|
void updateIconState();
|
|
|
|
|
|
2018-10-18 19:45:57 +02:00
|
|
|
void updateLegendCategorySettings() override;
|
2016-09-07 11:41:02 +02:00
|
|
|
|
2015-09-01 13:56:35 +02:00
|
|
|
protected:
|
2012-05-18 09:45:23 +02:00
|
|
|
// Overridden methods
|
2018-10-18 19:45:57 +02:00
|
|
|
void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
|
|
|
|
|
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;
|
2018-10-18 19:45:57 +02:00
|
|
|
void initAfterRead() override;
|
2012-05-18 09:45:23 +02:00
|
|
|
|
|
|
|
|
private:
|
2015-09-01 13:56:35 +02:00
|
|
|
void changeLegendConfig(QString resultVarNameOfNewLegend);
|
2012-05-18 09:45:23 +02:00
|
|
|
|
2018-04-18 10:10:39 +02:00
|
|
|
caf::PdmChildArrayField<RimRegularLegendConfig*> m_legendConfigData;
|
|
|
|
|
caf::PdmPtrField<RimRegularLegendConfig*> m_legendConfigPtrField;
|
2018-09-24 22:26:14 +02:00
|
|
|
caf::PdmChildField<RimTernaryLegendConfig*> m_ternaryLegendConfig;
|
2015-09-01 13:56:35 +02:00
|
|
|
|
2018-10-31 10:02:55 +01:00
|
|
|
caf::PdmPointer<RimEclipseView> m_reservoirView;
|
2015-08-06 08:08:00 +02:00
|
|
|
|
2015-09-01 13:56:35 +02:00
|
|
|
// Obsolete
|
2018-04-18 10:10:39 +02:00
|
|
|
caf::PdmChildField<RimRegularLegendConfig*> obsoleteField_legendConfig;
|
2012-05-18 09:45:23 +02:00
|
|
|
};
|
|
|
|
|
|