Make Python code use the new generated skeleton and rename ResInsight parameters to fit

This commit is contained in:
Gaute Lindkvist
2020-02-21 12:10:02 +01:00
parent ae3651ab30
commit 1f6e9513de
42 changed files with 2078 additions and 2085 deletions

View File

@@ -74,7 +74,7 @@ void caf::AppEnum<Rim3dView::SurfaceModeType>::setUp()
} // End namespace caf
CAF_PDM_XML_ABSTRACT_SOURCE_INIT( Rim3dView, "GenericView" ); // Do not use. Abstract class
CAF_PDM_XML_ABSTRACT_SOURCE_INIT( Rim3dView, "View", "GenericView" ); // Do not use. Abstract class
//--------------------------------------------------------------------------------------------------
///
@@ -86,7 +86,10 @@ Rim3dView::Rim3dView( void )
RiaPreferences* preferences = app->preferences();
CVF_ASSERT( preferences );
RICF_InitField( &m_id, "ViewId", -1, "View ID", "", "", "" );
CAF_PDM_InitObject( "3d View", "", "", "" );
RICF_InitField( &m_id, "Id", -1, "View ID", "", "", "" );
m_id.xmlCapability()->registerKeywordAlias( "ViewId" );
m_id.uiCapability()->setUiReadOnly( true );
m_id.uiCapability()->setUiHidden( true );
m_id.capability<RicfFieldHandle>()->setIOWriteable( false );
@@ -104,20 +107,21 @@ Rim3dView::Rim3dView( void )
CAF_PDM_InitField( &m_cameraPointOfInterest, "CameraPointOfInterest", cvf::Vec3d::ZERO, "", "", "", "" );
m_cameraPointOfInterest.uiCapability()->setUiHidden( true );
CAF_PDM_InitField( &isPerspectiveView, "PerspectiveProjection", true, "Perspective Projection", "", "", "" );
RICF_InitField( &isPerspectiveView, "PerspectiveProjection", true, "Perspective Projection", "", "", "" );
double defaultScaleFactor = preferences->defaultScaleFactorZ();
CAF_PDM_InitField( &scaleZ, "GridZScale", defaultScaleFactor, "Z Scale", "", "Scales the scene in the Z direction", "" );
RICF_InitField( &scaleZ, "GridZScale", defaultScaleFactor, "Z Scale", "", "Scales the scene in the Z direction", "" );
cvf::Color3f defBackgColor = preferences->defaultViewerBackgroundColor();
RICF_InitField( &m_backgroundColor, "ViewBackgroundColor", defBackgColor, "Background", "", "", "" );
RICF_InitField( &m_backgroundColor, "BackgroundColor", defBackgColor, "Background", "", "", "" );
m_backgroundColor.xmlCapability()->registerKeywordAlias( "ViewBackgroundColor" );
CAF_PDM_InitField( &maximumFrameRate, "MaximumFrameRate", 10, "Maximum Frame Rate", "", "", "" );
maximumFrameRate.uiCapability()->setUiHidden( true );
CAF_PDM_InitField( &hasUserRequestedAnimation, "AnimationMode", false, "Animation Mode", "", "", "" );
hasUserRequestedAnimation.uiCapability()->setUiHidden( true );
CAF_PDM_InitField( &m_currentTimeStep, "CurrentTimeStep", 0, "Current Time Step", "", "", "" );
RICF_InitField( &m_currentTimeStep, "CurrentTimeStep", 0, "Current Time Step", "", "", "" );
m_currentTimeStep.uiCapability()->setUiHidden( true );
caf::AppEnum<RiaDefines::MeshModeType> defaultMeshType = preferences->defaultMeshModeType();
@@ -126,15 +130,15 @@ Rim3dView::Rim3dView( void )
RICF_InitField( &m_showGridBox, "ShowGridBox", true, "Show Grid Box", "", "", "" );
CAF_PDM_InitField( &m_disableLighting,
"DisableLighting",
false,
"Disable Results Lighting",
"",
"Disable light model for scalar result colors",
"" );
RICF_InitField( &m_disableLighting,
"DisableLighting",
false,
"Disable Results Lighting",
"",
"Disable light model for scalar result colors",
"" );
CAF_PDM_InitField( &m_showZScaleLabel, "ShowZScale", true, "Show Z Scale Label", "", "", "" );
RICF_InitField( &m_showZScaleLabel, "ShowZScale", true, "Show Z Scale Label", "", "", "" );
CAF_PDM_InitFieldNoDefault( &m_comparisonView, "ComparisonView", "Comparison View", "", "", "" );
@@ -880,8 +884,11 @@ void Rim3dView::fieldChangedByUi( const caf::PdmFieldHandle* changedField, const
}
else if ( changedField == &m_showZScaleLabel )
{
m_viewer->showZScaleLabel( m_showZScaleLabel() );
m_viewer->update();
if ( m_viewer )
{
m_viewer->showZScaleLabel( m_showZScaleLabel() );
m_viewer->update();
}
}
else if ( changedField == &m_comparisonView )
{

View File

@@ -110,7 +110,7 @@
#include <climits>
CAF_PDM_SOURCE_INIT( RimEclipseView, "ReservoirView" );
CAF_PDM_XML_SCRIPTABLE_SOURCE_INIT( RimEclipseView, "ReservoirView" );
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -120,7 +120,7 @@ RimEclipseView::RimEclipseView()
RiaPreferences* preferences = app->preferences();
CVF_ASSERT( preferences );
CAF_PDM_InitObject( "Reservoir View", ":/3DView16x16.png", "", "" );
CAF_PDM_InitObject( "Reservoir View", ":/3DView16x16.png", "", "The Eclipse 3d Reservoir View" );
CAF_PDM_InitFieldNoDefault( &m_cellResult, "GridCellResult", "Cell Result", ":/CellResult.png", "", "" );
m_cellResult = new RimEclipseCellColors();

View File

@@ -5,7 +5,7 @@
#include "RimTools.h"
#include "cafUtils.h"
CAF_PDM_SOURCE_INIT( RimFileWellPath, "WellPath" );
CAF_PDM_SCRIPTABLE_SOURCE_INIT( RimFileWellPath, "WellPath" );
//--------------------------------------------------------------------------------------------------
///

View File

@@ -77,7 +77,7 @@
#include <QMessageBox>
CAF_PDM_SOURCE_INIT( RimGeoMechView, "GeoMechView" );
CAF_PDM_SCRIPTABLE_SOURCE_INIT( RimGeoMechView, "GeoMechView" );
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -87,7 +87,7 @@ RimGeoMechView::RimGeoMechView( void )
RiaPreferences* preferences = app->preferences();
CVF_ASSERT( preferences );
CAF_PDM_InitObject( "Geomechanical View", ":/3DViewGeoMech16x16.png", "", "" );
CAF_PDM_InitObject( "Geomechanical View", ":/3DViewGeoMech16x16.png", "", "The Geomechanical 3d View" );
CAF_PDM_InitFieldNoDefault( &cellResult, "GridCellResult", "Color Result", ":/CellResult.png", "", "" );
cellResult = new RimGeoMechCellColors();

View File

@@ -48,7 +48,7 @@
#include <QDir>
#include <QMessageBox>
CAF_PDM_SOURCE_INIT( RimIdenticalGridCaseGroup, "RimIdenticalGridCaseGroup" );
CAF_PDM_SCRIPTABLE_SOURCE_INIT( RimIdenticalGridCaseGroup, "GridCaseGroup", "RimIdenticalGridCaseGroup" );
//--------------------------------------------------------------------------------------------------
///

View File

@@ -32,7 +32,7 @@
#include "RimWellPathFractureCollection.h"
#include "cafPdmUiTreeOrdering.h"
CAF_PDM_SOURCE_INIT( RimModeledWellPath, "ModeledWellPath" );
CAF_PDM_SCRIPTABLE_SOURCE_INIT( RimModeledWellPath, "ModeledWellPath" );
//--------------------------------------------------------------------------------------------------
///

View File

@@ -25,7 +25,7 @@ void RimPlot::RowOrColSpanEnum::setUp()
}
} // namespace caf
CAF_PDM_XML_ABSTRACT_SOURCE_INIT( RimPlot, "RimPlot" ); // Do not use. Abstract class
CAF_PDM_XML_ABSTRACT_SOURCE_INIT( RimPlot, "Plot", "RimPlot" ); // Do not use. Abstract class
//--------------------------------------------------------------------------------------------------
///

