mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Make scriptability a CAF-feature
This commit is contained in:
@@ -43,7 +43,7 @@ CAF_PDM_XML_ABSTRACT_SOURCE_INIT( RimCase, "Case", "RimCase" );
|
||||
RimCase::RimCase()
|
||||
: m_isInActiveDestruction( false )
|
||||
{
|
||||
RICF_InitObjectWithScriptNameAndComment( "Case", ":/Case48x48.png", "", "", "Case", "The ResInsight base class for Cases" );
|
||||
CAF_PDM_InitScriptableObjectWithNameAndComment( "Case", ":/Case48x48.png", "", "", "Case", "The ResInsight base class for Cases" );
|
||||
|
||||
RICF_InitField( &caseUserDescription, "Name", QString(), "Case Name", "", "", "" );
|
||||
caseUserDescription.registerKeywordAlias( "CaseUserDescription" );
|
||||
|
||||
@@ -78,12 +78,12 @@ CAF_PDM_XML_ABSTRACT_SOURCE_INIT( RimEclipseCase, "RimReservoir" );
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimEclipseCase::RimEclipseCase()
|
||||
{
|
||||
RICF_InitObjectWithScriptNameAndComment( "EclipseCase",
|
||||
":/Case48x48.png",
|
||||
"",
|
||||
"",
|
||||
"Reservoir",
|
||||
"Abtract base class for Eclipse Cases" );
|
||||
CAF_PDM_InitScriptableObjectWithNameAndComment( "EclipseCase",
|
||||
":/Case48x48.png",
|
||||
"",
|
||||
"",
|
||||
"Reservoir",
|
||||
"Abtract base class for Eclipse Cases" );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &reservoirViews, "ReservoirViews", "", "", "", "" );
|
||||
reservoirViews.uiCapability()->setUiHidden( true );
|
||||
|
||||
@@ -51,7 +51,12 @@ CAF_PDM_SOURCE_INIT( RimEclipseCellColors, "ResultSlot" );
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimEclipseCellColors::RimEclipseCellColors()
|
||||
{
|
||||
RICF_InitObjectWithScriptNameAndComment( "Cell Result", ":/CellResult.png", "", "", "CellColors", "Eclipse Cell Colors class" );
|
||||
CAF_PDM_InitScriptableObjectWithNameAndComment( "Cell Result",
|
||||
":/CellResult.png",
|
||||
"",
|
||||
"",
|
||||
"CellColors",
|
||||
"Eclipse Cell Colors class" );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &obsoleteField_legendConfig, "LegendDefinition", "Color Legend", "", "", "" );
|
||||
this->obsoleteField_legendConfig.xmlCapability()->setIOWritable( false );
|
||||
|
||||
@@ -53,12 +53,12 @@ const cvf::Mat4d RimEclipseContourMapView::sm_defaultViewMatrix =
|
||||
RimEclipseContourMapView::RimEclipseContourMapView()
|
||||
: m_cameraPositionLastUpdate( cvf::Vec3d::UNDEFINED )
|
||||
{
|
||||
RICF_InitObjectWithScriptNameAndComment( "Contour Map View",
|
||||
":/2DMap16x16.png",
|
||||
"",
|
||||
"",
|
||||
"EclipseContourMap",
|
||||
"A contour map for Eclipse cases" );
|
||||
CAF_PDM_InitScriptableObjectWithNameAndComment( "Contour Map View",
|
||||
":/2DMap16x16.png",
|
||||
"",
|
||||
"",
|
||||
"EclipseContourMap",
|
||||
"A contour map for Eclipse cases" );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_contourMapProjection, "ContourMapProjection", "Contour Map Projection", "", "", "" );
|
||||
m_contourMapProjection = new RimEclipseContourMapProjection();
|
||||
|
||||
@@ -70,7 +70,7 @@ CAF_PDM_SOURCE_INIT( RimEclipseResultCase, "EclipseCase" );
|
||||
RimEclipseResultCase::RimEclipseResultCase()
|
||||
: RimEclipseCase()
|
||||
{
|
||||
RICF_InitObject( "Eclipse Case", ":/Case48x48.png", "", "The Regular Eclipse Results Case" );
|
||||
CAF_PDM_InitScriptableObject( "Eclipse Case", ":/Case48x48.png", "", "The Regular Eclipse Results Case" );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_unitSystem, "UnitSystem", "Unit System", "", "", "" );
|
||||
m_unitSystem.registerGetMethod( RiaApplication::instance()->project(), &RimProject::commonUnitSystemForAllCases );
|
||||
|
||||
@@ -95,7 +95,7 @@ RimEclipseResultDefinition::RimEclipseResultDefinition( caf::PdmUiItemInfo::Labe
|
||||
, m_labelPosition( labelPosition )
|
||||
, m_ternaryEnabled( true )
|
||||
{
|
||||
RICF_InitObjectWithScriptNameAndComment( "Result Definition", "", "", "", "EclipseResult", "An eclipse result definition" );
|
||||
CAF_PDM_InitScriptableObjectWithNameAndComment( "Result Definition", "", "", "", "EclipseResult", "An eclipse result definition" );
|
||||
|
||||
RICF_InitFieldNoDefault( &m_resultType, "ResultType", "Type", "", "", "" );
|
||||
m_resultType.uiCapability()->setUiHidden( true );
|
||||
|
||||
@@ -121,12 +121,12 @@ RimEclipseView::RimEclipseView()
|
||||
RiaPreferences* preferences = app->preferences();
|
||||
CVF_ASSERT( preferences );
|
||||
|
||||
RICF_InitObjectWithScriptNameAndComment( "Reservoir View",
|
||||
":/3DView16x16.png",
|
||||
"",
|
||||
"The Eclipse 3d Reservoir View",
|
||||
"EclipseView",
|
||||
"The Eclipse 3d Reservoir View" );
|
||||
CAF_PDM_InitScriptableObjectWithNameAndComment( "Reservoir View",
|
||||
":/3DView16x16.png",
|
||||
"",
|
||||
"The Eclipse 3d Reservoir View",
|
||||
"EclipseView",
|
||||
"The Eclipse 3d Reservoir View" );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_cellResult, "GridCellResult", "Cell Result", ":/CellResult.png", "", "" );
|
||||
m_cellResult = new RimEclipseCellColors();
|
||||
|
||||
@@ -15,7 +15,12 @@ CAF_PDM_SOURCE_INIT( RimFileWellPath, "WellPath" );
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimFileWellPath::RimFileWellPath()
|
||||
{
|
||||
RICF_InitObjectWithScriptNameAndComment( "File Well Path", ":/Well.png", "", "", "FileWellPath", "Well Paths Loaded From File" );
|
||||
CAF_PDM_InitScriptableObjectWithNameAndComment( "File Well Path",
|
||||
":/Well.png",
|
||||
"",
|
||||
"",
|
||||
"FileWellPath",
|
||||
"Well Paths Loaded From File" );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &id, "WellPathId", "Id", "", "", "" );
|
||||
id.uiCapability()->setUiReadOnly( true );
|
||||
|
||||
@@ -69,12 +69,12 @@ CAF_PDM_SOURCE_INIT( RimGeoMechCase, "ResInsightGeoMechCase" );
|
||||
RimGeoMechCase::RimGeoMechCase( void )
|
||||
: m_applyTimeFilter( false )
|
||||
{
|
||||
RICF_InitObjectWithScriptNameAndComment( "GeoMechanical Case",
|
||||
":/GeoMechCase48x48.png",
|
||||
"",
|
||||
"The GeoMechanical Results Case",
|
||||
"GeoMechCase",
|
||||
"The Abaqus Based GeoMech Case" );
|
||||
CAF_PDM_InitScriptableObjectWithNameAndComment( "GeoMechanical Case",
|
||||
":/GeoMechCase48x48.png",
|
||||
"",
|
||||
"The GeoMechanical Results Case",
|
||||
"GeoMechCase",
|
||||
"The Abaqus Based GeoMech Case" );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &geoMechViews, "GeoMechViews", "", "", "", "" );
|
||||
geoMechViews.uiCapability()->setUiHidden( true );
|
||||
|
||||
@@ -51,12 +51,12 @@ const cvf::Mat4d RimGeoMechContourMapView::sm_defaultViewMatrix =
|
||||
RimGeoMechContourMapView::RimGeoMechContourMapView()
|
||||
: m_cameraPositionLastUpdate( cvf::Vec3d::UNDEFINED )
|
||||
{
|
||||
RICF_InitObjectWithScriptNameAndComment( "GeoMech Contour Map View",
|
||||
":/2DMap16x16.png",
|
||||
"",
|
||||
"",
|
||||
"GeoMechContourMap",
|
||||
"A contour map for GeoMech cases" );
|
||||
CAF_PDM_InitScriptableObjectWithNameAndComment( "GeoMech Contour Map View",
|
||||
":/2DMap16x16.png",
|
||||
"",
|
||||
"",
|
||||
"GeoMechContourMap",
|
||||
"A contour map for GeoMech cases" );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_contourMapProjection, "ContourMapProjection", "Contour Map Projection", "", "", "" );
|
||||
m_contourMapProjection = new RimGeoMechContourMapProjection();
|
||||
|
||||
@@ -85,7 +85,7 @@ CAF_PDM_SOURCE_INIT( RimGeoMechView, "GeoMechView" );
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimGeoMechView::RimGeoMechView( void )
|
||||
{
|
||||
RICF_InitObject( "Geomechanical View", ":/3DViewGeoMech16x16.png", "", "The Geomechanical 3d View" );
|
||||
CAF_PDM_InitScriptableObject( "Geomechanical View", ":/3DViewGeoMech16x16.png", "", "The Geomechanical 3d View" );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &cellResult, "GridCellResult", "Color Result", ":/CellResult.png", "", "" );
|
||||
cellResult = new RimGeoMechCellColors();
|
||||
|
||||
@@ -55,12 +55,12 @@ CAF_PDM_SOURCE_INIT( RimIdenticalGridCaseGroup, "RimIdenticalGridCaseGroup" );
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimIdenticalGridCaseGroup::RimIdenticalGridCaseGroup()
|
||||
{
|
||||
RICF_InitObjectWithScriptNameAndComment( "Grid Case Group",
|
||||
":/GridCaseGroup16x16.png",
|
||||
"",
|
||||
"",
|
||||
"GridCaseGroup",
|
||||
"A statistics case group" );
|
||||
CAF_PDM_InitScriptableObjectWithNameAndComment( "Grid Case Group",
|
||||
":/GridCaseGroup16x16.png",
|
||||
"",
|
||||
"",
|
||||
"GridCaseGroup",
|
||||
"A statistics case group" );
|
||||
|
||||
RICF_InitField( &name, "UserDescription", QString( "Grid Case Group" ), "Name", "", "", "" );
|
||||
|
||||
|
||||
@@ -40,7 +40,10 @@ CAF_PDM_SOURCE_INIT( RimModeledWellPath, "ModeledWellPath" );
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimModeledWellPath::RimModeledWellPath()
|
||||
{
|
||||
RICF_InitObject( "Modeled WellPath", ":/EditableWell.png", "", "A Well Path created interactively in ResInsight" );
|
||||
CAF_PDM_InitScriptableObject( "Modeled WellPath",
|
||||
":/EditableWell.png",
|
||||
"",
|
||||
"A Well Path created interactively in ResInsight" );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_geometryDefinition, "WellPathGeometryDef", "Trajectory", "", "", "" );
|
||||
m_geometryDefinition = new RimWellPathGeometryDef;
|
||||
|
||||
@@ -33,7 +33,7 @@ CAF_PDM_XML_ABSTRACT_SOURCE_INIT( RimPlot, "RimPlot" ); // Do not use. Abstract
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimPlot::RimPlot()
|
||||
{
|
||||
RICF_InitObjectWithScriptNameAndComment( "Plot", "", "", "", "Plot", "The Abstract Base Class for all Plot Objects" );
|
||||
CAF_PDM_InitScriptableObjectWithNameAndComment( "Plot", "", "", "", "Plot", "The Abstract Base Class for all Plot Objects" );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_rowSpan, "RowSpan", "Row Span", "", "", "" );
|
||||
CAF_PDM_InitFieldNoDefault( &m_colSpan, "ColSpan", "Col Span", "", "", "" );
|
||||
|
||||
@@ -37,12 +37,12 @@ CAF_PDM_XML_ABSTRACT_SOURCE_INIT( RimPlotWindow, "RimPlotWindow" ); // Do not us
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimPlotWindow::RimPlotWindow()
|
||||
{
|
||||
RICF_InitObjectWithScriptNameAndComment( "PlotWindow",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"PlotWindow",
|
||||
"The Abstract base class for all MDI Windows in the Plot Window" );
|
||||
CAF_PDM_InitScriptableObjectWithNameAndComment( "PlotWindow",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"PlotWindow",
|
||||
"The Abstract base class for all MDI Windows in the Plot Window" );
|
||||
|
||||
RICF_InitField( &m_id, "Id", -1, "View ID", "", "", "" );
|
||||
m_id.registerKeywordAlias( "ViewId" );
|
||||
|
||||
@@ -113,7 +113,7 @@ RimProject::RimProject( void )
|
||||
, m_nextValidPlotId( 1 )
|
||||
, m_nextValidCalculationId( 1 )
|
||||
{
|
||||
RICF_InitObjectWithScriptNameAndComment( "Project", "", "", "", "Project", "The ResInsight Project" );
|
||||
CAF_PDM_InitScriptableObjectWithNameAndComment( "Project", "", "", "", "Project", "The ResInsight Project" );
|
||||
|
||||
CAF_PDM_InitField( &m_projectFileVersionString, "ProjectFileVersionString", QString( STRPRODUCTVER ), "", "", "", "" );
|
||||
m_projectFileVersionString.uiCapability()->setUiHidden( true );
|
||||
|
||||
@@ -62,7 +62,12 @@ CAF_PDM_SOURCE_INIT( RimSimWellInView, "Well" );
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimSimWellInView::RimSimWellInView()
|
||||
{
|
||||
RICF_InitObjectWithScriptNameAndComment( "Simulation Well", ":/Well.png", "", "", "SimulationWell", "An Eclipse Simulation Well" );
|
||||
CAF_PDM_InitScriptableObjectWithNameAndComment( "Simulation Well",
|
||||
":/Well.png",
|
||||
"",
|
||||
"",
|
||||
"SimulationWell",
|
||||
"An Eclipse Simulation Well" );
|
||||
|
||||
RICF_InitFieldNoDefault( &name, "Name", "Name", "", "", "" );
|
||||
name.registerKeywordAlias( "WellName" );
|
||||
|
||||
@@ -43,12 +43,12 @@ CAF_PDM_XML_ABSTRACT_SOURCE_INIT( RimViewWindow, "ViewWindow" ); // Do not use.
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimViewWindow::RimViewWindow( void )
|
||||
{
|
||||
RICF_InitObjectWithScriptNameAndComment( "View window",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"ViewWindow",
|
||||
"The Base Class for all Views and Plots in ResInsight" );
|
||||
CAF_PDM_InitScriptableObjectWithNameAndComment( "View window",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"ViewWindow",
|
||||
"The Base Class for all Views and Plots in ResInsight" );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_windowController, "WindowController", "", "", "", "" );
|
||||
m_windowController.uiCapability()->setUiHidden( true );
|
||||
|
||||
@@ -33,7 +33,7 @@ CAF_PDM_SOURCE_INIT( RimWbsParameters, "WbsParameters" );
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimWbsParameters::RimWbsParameters()
|
||||
{
|
||||
RICF_InitObject( "Well Bore Stability Parameters", ":/WellLogPlot16x16.png", "", "" );
|
||||
CAF_PDM_InitScriptableObject( "Well Bore Stability Parameters", ":/WellLogPlot16x16.png", "", "" );
|
||||
|
||||
RICF_InitFieldNoDefault( &m_porePressureSource,
|
||||
"PorePressureReservoirSource",
|
||||
|
||||
@@ -42,7 +42,10 @@ CAF_PDM_SOURCE_INIT( RimWellBoreStabilityPlot, "WellBoreStabilityPlot" );
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimWellBoreStabilityPlot::RimWellBoreStabilityPlot()
|
||||
{
|
||||
RICF_InitObject( "Well Bore Stability Plot", ":/WellBoreStability16x16.png", "", "A GeoMechanical Well Bore Stabilit Plot" );
|
||||
CAF_PDM_InitScriptableObject( "Well Bore Stability Plot",
|
||||
":/WellBoreStability16x16.png",
|
||||
"",
|
||||
"A GeoMechanical Well Bore Stabilit Plot" );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_wbsParameters, "WbsParameters", "Well Bore Stability Parameters", "", "", "" );
|
||||
m_wbsParameters = new RimWbsParameters;
|
||||
|
||||
@@ -71,10 +71,10 @@ CAF_PDM_SOURCE_INIT( RimWellLogPlot, "WellLogPlot" );
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimWellLogPlot::RimWellLogPlot()
|
||||
{
|
||||
RICF_InitObject( "Well Log Plot",
|
||||
":/WellLogPlot16x16.png",
|
||||
"",
|
||||
"A Well Log Plot With a shared Depth Axis and Multiple Tracks" );
|
||||
CAF_PDM_InitScriptableObject( "Well Log Plot",
|
||||
":/WellLogPlot16x16.png",
|
||||
"",
|
||||
"A Well Log Plot With a shared Depth Axis and Multiple Tracks" );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_commonDataSource,
|
||||
"CommonDataSource",
|
||||
|
||||
@@ -73,7 +73,7 @@ const char RimWellPath::SIM_WELL_NONE_UI_TEXT[] = "None";
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimWellPath::RimWellPath()
|
||||
{
|
||||
RICF_InitObject( "WellPath", ":/Well.png", "", "The Base class for Well Paths" );
|
||||
CAF_PDM_InitScriptableObject( "WellPath", ":/Well.png", "", "The Base class for Well Paths" );
|
||||
|
||||
RICF_InitFieldNoDefault( &m_name, "Name", "Name", "", "", "" );
|
||||
m_name.registerKeywordAlias( "WellPathName" );
|
||||
|
||||
@@ -42,7 +42,7 @@ CAF_PDM_SOURCE_INIT( RimFileSummaryCase, "FileSummaryCase" );
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimFileSummaryCase::RimFileSummaryCase()
|
||||
{
|
||||
RICF_InitObject( "File Summary Case ", "", "", "A Summary Case based on SMSPEC files" );
|
||||
CAF_PDM_InitScriptableObject( "File Summary Case ", "", "", "A Summary Case based on SMSPEC files" );
|
||||
CAF_PDM_InitField( &m_includeRestartFiles, "IncludeRestartFiles", false, "Include Restart Files", "", "", "" );
|
||||
|
||||
m_includeRestartFiles.uiCapability()->setUiHidden( true );
|
||||
|
||||
@@ -40,7 +40,7 @@ CAF_PDM_SOURCE_INIT( RimGridSummaryCase, "GridSummaryCase" );
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimGridSummaryCase::RimGridSummaryCase()
|
||||
{
|
||||
RICF_InitObject( "Grid Summary Case ", "", "", "A Summary Case based on extracting grid data." );
|
||||
CAF_PDM_InitScriptableObject( "Grid Summary Case ", "", "", "A Summary Case based on extracting grid data." );
|
||||
CAF_PDM_InitFieldNoDefault( &m_eclipseCase, "Associated3DCase", "Eclipse Case", "", "", "" );
|
||||
m_eclipseCase.uiCapability()->setUiHidden( true );
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ const QString RimSummaryCase::DEFAULT_DISPLAY_NAME = "Display Name";
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimSummaryCase::RimSummaryCase()
|
||||
{
|
||||
RICF_InitObject( "Summary Case", ":/SummaryCase16x16.png", "", "The Base Class for all Summary Cases" );
|
||||
CAF_PDM_InitScriptableObject( "Summary Case", ":/SummaryCase16x16.png", "", "The Base Class for all Summary Cases" );
|
||||
|
||||
RICF_InitField( &m_shortName, "ShortName", QString( "Display Name" ), DEFAULT_DISPLAY_NAME, "", "", "" );
|
||||
RICF_InitField( &m_useAutoShortName, "AutoShortyName", false, "Use Auto Display Name", "", "", "" );
|
||||
|
||||
@@ -143,7 +143,7 @@ CurvesData concatCurvesData( const std::vector<CurvesData>& curvesData );
|
||||
RimSummaryPlot::RimSummaryPlot()
|
||||
: RimPlot()
|
||||
{
|
||||
RICF_InitObject( "Summary Plot", ":/SummaryPlotLight16x16.png", "", "A Summary Plot" );
|
||||
CAF_PDM_InitScriptableObject( "Summary Plot", ":/SummaryPlotLight16x16.png", "", "A Summary Plot" );
|
||||
|
||||
RICF_InitField( &m_showPlotTitle, "ShowPlotTitle", true, "Plot Title", "", "", "" );
|
||||
m_showPlotTitle.xmlCapability()->setIOWritable( false );
|
||||
|
||||
Reference in New Issue
Block a user