mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Legends : Changed to private functions, added override, other cleanup
This commit is contained in:
@@ -125,17 +125,15 @@ public:
|
||||
const caf::TitledOverlayFrame* titledOverlayFrame() const override;
|
||||
caf::TitledOverlayFrame* titledOverlayFrame() override;
|
||||
|
||||
protected:
|
||||
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue);
|
||||
virtual void initAfterRead();
|
||||
virtual caf::PdmFieldHandle* objectToggleField();
|
||||
private:
|
||||
void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
|
||||
void initAfterRead() override;
|
||||
caf::PdmFieldHandle* objectToggleField() override;
|
||||
|
||||
friend class RimStimPlanLegendConfig;
|
||||
virtual void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering );
|
||||
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||
QList<caf::PdmOptionItemInfo> calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly) override;
|
||||
|
||||
virtual QList<caf::PdmOptionItemInfo> calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly);
|
||||
|
||||
private:
|
||||
void updateLegend();
|
||||
void updateFieldVisibility();
|
||||
double roundToNumSignificantDigits(double value, double precision);
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
|
||||
#include "RiaApplication.h"
|
||||
#include "RiaColorTables.h"
|
||||
#include "RiaPreferences.h"
|
||||
|
||||
#include "RimEclipseView.h"
|
||||
#include "RimIntersectionCollection.h"
|
||||
@@ -35,7 +36,6 @@
|
||||
#include "cvfqtUtils.h"
|
||||
|
||||
#include <cmath>
|
||||
#include "RiaPreferences.h"
|
||||
|
||||
|
||||
CAF_PDM_SOURCE_INIT(RimTernaryLegendConfig, "RimTernaryLegendConfig");
|
||||
@@ -78,7 +78,6 @@ RimTernaryLegendConfig::RimTernaryLegendConfig()
|
||||
ternaryRangeSummary.uiCapability()->setUiEditorTypeName(caf::PdmUiTextEditor::uiEditorTypeName());
|
||||
ternaryRangeSummary.uiCapability()->setUiLabelPosition(caf::PdmUiItemInfo::TOP);
|
||||
|
||||
|
||||
CAF_PDM_InitField(&userDefinedMaxValueSoil, "UserDefinedMaxSoil", 1.0, "Max", "", "Min value of the legend", "");
|
||||
CAF_PDM_InitField(&userDefinedMinValueSoil, "UserDefinedMinSoil", 0.0, "Min", "", "Max value of the legend", "");
|
||||
|
||||
@@ -104,7 +103,6 @@ RimTernaryLegendConfig::RimTernaryLegendConfig()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimTernaryLegendConfig::~RimTernaryLegendConfig()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -35,8 +35,6 @@ namespace cvf
|
||||
class OverlayItem;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
///
|
||||
@@ -65,32 +63,35 @@ public:
|
||||
RimTernaryLegendConfig();
|
||||
virtual ~RimTernaryLegendConfig();
|
||||
|
||||
void setUiValuesFromLegendConfig(const RimTernaryLegendConfig* otherLegendConfig);
|
||||
void setAutomaticRanges(TernaryArrayIndex ternaryIndex, double globalMin, double globalMax, double localMin, double localMax);
|
||||
void ternaryRanges(double& soilLower, double& soilUpper, double& sgasLower, double& sgasUpper, double& swatLower, double& swatUpper) const;
|
||||
void setUiValuesFromLegendConfig(const RimTernaryLegendConfig* otherLegendConfig);
|
||||
void setAutomaticRanges(TernaryArrayIndex ternaryIndex, double globalMin, double globalMax, double localMin, double localMax);
|
||||
|
||||
void recreateLegend();
|
||||
|
||||
bool showLegend() const;
|
||||
|
||||
void setTitle(const QString& title);
|
||||
|
||||
const RivTernaryScalarMapper* scalarMapper() const;
|
||||
|
||||
const caf::TitledOverlayFrame* titledOverlayFrame() const override;
|
||||
caf::TitledOverlayFrame* titledOverlayFrame() override;
|
||||
|
||||
protected:
|
||||
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue);
|
||||
virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering );
|
||||
virtual void defineEditorAttribute(const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute);
|
||||
virtual caf::PdmFieldHandle* objectToggleField();
|
||||
void recreateLegend();
|
||||
bool showLegend() const;
|
||||
void setTitle(const QString& title);
|
||||
const RivTernaryScalarMapper* scalarMapper() const;
|
||||
const caf::TitledOverlayFrame* titledOverlayFrame() const override;
|
||||
caf::TitledOverlayFrame* titledOverlayFrame() override;
|
||||
|
||||
private:
|
||||
void updateLegend();
|
||||
void updateLabelText();
|
||||
double roundToNumSignificantDigits(double value, double precision);
|
||||
|
||||
void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
|
||||
void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override;
|
||||
void defineEditorAttribute(const caf::PdmFieldHandle* field,
|
||||
QString uiConfigName,
|
||||
caf::PdmUiEditorAttribute* attribute) override;
|
||||
caf::PdmFieldHandle* objectToggleField() override;
|
||||
|
||||
void updateLegend();
|
||||
void updateLabelText();
|
||||
double roundToNumSignificantDigits(double value, double precision);
|
||||
|
||||
void ternaryRanges(double& soilLower,
|
||||
double& soilUpper,
|
||||
double& sgasLower,
|
||||
double& sgasUpper,
|
||||
double& swatLower,
|
||||
double& swatUpper) const;
|
||||
|
||||
private:
|
||||
caf::PdmField<int> precision;
|
||||
caf::PdmField<RangeModeEnum> rangeMode;
|
||||
|
||||
Reference in New Issue
Block a user