View File

@@ -30,7 +30,7 @@
#include <QPainter>
CAF_PDM_XML_ABSTRACT_SOURCE_INIT( RimPlotWindow, "RimPlotWindow" ); // Do not use. Abstract class
CAF_PDM_XML_ABSTRACT_SOURCE_INIT( RimPlotWindow, "PlotWindow", "RimPlotWindow" ); // Do not use. Abstract class
//--------------------------------------------------------------------------------------------------
///
@@ -39,7 +39,8 @@ RimPlotWindow::RimPlotWindow()
{
CAF_PDM_InitObject( "PlotWindow", "", "", "" );
RICF_InitField( &m_id, "ViewId", -1, "View ID", "", "", "" );
RICF_InitField( &m_id, "Id", -1, "View ID", "", "", "" );
m_id.xmlCapability()->registerKeywordAlias( "ViewId" );
m_id.uiCapability()->setUiReadOnly( true );
m_id.uiCapability()->setUiHidden( true );
m_id.capability<RicfFieldHandle>()->setIOWriteable( false );

View File

@@ -101,7 +101,7 @@
#include <QMenu>
#include <algorithm>
CAF_PDM_SOURCE_INIT( RimProject, "ResInsightProject" );
CAF_PDM_SCRIPTABLE_SOURCE_INIT( RimProject, "Project", "ResInsightProject" );
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@@ -55,16 +55,17 @@
//--------------------------------------------------------------------------------------------------
Rim2dIntersectionView* corresponding2dIntersectionView( RimSimWellInView* simWellInView );
CAF_PDM_SOURCE_INIT( RimSimWellInView, "Well" );
CAF_PDM_SCRIPTABLE_SOURCE_INIT( RimSimWellInView, "SimulationWell", "Well" );
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimSimWellInView::RimSimWellInView()
{
CAF_PDM_InitObject( "Well", ":/Well.png", "", "" );
CAF_PDM_InitObject( "Simulation Well", ":/Well.png", "", "" );
RICF_InitFieldNoDefault( &name, "WellName", "Name", "", "", "" );
RICF_InitFieldNoDefault( &name, "Name", "Name", "", "", "" );
name.xmlCapability()->registerKeywordAlias( "WellName" );
CAF_PDM_InitField( &showWell, "ShowWell", true, "Show well ", "", "", "" );

View File

@@ -26,7 +26,7 @@
#include "RimWellLogFile.h"
#include "RimWellPath.h"
CAF_PDM_SOURCE_INIT( RimWbsParameters, "WbsParameters" );
CAF_PDM_SCRIPTABLE_SOURCE_INIT( RimWbsParameters, "WbsParameters" );
//--------------------------------------------------------------------------------------------------
///

View File

@@ -33,7 +33,7 @@
#include "cafPdmUiComboBoxEditor.h"
#include "cafPdmUiGroup.h"
CAF_PDM_SOURCE_INIT( RimWellBoreStabilityPlot, "WellBoreStabilityPlot" );
CAF_PDM_SCRIPTABLE_SOURCE_INIT( RimWellBoreStabilityPlot, "WellBoreStabilityPlot" );
//--------------------------------------------------------------------------------------------------
///

View File

@@ -64,14 +64,17 @@ void RimWellLogPlot::AxisGridEnum::setUp()
} // End namespace caf
CAF_PDM_SOURCE_INIT( RimWellLogPlot, "WellLogPlot" );
CAF_PDM_SCRIPTABLE_SOURCE_INIT( RimWellLogPlot, "WellLogPlot" );
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimWellLogPlot::RimWellLogPlot()
{
CAF_PDM_InitObject( "Well Log Plot", ":/WellLogPlot16x16.png", "", "" );
CAF_PDM_InitObject( "Well Log Plot",
":/WellLogPlot16x16.png",
"",
"A Well Log Plot With a shared Depth Axis and Multiple Tracks" );
CAF_PDM_InitFieldNoDefault( &m_commonDataSource,
"CommonDataSource",

View File

@@ -61,7 +61,7 @@
#include <regex>
CAF_PDM_SOURCE_INIT( RimWellPath, "WellPathBase" );
CAF_PDM_SCRIPTABLE_SOURCE_INIT( RimWellPath, "WellPathBase" );
//--------------------------------------------------------------------------------------------------
///
@@ -75,7 +75,8 @@ RimWellPath::RimWellPath()
{
CAF_PDM_InitObject( "WellPath", ":/Well.png", "", "" );
RICF_InitFieldNoDefault( &m_name, "WellPathName", "Name", "", "", "" );
RICF_InitFieldNoDefault( &m_name, "Name", "Name", "", "", "" );
m_name.xmlCapability()->registerKeywordAlias( "WellPathName" );
m_name.uiCapability()->setUiReadOnly( true );
m_name.uiCapability()->setUiHidden( true );
m_name.xmlCapability()->disableIO();