mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-16 10:22:15 -05:00
#10663 WBS Plot: Import well log from CSV file.
Also compute SH_MK_MIN/EXP/MAX and FG_MK_MIN/EXP results.
This commit is contained in:
1 parent
e83b2e92f3
commit
a8c719b289
45 files changed
+1361
-259
No files matched your search
@@ -23,11 +23,19 @@
|
||||
#include "RimWellLogFileChannel.h"
|
||||
|
||||
#include "RiaFieldHandleTools.h"
|
||||
#include "RiaQDateTimeTools.h"
|
||||
|
||||
#include "cafPdmUiDateEditor.h"
|
||||
|
||||
#include <QString>
|
||||
|
||||
CAF_PDM_ABSTRACT_SOURCE_INIT( RimWellLogFile, "WellLogFileInterface" );
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const QDateTime RimWellLogFile::DEFAULT_DATE_TIME = RiaQDateTimeTools::createUtcDateTime( QDate( 1900, 1, 1 ) );
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -38,6 +46,8 @@ RimWellLogFile::RimWellLogFile()
|
||||
CAF_PDM_InitFieldNoDefault( &m_fileName, "FileName", "Filename" );
|
||||
m_fileName.uiCapability()->setUiReadOnly( true );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_date, "Date", "Date" );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_wellLogChannelNames, "WellLogFileChannels", "" );
|
||||
RiaFieldHandleTools::disableWriteAndSetFieldHidden( &m_wellLogChannelNames );
|
||||
}
|
||||
@@ -78,3 +88,33 @@ std::vector<RimWellLogFileChannel*> RimWellLogFile::wellLogChannels() const
|
||||
}
|
||||
return channels;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QDateTime RimWellLogFile::date() const
|
||||
{
|
||||
return m_date;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellLogFile::fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue )
|
||||
{
|
||||
if ( changedField == &m_date )
|
||||
{
|
||||
// Due to a possible bug in QDateEdit/PdmUiDateEditor, convert m_date to a QDateTime having UTC timespec
|
||||
m_date = RiaQDateTimeTools::createUtcDateTime( m_date().date(), m_date().time() );
|
||||
}
|
||||
}
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellLogFile::defineEditorAttribute( const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute )
|
||||
{
|
||||
if ( caf::PdmUiDateEditorAttribute* attrib = dynamic_cast<caf::PdmUiDateEditorAttribute*>( attribute ) )
|
||||
{
|
||||
attrib->dateFormat = RiaQDateTimeTools::dateFormatString();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user