mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
clang-format: Set column width to 140
* Set column width to 140 * Use c++20 * Remove redundant virtual
This commit is contained in:
@@ -67,10 +67,7 @@ RimBoxIntersection::RimBoxIntersection()
|
||||
|
||||
CAF_PDM_InitField( &m_name, "UserDescription", QString( "Intersection Name" ), "Name" );
|
||||
|
||||
CAF_PDM_InitField( &m_singlePlaneState,
|
||||
"singlePlaneState",
|
||||
caf::AppEnum<SinglePlaneState>( SinglePlaneState::PLANE_STATE_NONE ),
|
||||
"Box Type" );
|
||||
CAF_PDM_InitField( &m_singlePlaneState, "singlePlaneState", caf::AppEnum<SinglePlaneState>( SinglePlaneState::PLANE_STATE_NONE ), "Box Type" );
|
||||
|
||||
CAF_PDM_InitField( &m_minXCoord, "MinXCoord", 0.0, "Min" );
|
||||
m_minXCoord.uiCapability()->setUiEditorTypeName( caf::PdmUiDoubleSliderEditor::uiEditorTypeName() );
|
||||
@@ -278,9 +275,7 @@ void RimBoxIntersection::rebuildGeometry()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimBoxIntersection::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||
const QVariant& oldValue,
|
||||
const QVariant& newValue )
|
||||
void RimBoxIntersection::fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue )
|
||||
{
|
||||
if ( changedField == &m_singlePlaneState )
|
||||
{
|
||||
@@ -367,8 +362,8 @@ void RimBoxIntersection::fieldChangedByUi( const caf::PdmFieldHandle* changedFie
|
||||
}
|
||||
}
|
||||
|
||||
if ( changedField == &m_minXCoord || changedField == &m_minYCoord || changedField == &m_minDepth ||
|
||||
changedField == &m_maxXCoord || changedField == &m_maxYCoord || changedField == &m_maxDepth )
|
||||
if ( changedField == &m_minXCoord || changedField == &m_minYCoord || changedField == &m_minDepth || changedField == &m_maxXCoord ||
|
||||
changedField == &m_maxYCoord || changedField == &m_maxDepth )
|
||||
{
|
||||
if ( m_boxManipulator )
|
||||
{
|
||||
@@ -411,9 +406,7 @@ void RimBoxIntersection::updateBoxManipulatorGeometry()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimBoxIntersection::defineEditorAttribute( const caf::PdmFieldHandle* field,
|
||||
QString uiConfigName,
|
||||
caf::PdmUiEditorAttribute* attribute )
|
||||
void RimBoxIntersection::defineEditorAttribute( const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute )
|
||||
{
|
||||
caf::PdmUiDoubleSliderEditorAttribute* myAttr = dynamic_cast<caf::PdmUiDoubleSliderEditorAttribute*>( attribute );
|
||||
if ( myAttr )
|
||||
@@ -498,8 +491,8 @@ void RimBoxIntersection::defineUiOrdering( QString uiConfigName, caf::PdmUiOrder
|
||||
}
|
||||
|
||||
{
|
||||
caf::PdmUiGroup* group = uiOrdering.addNewGroup(
|
||||
"Depth" + QString( " [%1 %2]" ).arg( -cellsBoundingBox.max().z() ).arg( -cellsBoundingBox.min().z() ) );
|
||||
caf::PdmUiGroup* group =
|
||||
uiOrdering.addNewGroup( "Depth" + QString( " [%1 %2]" ).arg( -cellsBoundingBox.max().z() ).arg( -cellsBoundingBox.min().z() ) );
|
||||
group->add( &m_minDepth );
|
||||
group->add( &m_maxDepth );
|
||||
}
|
||||
|
||||
@@ -83,9 +83,7 @@ public:
|
||||
protected:
|
||||
caf::PdmFieldHandle* userDescriptionField() final;
|
||||
|
||||
void defineEditorAttribute( const caf::PdmFieldHandle* field,
|
||||
QString uiConfigName,
|
||||
caf::PdmUiEditorAttribute* attribute ) override;
|
||||
void defineEditorAttribute( const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute ) override;
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
||||
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||
void initAfterRead() override;
|
||||
|
||||
@@ -205,12 +205,7 @@ RimExtrudedCurveIntersection::RimExtrudedCurveIntersection()
|
||||
CAF_PDM_InitFieldNoDefault( &m_direction, "Direction", "Direction" );
|
||||
CAF_PDM_InitScriptableFieldNoDefault( &m_wellPath, "WellPath", "Well Path " );
|
||||
CAF_PDM_InitScriptableFieldNoDefault( &m_simulationWell, "SimulationWell", "Simulation Well" );
|
||||
CAF_PDM_InitScriptableFieldNoDefault( &m_userPolylineXyz,
|
||||
"Points",
|
||||
"Points",
|
||||
"",
|
||||
"Use Ctrl-C for copy and Ctrl-V for paste",
|
||||
"" );
|
||||
CAF_PDM_InitScriptableFieldNoDefault( &m_userPolylineXyz, "Points", "Points", "", "Use Ctrl-C for copy and Ctrl-V for paste", "" );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_userPolylineXydForUi, "PointsUi", "Points", "", "Use Ctrl-C for copy and Ctrl-V for paste", "" );
|
||||
m_userPolylineXydForUi.registerSetMethod( this, &RimExtrudedCurveIntersection::setPointsFromXYD );
|
||||
@@ -265,15 +260,10 @@ RimExtrudedCurveIntersection::RimExtrudedCurveIntersection()
|
||||
CAF_PDM_InitFieldNoDefault( &m_collectionLowerThreshold, "CollectionLowerThreshold", "Collection Lower Threshold" );
|
||||
m_collectionLowerThreshold.uiCapability()->setUiHidden( true );
|
||||
|
||||
CAF_PDM_InitField( &m_depthThresholdOverridden,
|
||||
"ThresholdOverridden",
|
||||
false,
|
||||
"Depth Filter is Controlled by Intersection Collection" );
|
||||
CAF_PDM_InitField( &m_depthThresholdOverridden, "ThresholdOverridden", false, "Depth Filter is Controlled by Intersection Collection" );
|
||||
caf::PdmUiNativeCheckBoxEditor::configureFieldForEditor( &m_depthThresholdOverridden );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_collectionDepthFilterType,
|
||||
"CollectionDepthFilterType",
|
||||
"Collection Controlled Filter Type" );
|
||||
CAF_PDM_InitFieldNoDefault( &m_collectionDepthFilterType, "CollectionDepthFilterType", "Collection Controlled Filter Type" );
|
||||
m_collectionDepthFilterType.uiCapability()->setUiHidden( true );
|
||||
|
||||
setDeletable( true );
|
||||
@@ -399,9 +389,7 @@ void RimExtrudedCurveIntersection::setDepthOverride( bool collectionOverride )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimExtrudedCurveIntersection::setDepthOverrideParameters( double upperThreshold,
|
||||
double lowerThreshold,
|
||||
RimIntersectionFilterEnum filterType )
|
||||
void RimExtrudedCurveIntersection::setDepthOverrideParameters( double upperThreshold, double lowerThreshold, RimIntersectionFilterEnum filterType )
|
||||
{
|
||||
m_collectionUpperThreshold = upperThreshold;
|
||||
m_collectionLowerThreshold = lowerThreshold;
|
||||
@@ -411,17 +399,13 @@ void RimExtrudedCurveIntersection::setDepthOverrideParameters( double
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimExtrudedCurveIntersection::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||
const QVariant& oldValue,
|
||||
const QVariant& newValue )
|
||||
void RimExtrudedCurveIntersection::fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue )
|
||||
{
|
||||
if ( changedField == &m_isActive || changedField == &m_type || changedField == &m_direction ||
|
||||
changedField == &m_wellPath || changedField == &m_simulationWell || changedField == &m_branchIndex ||
|
||||
changedField == &m_extentLength || changedField == &m_lengthUp || changedField == &m_lengthDown ||
|
||||
changedField == &m_showInactiveCells || changedField == &m_useSeparateDataSource ||
|
||||
changedField == &m_separateDataSource || changedField == &m_depthUpperThreshold ||
|
||||
changedField == &m_depthLowerThreshold || changedField == &m_depthThresholdOverridden ||
|
||||
changedField == &m_depthFilterType )
|
||||
if ( changedField == &m_isActive || changedField == &m_type || changedField == &m_direction || changedField == &m_wellPath ||
|
||||
changedField == &m_simulationWell || changedField == &m_branchIndex || changedField == &m_extentLength ||
|
||||
changedField == &m_lengthUp || changedField == &m_lengthDown || changedField == &m_showInactiveCells ||
|
||||
changedField == &m_useSeparateDataSource || changedField == &m_separateDataSource || changedField == &m_depthUpperThreshold ||
|
||||
changedField == &m_depthLowerThreshold || changedField == &m_depthThresholdOverridden || changedField == &m_depthFilterType )
|
||||
{
|
||||
rebuildGeometryAndScheduleCreateDisplayModel();
|
||||
}
|
||||
@@ -446,8 +430,7 @@ void RimExtrudedCurveIntersection::fieldChangedByUi( const caf::PdmFieldHandle*
|
||||
}
|
||||
}
|
||||
|
||||
if ( changedField == &m_inputPolylineFromViewerEnabled || changedField == &m_userPolylineXyz ||
|
||||
changedField == &m_userPolylineXydForUi )
|
||||
if ( changedField == &m_inputPolylineFromViewerEnabled || changedField == &m_userPolylineXyz || changedField == &m_userPolylineXydForUi )
|
||||
{
|
||||
if ( m_inputPolylineFromViewerEnabled )
|
||||
{
|
||||
@@ -603,8 +586,7 @@ void RimExtrudedCurveIntersection::defineUiOrdering( QString uiConfigName, caf::
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QList<caf::PdmOptionItemInfo>
|
||||
RimExtrudedCurveIntersection::calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions )
|
||||
QList<caf::PdmOptionItemInfo> RimExtrudedCurveIntersection::calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions )
|
||||
{
|
||||
QList<caf::PdmOptionItemInfo> options;
|
||||
|
||||
@@ -704,8 +686,7 @@ void RimExtrudedCurveIntersection::updateAzimuthLine()
|
||||
cvf::Mat4d transFromOriginMat = cvf::Mat4d::fromTranslation( m_twoAzimuthPoints()[0] );
|
||||
cvf::Mat4d transToOriginMat = cvf::Mat4d::fromTranslation( -m_twoAzimuthPoints()[0] );
|
||||
|
||||
m_twoAzimuthPoints.v()[1] =
|
||||
m_twoAzimuthPoints()[1].getTransformedPoint( transFromOriginMat * rotMat * transToOriginMat );
|
||||
m_twoAzimuthPoints.v()[1] = m_twoAzimuthPoints()[1].getTransformedPoint( transFromOriginMat * rotMat * transToOriginMat );
|
||||
|
||||
m_twoAzimuthPoints.uiCapability()->updateConnectedEditors();
|
||||
}
|
||||
@@ -1018,8 +999,7 @@ void RimExtrudedCurveIntersection::defineEditorAttribute( const caf::PdmFieldHan
|
||||
}
|
||||
else if ( field == &m_inputPolylineFromViewerEnabled )
|
||||
{
|
||||
setPushButtonText( m_inputPolylineFromViewerEnabled,
|
||||
dynamic_cast<caf::PdmUiPushButtonEditorAttribute*>( attribute ) );
|
||||
setPushButtonText( m_inputPolylineFromViewerEnabled, dynamic_cast<caf::PdmUiPushButtonEditorAttribute*>( attribute ) );
|
||||
}
|
||||
else if ( field == &m_userPolylineXydForUi )
|
||||
{
|
||||
@@ -1027,8 +1007,7 @@ void RimExtrudedCurveIntersection::defineEditorAttribute( const caf::PdmFieldHan
|
||||
}
|
||||
else if ( field == &m_inputTwoAzimuthPointsFromViewerEnabled )
|
||||
{
|
||||
setPushButtonText( m_inputTwoAzimuthPointsFromViewerEnabled,
|
||||
dynamic_cast<caf::PdmUiPushButtonEditorAttribute*>( attribute ) );
|
||||
setPushButtonText( m_inputTwoAzimuthPointsFromViewerEnabled, dynamic_cast<caf::PdmUiPushButtonEditorAttribute*>( attribute ) );
|
||||
}
|
||||
else if ( field == &m_twoAzimuthPoints )
|
||||
{
|
||||
@@ -1036,8 +1015,7 @@ void RimExtrudedCurveIntersection::defineEditorAttribute( const caf::PdmFieldHan
|
||||
}
|
||||
else if ( field == &m_inputExtrusionPointsFromViewerEnabled )
|
||||
{
|
||||
setPushButtonText( m_inputExtrusionPointsFromViewerEnabled,
|
||||
dynamic_cast<caf::PdmUiPushButtonEditorAttribute*>( attribute ) );
|
||||
setPushButtonText( m_inputExtrusionPointsFromViewerEnabled, dynamic_cast<caf::PdmUiPushButtonEditorAttribute*>( attribute ) );
|
||||
}
|
||||
else if ( field == &m_customExtrusionPoints )
|
||||
{
|
||||
@@ -1139,8 +1117,7 @@ cvf::Vec3d RimExtrudedCurveIntersection::extrusionDirection() const
|
||||
dir = polyLineDir ^ up;
|
||||
}
|
||||
}
|
||||
else if ( m_direction() == RimExtrudedCurveIntersection::CrossSectionDirEnum::CS_TWO_POINTS &&
|
||||
m_customExtrusionPoints().size() > 1 )
|
||||
else if ( m_direction() == RimExtrudedCurveIntersection::CrossSectionDirEnum::CS_TWO_POINTS && m_customExtrusionPoints().size() > 1 )
|
||||
{
|
||||
dir = m_customExtrusionPoints()[m_customExtrusionPoints().size() - 1] - m_customExtrusionPoints()[0];
|
||||
}
|
||||
|
||||
@@ -129,12 +129,10 @@ public:
|
||||
void rebuildGeometryAndScheduleCreateDisplayModel();
|
||||
|
||||
protected:
|
||||
caf::PdmFieldHandle* userDescriptionField() final;
|
||||
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* userDescriptionField() final;
|
||||
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;
|
||||
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions ) override;
|
||||
|
||||
void defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "" ) override;
|
||||
@@ -150,9 +148,7 @@ private:
|
||||
void updateName();
|
||||
static double azimuthInRadians( cvf::Vec3d vec );
|
||||
|
||||
void appendOptionItemsForSources( int currentLevel,
|
||||
RimSurfaceCollection* currentCollection,
|
||||
QList<caf::PdmOptionItemInfo>& options ) const;
|
||||
void appendOptionItemsForSources( int currentLevel, RimSurfaceCollection* currentCollection, QList<caf::PdmOptionItemInfo>& options ) const;
|
||||
|
||||
void onSurfaceIntersectionsChanged( const caf::SignalEmitter* emitter );
|
||||
|
||||
|
||||
@@ -112,8 +112,7 @@ QList<caf::PdmOptionItemInfo> RimIntersection::calculateValueOptions( const caf:
|
||||
|
||||
if ( fieldNeedingOptions == &m_separateDataSource )
|
||||
{
|
||||
std::vector<RimIntersectionResultDefinition*> iResDefs =
|
||||
findSeparateResultsCollection()->intersectionResultsDefinitions();
|
||||
std::vector<RimIntersectionResultDefinition*> iResDefs = findSeparateResultsCollection()->intersectionResultsDefinitions();
|
||||
|
||||
for ( auto iresdef : iResDefs )
|
||||
{
|
||||
@@ -153,8 +152,7 @@ void RimIntersection::defineSeparateDataSourceUi( QString uiConfigName, caf::Pdm
|
||||
inactiveText = " (Inactive)";
|
||||
}
|
||||
|
||||
caf::PdmUiGroup* separateResultsGroup =
|
||||
uiOrdering.addNewGroupWithKeyword( "Result Reference" + inactiveText, "SeparateResultReference" );
|
||||
caf::PdmUiGroup* separateResultsGroup = uiOrdering.addNewGroupWithKeyword( "Result Reference" + inactiveText, "SeparateResultReference" );
|
||||
separateResultsGroup->setCollapsedByDefault();
|
||||
separateResultsGroup->add( &m_useSeparateDataSource );
|
||||
separateResultsGroup->add( &m_separateDataSource );
|
||||
|
||||
@@ -94,8 +94,7 @@ caf::PdmFieldHandle* RimIntersectionCollection::objectToggleField()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimIntersectionCollection::defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering,
|
||||
QString uiConfigName /*= "" */ )
|
||||
void RimIntersectionCollection::defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName /*= "" */ )
|
||||
{
|
||||
RimGridView* gridView = nullptr;
|
||||
this->firstAncestorOfType( gridView );
|
||||
@@ -142,8 +141,7 @@ void RimIntersectionCollection::updateCellResultColor( bool hasGeneralCellResult
|
||||
{
|
||||
if ( cs->isActive() )
|
||||
{
|
||||
bool showResults = cs->activeSeparateResultDefinition() ? cs->activeSeparateResultDefinition()->hasResult()
|
||||
: hasGeneralCellResult;
|
||||
bool showResults = cs->activeSeparateResultDefinition() ? cs->activeSeparateResultDefinition()->hasResult() : hasGeneralCellResult;
|
||||
|
||||
if ( showResults )
|
||||
{
|
||||
@@ -160,8 +158,7 @@ void RimIntersectionCollection::updateCellResultColor( bool hasGeneralCellResult
|
||||
{
|
||||
if ( cs->isActive() )
|
||||
{
|
||||
bool hasSeparateInterResult = cs->activeSeparateResultDefinition() &&
|
||||
cs->activeSeparateResultDefinition()->hasResult();
|
||||
bool hasSeparateInterResult = cs->activeSeparateResultDefinition() && cs->activeSeparateResultDefinition()->hasResult();
|
||||
if ( hasSeparateInterResult || hasGeneralCellResult )
|
||||
{
|
||||
cs->intersectionBoxPartMgr()->updateCellResultColor( timeStepIndex );
|
||||
@@ -279,8 +276,7 @@ void RimIntersectionCollection::recomputeSimWellBranchData()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimIntersectionCollection::appendIntersectionAndUpdate( RimExtrudedCurveIntersection* intersection,
|
||||
bool allowActiveViewChange )
|
||||
void RimIntersectionCollection::appendIntersectionAndUpdate( RimExtrudedCurveIntersection* intersection, bool allowActiveViewChange )
|
||||
{
|
||||
m_intersections.push_back( intersection );
|
||||
|
||||
@@ -353,9 +349,7 @@ void RimIntersectionCollection::appendIntersectionBoxNoUpdate( RimBoxIntersectio
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimIntersectionCollection::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||
const QVariant& oldValue,
|
||||
const QVariant& newValue )
|
||||
void RimIntersectionCollection::fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue )
|
||||
{
|
||||
bool rebuildView = false;
|
||||
|
||||
@@ -378,8 +372,7 @@ void RimIntersectionCollection::fieldChangedByUi( const caf::PdmFieldHandle* cha
|
||||
rebuildView = true;
|
||||
}
|
||||
|
||||
if ( ( changedField == &m_depthUpperThreshold ) || ( changedField == &m_depthLowerThreshold ) ||
|
||||
( changedField == &m_depthFilterType ) )
|
||||
if ( ( changedField == &m_depthUpperThreshold ) || ( changedField == &m_depthLowerThreshold ) || ( changedField == &m_depthFilterType ) )
|
||||
{
|
||||
for ( RimExtrudedCurveIntersection* cs : m_intersections )
|
||||
{
|
||||
@@ -398,8 +391,7 @@ void RimIntersectionCollection::fieldChangedByUi( const caf::PdmFieldHandle* cha
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimIntersectionCollection::onChildDeleted( caf::PdmChildArrayFieldHandle* childArray,
|
||||
std::vector<caf::PdmObjectHandle*>& referringObjects )
|
||||
void RimIntersectionCollection::onChildDeleted( caf::PdmChildArrayFieldHandle* childArray, std::vector<caf::PdmObjectHandle*>& referringObjects )
|
||||
{
|
||||
syncronize2dIntersectionViews();
|
||||
rebuild3dView();
|
||||
@@ -491,9 +483,7 @@ void RimIntersectionCollection::defineUiOrdering( QString uiConfigName, caf::Pdm
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimIntersectionCollection::defineEditorAttribute( const caf::PdmFieldHandle* field,
|
||||
QString uiConfigName,
|
||||
caf::PdmUiEditorAttribute* attribute )
|
||||
void RimIntersectionCollection::defineEditorAttribute( const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute )
|
||||
{
|
||||
auto* doubleSliderAttrib = dynamic_cast<caf::PdmUiDoubleSliderEditorAttribute*>( attribute );
|
||||
if ( doubleSliderAttrib )
|
||||
|
||||
@@ -80,20 +80,17 @@ public:
|
||||
std::vector<RimExtrudedCurveIntersection*> intersections() const;
|
||||
std::vector<RimBoxIntersection*> intersectionBoxes() const;
|
||||
|
||||
void onChildDeleted( caf::PdmChildArrayFieldHandle* childArray,
|
||||
std::vector<caf::PdmObjectHandle*>& referringObjects ) override;
|
||||
void onChildDeleted( caf::PdmChildArrayFieldHandle* childArray, std::vector<caf::PdmObjectHandle*>& referringObjects ) override;
|
||||
|
||||
void onChildAdded( caf::PdmFieldHandle* containerForNewObject ) override;
|
||||
|
||||
protected:
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
||||
caf::PdmFieldHandle* objectToggleField() override;
|
||||
|
||||
void defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "" ) override;
|
||||
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||
void defineEditorAttribute( const caf::PdmFieldHandle* field,
|
||||
QString uiConfigName,
|
||||
caf::PdmUiEditorAttribute* attribute ) override;
|
||||
void defineEditorAttribute( const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute ) override;
|
||||
|
||||
private:
|
||||
RimEclipseView* eclipseView() const;
|
||||
|
||||
@@ -138,8 +138,7 @@ QString RimIntersectionResultDefinition::autoName() const
|
||||
else if ( geomCase )
|
||||
{
|
||||
m_geomResultDefinition->setGeoMechCase( geomCase );
|
||||
resultVarUiName = m_geomResultDefinition->resultFieldUiName() + ":" +
|
||||
m_geomResultDefinition->resultComponentUiName();
|
||||
resultVarUiName = m_geomResultDefinition->resultFieldUiName() + ":" + m_geomResultDefinition->resultComponentUiName();
|
||||
}
|
||||
|
||||
return resultVarUiName + " " + timestepName + " " + caseName;
|
||||
@@ -247,8 +246,7 @@ void RimIntersectionResultDefinition::updateLegendRangesTextAndVisibility( const
|
||||
( !this->isEclipseResultDefinition() && m_geomResultDefinition()->hasCategoryResult() ) )
|
||||
{
|
||||
regularLegendConfig()->setMappingMode( RimRegularLegendConfig::MappingType::CATEGORY_INTEGER );
|
||||
regularLegendConfig()->setColorLegend(
|
||||
RimRegularLegendConfig::mapToColorLegend( RimRegularLegendConfig::ColorRangesType::CATEGORY ) );
|
||||
regularLegendConfig()->setColorLegend( RimRegularLegendConfig::mapToColorLegend( RimRegularLegendConfig::ColorRangesType::CATEGORY ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -260,32 +258,26 @@ void RimIntersectionResultDefinition::updateLegendRangesTextAndVisibility( const
|
||||
if ( regularLegendConfig()->colorLegend() ==
|
||||
RimRegularLegendConfig::mapToColorLegend( RimRegularLegendConfig::ColorRangesType::CATEGORY ) )
|
||||
{
|
||||
regularLegendConfig()->setColorLegend(
|
||||
RimRegularLegendConfig::mapToColorLegend( RimRegularLegendConfig::ColorRangesType::NORMAL ) );
|
||||
regularLegendConfig()->setColorLegend( RimRegularLegendConfig::mapToColorLegend( RimRegularLegendConfig::ColorRangesType::NORMAL ) );
|
||||
}
|
||||
}
|
||||
|
||||
if ( this->isEclipseResultDefinition() )
|
||||
{
|
||||
RimEclipseResultDefinition* eclResultDef = this->eclipseResultDefinition();
|
||||
eclResultDef->updateRangesForExplicitLegends( this->regularLegendConfig(),
|
||||
this->ternaryLegendConfig(),
|
||||
this->timeStep() );
|
||||
eclResultDef->updateRangesForExplicitLegends( this->regularLegendConfig(), this->ternaryLegendConfig(), this->timeStep() );
|
||||
|
||||
eclResultDef->updateLegendTitle( this->regularLegendConfig(), title );
|
||||
|
||||
if ( this->regularLegendConfig()->showLegend() && eclResultDef->hasResult() )
|
||||
{
|
||||
nativeOrOverrideViewer->addColorLegendToBottomLeftCorner( this->regularLegendConfig()->titledOverlayFrame(),
|
||||
isUsingOverrideViewer );
|
||||
nativeOrOverrideViewer->addColorLegendToBottomLeftCorner( this->regularLegendConfig()->titledOverlayFrame(), isUsingOverrideViewer );
|
||||
}
|
||||
else if ( eclResultDef->isTernarySaturationSelected() &&
|
||||
eclResultDef->currentGridCellResults()->maxTimeStepCount() > 1 &&
|
||||
else if ( eclResultDef->isTernarySaturationSelected() && eclResultDef->currentGridCellResults()->maxTimeStepCount() > 1 &&
|
||||
this->ternaryLegendConfig()->showLegend() && this->ternaryLegendConfig()->titledOverlayFrame() )
|
||||
{
|
||||
this->ternaryLegendConfig()->setTitle( title );
|
||||
nativeOrOverrideViewer->addColorLegendToBottomLeftCorner( this->ternaryLegendConfig()->titledOverlayFrame(),
|
||||
isUsingOverrideViewer );
|
||||
nativeOrOverrideViewer->addColorLegendToBottomLeftCorner( this->ternaryLegendConfig()->titledOverlayFrame(), isUsingOverrideViewer );
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -294,8 +286,7 @@ void RimIntersectionResultDefinition::updateLegendRangesTextAndVisibility( const
|
||||
|
||||
if ( this->geoMechResultDefinition()->hasResult() && this->regularLegendConfig()->showLegend() )
|
||||
{
|
||||
nativeOrOverrideViewer->addColorLegendToBottomLeftCorner( this->regularLegendConfig()->titledOverlayFrame(),
|
||||
isUsingOverrideViewer );
|
||||
nativeOrOverrideViewer->addColorLegendToBottomLeftCorner( this->regularLegendConfig()->titledOverlayFrame(), isUsingOverrideViewer );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -319,9 +310,7 @@ caf::PdmFieldHandle* RimIntersectionResultDefinition::objectToggleField()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimIntersectionResultDefinition::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||
const QVariant& oldValue,
|
||||
const QVariant& newValue )
|
||||
void RimIntersectionResultDefinition::fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue )
|
||||
{
|
||||
bool reDraw = false;
|
||||
|
||||
@@ -396,20 +385,15 @@ void RimIntersectionResultDefinition::setDefaultEclipseLegendConfig()
|
||||
bool isCategoryResult = m_eclipseResultDefinition->hasCategoryResult();
|
||||
|
||||
auto eclResultDef = this->eclipseResultDefinition();
|
||||
eclResultDef->updateRangesForExplicitLegends( this->regularLegendConfig(),
|
||||
this->ternaryLegendConfig(),
|
||||
this->timeStep() );
|
||||
eclResultDef->updateRangesForExplicitLegends( this->regularLegendConfig(), this->ternaryLegendConfig(), this->timeStep() );
|
||||
|
||||
m_legendConfig->setDefaultConfigForResultName( m_eclipseResultDefinition->resultVariable(),
|
||||
useDiscreteLogLevels,
|
||||
isCategoryResult );
|
||||
m_legendConfig->setDefaultConfigForResultName( m_eclipseResultDefinition->resultVariable(), useDiscreteLogLevels, isCategoryResult );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QList<caf::PdmOptionItemInfo>
|
||||
RimIntersectionResultDefinition::calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions )
|
||||
QList<caf::PdmOptionItemInfo> RimIntersectionResultDefinition::calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions )
|
||||
{
|
||||
QList<caf::PdmOptionItemInfo> options;
|
||||
|
||||
@@ -444,8 +428,7 @@ void RimIntersectionResultDefinition::defineUiOrdering( QString uiConfigName, ca
|
||||
m_geomResultDefinition->uiOrdering( uiConfigName, uiOrdering );
|
||||
}
|
||||
|
||||
if ( ( eclipseCase && m_eclipseResultDefinition->hasDynamicResult() ||
|
||||
m_eclipseResultDefinition->isTernarySaturationSelected() ) ||
|
||||
if ( ( eclipseCase && m_eclipseResultDefinition->hasDynamicResult() || m_eclipseResultDefinition->isTernarySaturationSelected() ) ||
|
||||
geomCase )
|
||||
{
|
||||
uiOrdering.add( &m_timeStep );
|
||||
@@ -457,8 +440,7 @@ void RimIntersectionResultDefinition::defineUiOrdering( QString uiConfigName, ca
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimIntersectionResultDefinition::defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering,
|
||||
QString uiConfigName /*= ""*/ )
|
||||
void RimIntersectionResultDefinition::defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName /*= ""*/ )
|
||||
{
|
||||
RimGeoMechCase* geomCase = dynamic_cast<RimGeoMechCase*>( m_case.value() );
|
||||
|
||||
|
||||
@@ -54,9 +54,7 @@ public:
|
||||
RimEclipseResultDefinition* eclipseResultDefinition() const;
|
||||
RimGeoMechResultDefinition* geoMechResultDefinition() const;
|
||||
|
||||
void updateLegendRangesTextAndVisibility( const QString& title,
|
||||
RiuViewer* nativeOrOverrideViewer,
|
||||
bool isUsingOverrideViewer );
|
||||
void updateLegendRangesTextAndVisibility( const QString& title, RiuViewer* nativeOrOverrideViewer, bool isUsingOverrideViewer );
|
||||
|
||||
void update2dIntersectionViews();
|
||||
void setDefaultEclipseLegendConfig();
|
||||
@@ -69,8 +67,8 @@ protected:
|
||||
|
||||
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions ) override;
|
||||
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||
void defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "" ) override;
|
||||
void initAfterRead() override;
|
||||
void defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "" ) override;
|
||||
void initAfterRead() override;
|
||||
|
||||
private:
|
||||
void assignCaseIfMissing() const;
|
||||
|
||||
@@ -37,13 +37,12 @@ public:
|
||||
std::vector<RimIntersectionResultDefinition*> intersectionResultsDefinitions() const;
|
||||
|
||||
void appendIntersectionResultDefinition( RimIntersectionResultDefinition* interResDef );
|
||||
void onChildDeleted( caf::PdmChildArrayFieldHandle* childArray,
|
||||
std::vector<caf::PdmObjectHandle*>& referringObjects ) override;
|
||||
void onChildDeleted( caf::PdmChildArrayFieldHandle* childArray, std::vector<caf::PdmObjectHandle*>& referringObjects ) override;
|
||||
|
||||
protected:
|
||||
caf::PdmFieldHandle* objectToggleField() override;
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
||||
void initAfterRead() override;
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
||||
void initAfterRead() override;
|
||||
|
||||
private:
|
||||
caf::PdmField<bool> m_isActive;
|
||||
|
||||
Reference in New Issue
Block a user