2017-02-20 02:31:24 -06:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// Copyright (C) 2017 - Statoil ASA
|
|
|
|
//
|
|
|
|
// 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
|
|
|
|
|
2018-03-06 07:18:26 -06:00
|
|
|
#include "RimCheckableObject.h"
|
2017-02-22 08:32:19 -06:00
|
|
|
|
2017-02-20 02:31:24 -06:00
|
|
|
#include "cafAppEnum.h"
|
|
|
|
#include "cafPdmChildField.h"
|
|
|
|
#include "cafPdmField.h"
|
|
|
|
#include "cafPdmChildArrayField.h"
|
|
|
|
|
2017-02-23 03:15:56 -06:00
|
|
|
// Include to make Pdm work for cvf::Color
|
|
|
|
#include "cafPdmFieldCvfColor.h"
|
|
|
|
|
2017-02-20 02:31:24 -06:00
|
|
|
namespace caf {
|
|
|
|
class PdmOptionItemInfo;
|
|
|
|
}
|
|
|
|
|
2017-02-23 03:15:56 -06:00
|
|
|
|
2017-02-20 02:31:24 -06:00
|
|
|
class RimLegendConfig;
|
|
|
|
class RimFractureTemplateCollection;
|
|
|
|
|
|
|
|
//==================================================================================================
|
|
|
|
///
|
|
|
|
///
|
|
|
|
//==================================================================================================
|
2018-03-06 07:18:26 -06:00
|
|
|
class RimStimPlanColors : public RimCheckableObject
|
2017-02-20 02:31:24 -06:00
|
|
|
{
|
|
|
|
CAF_PDM_HEADER_INIT;
|
|
|
|
|
2018-01-31 08:11:42 -06:00
|
|
|
public:
|
|
|
|
enum StimPlanResultColorType
|
|
|
|
{
|
|
|
|
COLOR_INTERPOLATION,
|
|
|
|
SINGLE_ELEMENT_COLOR
|
|
|
|
};
|
2017-02-20 02:31:24 -06:00
|
|
|
public:
|
|
|
|
RimStimPlanColors();
|
|
|
|
virtual ~RimStimPlanColors();
|
|
|
|
|
2017-02-22 08:32:19 -06:00
|
|
|
RimLegendConfig* activeLegend() const;
|
2018-01-25 05:14:54 -06:00
|
|
|
QString uiResultName() const;
|
2018-02-06 05:57:50 -06:00
|
|
|
void setDefaultResultName();
|
2017-02-22 08:32:19 -06:00
|
|
|
QString unit() const;
|
2017-02-23 03:15:56 -06:00
|
|
|
cvf::Color3f defaultColor() const;
|
2018-01-31 08:11:42 -06:00
|
|
|
bool showStimPlanMesh() const { return m_showStimPlanMesh; }
|
2018-02-02 02:06:24 -06:00
|
|
|
void setShowStimPlanMesh(bool showStimPlanMesh);
|
2017-02-23 03:15:56 -06:00
|
|
|
|
2017-02-22 08:32:19 -06:00
|
|
|
void loadDataAndUpdate();
|
|
|
|
void updateLegendData();
|
2017-02-20 06:24:22 -06:00
|
|
|
|
2018-01-02 04:21:37 -06:00
|
|
|
void updateStimPlanTemplates() const;
|
2018-01-31 08:11:42 -06:00
|
|
|
StimPlanResultColorType stimPlanResultColorType() const { return m_stimPlanCellVizMode(); };
|
2018-01-02 04:21:37 -06:00
|
|
|
|
2018-02-01 08:37:05 -06:00
|
|
|
void updateConductivityResultName();
|
|
|
|
|
2017-02-20 02:31:24 -06:00
|
|
|
protected:
|
|
|
|
virtual QList<caf::PdmOptionItemInfo> calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly) override;
|
|
|
|
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
|
|
|
|
virtual void defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "") override;
|
2017-02-22 08:32:19 -06:00
|
|
|
virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override;
|
|
|
|
|
2017-02-20 02:31:24 -06:00
|
|
|
private:
|
|
|
|
RimFractureTemplateCollection* fractureTemplateCollection() const;
|
|
|
|
|
|
|
|
static QString toResultName(const QString& resultNameAndUnit);
|
|
|
|
static QString toUnit(const QString& resultNameAndUnit);
|
|
|
|
|
|
|
|
private:
|
2017-02-23 03:15:56 -06:00
|
|
|
caf::PdmField<cvf::Color3f> m_defaultColor;
|
2017-02-20 02:31:24 -06:00
|
|
|
caf::PdmField<QString> m_resultNameAndUnit;
|
|
|
|
caf::PdmChildArrayField<RimLegendConfig*> m_legendConfigurations;
|
2018-01-31 08:11:42 -06:00
|
|
|
caf::PdmField<bool> m_showStimPlanMesh;
|
|
|
|
caf::PdmField<caf::AppEnum<StimPlanResultColorType>> m_stimPlanCellVizMode;
|
|
|
|
|
2017-02-20 02:31:24 -06:00
|
|
|
};
|
|
|
|
|