mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-21 05:53:25 -06:00
#8093 StimPlan Model: simplify notations.
This commit is contained in:
parent
0332f7bb9a
commit
2dbe6666da
@ -56,7 +56,6 @@
|
|||||||
#include "RimStimPlanModelTemplateCollection.h"
|
#include "RimStimPlanModelTemplateCollection.h"
|
||||||
#include "RimTextAnnotation.h"
|
#include "RimTextAnnotation.h"
|
||||||
#include "RimTools.h"
|
#include "RimTools.h"
|
||||||
#include "RimUserDefinedPolylinesAnnotation.h"
|
|
||||||
#include "RimWellPath.h"
|
#include "RimWellPath.h"
|
||||||
#include "RimWellPathCollection.h"
|
#include "RimWellPathCollection.h"
|
||||||
#include "RimWellPathGeometryDef.h"
|
#include "RimWellPathGeometryDef.h"
|
||||||
@ -253,7 +252,6 @@ RimStimPlanModel::RimStimPlanModel()
|
|||||||
CAF_PDM_InitScriptableField( &m_barrierFaultName, "BarrierFaultName", QString( "" ), "Barrier Fault", "", "", "" );
|
CAF_PDM_InitScriptableField( &m_barrierFaultName, "BarrierFaultName", QString( "" ), "Barrier Fault", "", "", "" );
|
||||||
m_barrierFaultName.uiCapability()->setUiReadOnly( true );
|
m_barrierFaultName.uiCapability()->setUiReadOnly( true );
|
||||||
|
|
||||||
CAF_PDM_InitScriptableFieldNoDefault( &m_barrierAnnotation, "BarrierAnnotation", "Barrier Annotation", "", "", "" );
|
|
||||||
CAF_PDM_InitScriptableFieldNoDefault( &m_barrierTextAnnotation,
|
CAF_PDM_InitScriptableFieldNoDefault( &m_barrierTextAnnotation,
|
||||||
"BarrierTextAnnotation",
|
"BarrierTextAnnotation",
|
||||||
"Barrier Text Annotation",
|
"Barrier Text Annotation",
|
||||||
@ -754,13 +752,6 @@ void RimStimPlanModel::updateDistanceToBarrierAndDip()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimStimPlanModel::clearBarrierAnnotation()
|
void RimStimPlanModel::clearBarrierAnnotation()
|
||||||
{
|
{
|
||||||
auto existingAnnotation = m_barrierAnnotation.value();
|
|
||||||
if ( existingAnnotation )
|
|
||||||
{
|
|
||||||
delete existingAnnotation;
|
|
||||||
m_barrierAnnotation = nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
auto existingTextAnnotation = m_barrierTextAnnotation.value();
|
auto existingTextAnnotation = m_barrierTextAnnotation.value();
|
||||||
if ( existingTextAnnotation )
|
if ( existingTextAnnotation )
|
||||||
{
|
{
|
||||||
@ -785,31 +776,14 @@ void RimStimPlanModel::addBarrierAnnotation( const cvf::Vec3d& startPosition,
|
|||||||
RimAnnotationCollectionBase* coll = annotationCollection();
|
RimAnnotationCollectionBase* coll = annotationCollection();
|
||||||
if ( !coll ) return;
|
if ( !coll ) return;
|
||||||
|
|
||||||
{
|
|
||||||
auto newAnnotation = new RimUserDefinedPolylinesAnnotation();
|
|
||||||
|
|
||||||
RimPolylineTarget* startTarget = new RimPolylineTarget();
|
|
||||||
startTarget->setAsPointXYZ( startPosition );
|
|
||||||
newAnnotation->insertTarget( nullptr, startTarget );
|
|
||||||
|
|
||||||
RimPolylineTarget* endTarget = new RimPolylineTarget();
|
|
||||||
endTarget->setAsPointXYZ( endPosition );
|
|
||||||
newAnnotation->insertTarget( nullptr, endTarget );
|
|
||||||
|
|
||||||
m_barrierAnnotation = newAnnotation;
|
|
||||||
dynamic_cast<RimAnnotationCollection*>( coll )->addAnnotation( newAnnotation );
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
auto newAnnotation = new RimTextAnnotation();
|
auto newAnnotation = new RimTextAnnotation();
|
||||||
newAnnotation->setText( text );
|
newAnnotation->setText( text );
|
||||||
newAnnotation->setLabelPoint( endPosition );
|
newAnnotation->setLabelPoint( endPosition );
|
||||||
newAnnotation->setAnchorPoint( endPosition );
|
newAnnotation->setAnchorPoint( startPosition );
|
||||||
|
|
||||||
m_barrierTextAnnotation = newAnnotation;
|
m_barrierTextAnnotation = newAnnotation;
|
||||||
coll->addAnnotation( newAnnotation );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
coll->addAnnotation( newAnnotation );
|
||||||
coll->scheduleRedrawOfRelevantViews();
|
coll->scheduleRedrawOfRelevantViews();
|
||||||
coll->updateConnectedEditors();
|
coll->updateConnectedEditors();
|
||||||
}
|
}
|
||||||
@ -830,7 +804,6 @@ RimAnnotationCollectionBase* RimStimPlanModel::annotationCollection()
|
|||||||
void RimStimPlanModel::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering )
|
void RimStimPlanModel::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering )
|
||||||
{
|
{
|
||||||
m_thicknessDirectionWellPath.uiCapability()->setUiHidden( true );
|
m_thicknessDirectionWellPath.uiCapability()->setUiHidden( true );
|
||||||
m_barrierAnnotation.uiCapability()->setUiHidden( true );
|
|
||||||
m_barrierTextAnnotation.uiCapability()->setUiHidden( true );
|
m_barrierTextAnnotation.uiCapability()->setUiHidden( true );
|
||||||
m_azimuthAngle.uiCapability()->setUiHidden( m_fractureOrientation() != RimStimPlanModel::FractureOrientation::AZIMUTH );
|
m_azimuthAngle.uiCapability()->setUiHidden( m_fractureOrientation() != RimStimPlanModel::FractureOrientation::AZIMUTH );
|
||||||
|
|
||||||
|
@ -259,7 +259,6 @@ protected:
|
|||||||
caf::PdmField<double> m_distanceToBarrier;
|
caf::PdmField<double> m_distanceToBarrier;
|
||||||
caf::PdmField<double> m_barrierDip;
|
caf::PdmField<double> m_barrierDip;
|
||||||
caf::PdmField<int> m_wellPenetrationLayer;
|
caf::PdmField<int> m_wellPenetrationLayer;
|
||||||
caf::PdmPtrField<RimUserDefinedPolylinesAnnotation*> m_barrierAnnotation;
|
|
||||||
caf::PdmPtrField<RimTextAnnotation*> m_barrierTextAnnotation;
|
caf::PdmPtrField<RimTextAnnotation*> m_barrierTextAnnotation;
|
||||||
caf::PdmField<QString> m_barrierFaultName;
|
caf::PdmField<QString> m_barrierFaultName;
|
||||||
caf::PdmField<bool> m_showOnlyBarrierFault;
|
caf::PdmField<bool> m_showOnlyBarrierFault;
|
||||||
|
Loading…
Reference in New Issue
Block a user