mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
* General PdmObjectMethods for scripting.
This commit is contained in:
@@ -22,6 +22,8 @@
|
||||
#include "RiaApplication.h"
|
||||
#include "RimWellLogFile.h"
|
||||
|
||||
#include "cafPdmFieldIOScriptability.h"
|
||||
|
||||
#include <QDir>
|
||||
#include <QFileInfo>
|
||||
#include <QStringList>
|
||||
@@ -44,11 +46,11 @@ CAF_PDM_SOURCE_INIT( RicfImportWellLogFiles, "importWellLogFiles" );
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RicfImportWellLogFiles::RicfImportWellLogFiles()
|
||||
{
|
||||
RICF_InitFieldNoDefault( &m_wellLogFileFolder, "wellLogFolder", "", "", "", "" );
|
||||
RICF_InitFieldNoDefault( &m_wellLogFilePaths, "wellLogFiles", "", "", "", "" );
|
||||
CAF_PDM_InitScriptableFieldWithIONoDefault( &m_wellLogFileFolder, "wellLogFolder", "", "", "", "" );
|
||||
CAF_PDM_InitScriptableFieldWithIONoDefault( &m_wellLogFilePaths, "wellLogFiles", "", "", "", "" );
|
||||
}
|
||||
|
||||
RicfCommandResponse RicfImportWellLogFiles::execute()
|
||||
caf::PdmScriptResponse RicfImportWellLogFiles::execute()
|
||||
{
|
||||
QStringList errorMessages, warningMessages;
|
||||
QStringList wellLogFilePaths;
|
||||
@@ -94,7 +96,7 @@ RicfCommandResponse RicfImportWellLogFiles::execute()
|
||||
}
|
||||
}
|
||||
|
||||
RicfCommandResponse response;
|
||||
caf::PdmScriptResponse response;
|
||||
|
||||
if ( !wellLogFilePaths.empty() )
|
||||
{
|
||||
@@ -117,12 +119,12 @@ RicfCommandResponse RicfImportWellLogFiles::execute()
|
||||
|
||||
for ( QString warningMessage : warningMessages )
|
||||
{
|
||||
response.updateStatus( RicfCommandResponse::COMMAND_WARNING, warningMessage );
|
||||
response.updateStatus( caf::PdmScriptResponse::COMMAND_WARNING, warningMessage );
|
||||
}
|
||||
|
||||
for ( QString errorMessage : errorMessages )
|
||||
{
|
||||
response.updateStatus( RicfCommandResponse::COMMAND_ERROR, errorMessage );
|
||||
response.updateStatus( caf::PdmScriptResponse::COMMAND_ERROR, errorMessage );
|
||||
}
|
||||
|
||||
return response;
|
||||
|
||||
Reference in New Issue
Block a user