mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2460 Tensor Vectors: Use result as colormapping on the vectors
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
#include "RigFemResultAddress.h"
|
||||
#include "RimGeoMechResultDefinition.h"
|
||||
#include "RimGeoMechView.h"
|
||||
#include "RimLegendConfig.h"
|
||||
|
||||
#include "cafAppEnum.h"
|
||||
#include "cafPdmUiListEditor.h"
|
||||
@@ -59,6 +60,10 @@ RimTensorResults::RimTensorResults()
|
||||
{
|
||||
CAF_PDM_InitObject("Tensor Results", ":/CellResult.png", "", "");
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&legendConfig, "LegendDefinition", "Legend Definition", "", "", "");
|
||||
this->legendConfig = new RimLegendConfig();
|
||||
legendConfig.uiCapability()->setUiHidden(true);
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&m_resultPositionType, "ResultPositionType", "Result Position", "", "", "");
|
||||
m_resultPositionType.uiCapability()->setUiHidden(true);
|
||||
|
||||
@@ -97,7 +102,7 @@ RimTensorResults::RimTensorResults()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimTensorResults::~RimTensorResults()
|
||||
{
|
||||
|
||||
delete legendConfig;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -108,6 +113,16 @@ RigFemResultAddress RimTensorResults::selectedTensorResult() const
|
||||
return RigFemResultAddress(m_resultPositionType(), m_resultFieldName().toStdString(), "");
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimTensorResults::setShowTensors(bool enableTensors)
|
||||
{
|
||||
m_showTensors = enableTensors;
|
||||
updateConnectedEditors();
|
||||
updateUiIconFromState(enableTensors);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -172,6 +187,22 @@ RimTensorResults::ScaleMethod RimTensorResults::scaleMethod() const
|
||||
return m_scaleMethod();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RigFemResultPosEnum RimTensorResults::resultPositionType() const
|
||||
{
|
||||
return m_resultPositionType();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimTensorResults::resultFieldName() const
|
||||
{
|
||||
return m_resultFieldName();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -208,6 +239,10 @@ void RimTensorResults::fieldChangedByUi(const caf::PdmFieldHandle* changedField,
|
||||
m_resultPositionType = m_resultPositionTypeUiField;
|
||||
m_resultFieldName = m_resultFieldNameUiField;
|
||||
}
|
||||
if (changedField == &m_showTensors)
|
||||
{
|
||||
setShowTensors(m_showTensors);
|
||||
}
|
||||
|
||||
RimGeoMechView* view;
|
||||
firstAncestorOrThisOfType(view);
|
||||
|
||||
Reference in New Issue
Block a user