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