mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Python: add type hinting to python code.
Types are checked using mypy. Fixes #10394.
This commit is contained in:
@@ -29,6 +29,7 @@
|
||||
#include "RicVec3dPickEventHandler.h"
|
||||
|
||||
#include "cafCmdFeatureManager.h"
|
||||
#include "cafPdmObjectScriptingCapability.h"
|
||||
#include "cafPdmUiPickableLineEditor.h"
|
||||
#include "cafPdmUiPushButtonEditor.h"
|
||||
#include "cafPdmUiTextEditor.h"
|
||||
@@ -44,7 +45,7 @@ CAF_PDM_SOURCE_INIT( RimTextAnnotation, "RimTextAnnotation" );
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimTextAnnotation::RimTextAnnotation()
|
||||
{
|
||||
CAF_PDM_InitObject( "TextAnnotation", ":/TextAnnotation16x16.png" );
|
||||
CAF_PDM_InitScriptableObject( "TextAnnotation", ":/TextAnnotation16x16.png" );
|
||||
setUi3dEditorTypeName( RicTextAnnotation3dEditor::uiEditorTypeName() );
|
||||
|
||||
CAF_PDM_InitField( &m_anchorPointXyd, "AnchorPointXyd", Vec3d::ZERO, "Anchor Point" );
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
#include "RimWellPath.h"
|
||||
#include "RimWellPathValve.h"
|
||||
|
||||
#include "cafPdmObjectScriptingCapability.h"
|
||||
#include "cafPdmUiDateEditor.h"
|
||||
#include "cafPdmUiDoubleSliderEditor.h"
|
||||
|
||||
@@ -42,7 +43,7 @@ CAF_PDM_SOURCE_INIT( RimPerforationInterval, "Perforation" );
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimPerforationInterval::RimPerforationInterval()
|
||||
{
|
||||
CAF_PDM_InitObject( "Perforation", ":/PerforationInterval16x16.png" );
|
||||
CAF_PDM_InitScriptableObject( "Perforation", ":/PerforationInterval16x16.png" );
|
||||
|
||||
CAF_PDM_InitField( &m_startMD, "StartMeasuredDepth", 0.0, "Start MD" );
|
||||
CAF_PDM_InitField( &m_endMD, "EndMeasuredDepth", 0.0, "End MD" );
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include "RimWellPath.h"
|
||||
#include "RimWellPathFractureCollection.h"
|
||||
|
||||
#include "cafPdmObjectScriptingCapability.h"
|
||||
#include "cafPdmUiDoubleSliderEditor.h"
|
||||
|
||||
CAF_PDM_SOURCE_INIT( RimWellPathFracture, "WellPathFracture" );
|
||||
@@ -35,7 +36,7 @@ CAF_PDM_SOURCE_INIT( RimWellPathFracture, "WellPathFracture" );
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimWellPathFracture::RimWellPathFracture()
|
||||
{
|
||||
CAF_PDM_InitObject( "Fracture", ":/FractureSymbol16x16.png" );
|
||||
CAF_PDM_InitScriptableObject( "Fracture", ":/FractureSymbol16x16.png" );
|
||||
|
||||
CAF_PDM_InitField( &m_measuredDepth, "MeasuredDepth", 0.0f, "Measured Depth Location" );
|
||||
m_measuredDepth.uiCapability()->setUiEditorTypeName( caf::PdmUiDoubleSliderEditor::uiEditorTypeName() );
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
#include "RimColorLegendItem.h"
|
||||
|
||||
#include "cafPdmFieldReorderCapability.h"
|
||||
#include "cafPdmObjectScriptingCapability.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
@@ -34,7 +35,7 @@ CAF_PDM_SOURCE_INIT( RimColorLegend, "ColorLegend" );
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimColorLegend::RimColorLegend()
|
||||
{
|
||||
CAF_PDM_InitObject( "ColorLegend", ":/Legend.png" );
|
||||
CAF_PDM_InitScriptableObject( "ColorLegend", ":/Legend.png" );
|
||||
|
||||
CAF_PDM_InitField( &m_colorLegendName, "ColorLegendName", QString( "" ), "Color Legend Name" );
|
||||
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
#include "RimEclipseInputPropertyCollection.h"
|
||||
#include "RimReservoirCellResultsStorage.h"
|
||||
|
||||
#include "cafPdmObjectScriptingCapability.h"
|
||||
#include "cafProgressInfo.h"
|
||||
|
||||
#include <QDir>
|
||||
@@ -46,7 +47,7 @@ CAF_PDM_SOURCE_INIT( RimRoffCase, "RimRoffCase" );
|
||||
RimRoffCase::RimRoffCase()
|
||||
: RimEclipseCase()
|
||||
{
|
||||
CAF_PDM_InitObject( "RimRoffCase", ":/EclipseInput48x48.png" );
|
||||
CAF_PDM_InitScriptableObject( "RimRoffCase", ":/EclipseInput48x48.png" );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user