2019-10-22 03:36:23 -05:00
|
|
|
#include "RicExportContourMapToTextUi.h"
|
2019-10-15 08:42:43 -05:00
|
|
|
|
|
|
|
#include "cafPdmUiFilePathEditor.h"
|
|
|
|
|
2019-10-22 03:36:23 -05:00
|
|
|
CAF_PDM_SOURCE_INIT( RicExportContourMapToTextUi, "RicExportContourMapToTextUi" );
|
2019-10-15 08:42:43 -05:00
|
|
|
|
2019-10-22 14:43:09 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-10-22 03:36:23 -05:00
|
|
|
RicExportContourMapToTextUi::RicExportContourMapToTextUi()
|
2019-10-15 08:42:43 -05:00
|
|
|
{
|
2021-11-14 07:15:12 -06:00
|
|
|
CAF_PDM_InitObject( "Export Contour Map to Text" );
|
2019-10-15 08:42:43 -05:00
|
|
|
|
2021-11-14 07:15:12 -06:00
|
|
|
CAF_PDM_InitField( &m_exportFileName, "ExportFileName", QString(), "Export File Name" );
|
2019-10-15 08:42:43 -05:00
|
|
|
m_exportFileName.uiCapability()->setUiEditorTypeName( caf::PdmUiFilePathEditor::uiEditorTypeName() );
|
|
|
|
|
2021-11-14 07:15:12 -06:00
|
|
|
CAF_PDM_InitField( &m_exportLocalCoordinates, "ExportLocalCoordinates", false, "Export Local Coordinates" );
|
|
|
|
CAF_PDM_InitField( &m_undefinedValueLabel, "UndefinedValueLabel", QString( "NaN" ), "Undefined Value Label" );
|
|
|
|
CAF_PDM_InitField( &m_excludeUndefinedValues, "ExcludeUndefinedValues", false, "Exclude Undefined Values" );
|
2019-10-15 08:42:43 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-10-22 03:36:23 -05:00
|
|
|
QString RicExportContourMapToTextUi::exportFileName() const
|
2019-10-15 08:42:43 -05:00
|
|
|
{
|
|
|
|
return m_exportFileName;
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-10-22 03:36:23 -05:00
|
|
|
void RicExportContourMapToTextUi::setExportFileName( const QString& exportFileName )
|
2019-10-15 08:42:43 -05:00
|
|
|
{
|
|
|
|
m_exportFileName = exportFileName;
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-10-22 03:36:23 -05:00
|
|
|
bool RicExportContourMapToTextUi::exportLocalCoordinates() const
|
2019-10-15 08:42:43 -05:00
|
|
|
{
|
|
|
|
return m_exportLocalCoordinates;
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-10-22 03:36:23 -05:00
|
|
|
QString RicExportContourMapToTextUi::undefinedValueLabel() const
|
2019-10-15 08:42:43 -05:00
|
|
|
{
|
|
|
|
return m_undefinedValueLabel;
|
|
|
|
}
|
|
|
|
|
2019-10-21 14:25:04 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-10-22 03:36:23 -05:00
|
|
|
bool RicExportContourMapToTextUi::excludeUndefinedValues() const
|
2019-10-21 14:25:04 -05:00
|
|
|
{
|
|
|
|
return m_excludeUndefinedValues;
|
|
|
|
}
|
|
|
|
|
2019-10-15 08:42:43 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-10-22 03:36:23 -05:00
|
|
|
void RicExportContourMapToTextUi::defineEditorAttribute( const caf::PdmFieldHandle* field,
|
|
|
|
QString uiConfigName,
|
|
|
|
caf::PdmUiEditorAttribute* attribute )
|
2019-10-15 08:42:43 -05:00
|
|
|
{
|
|
|
|
if ( field == &m_exportFileName )
|
|
|
|
{
|
|
|
|
caf::PdmUiFilePathEditorAttribute* myAttr = dynamic_cast<caf::PdmUiFilePathEditorAttribute*>( attribute );
|
|
|
|
if ( myAttr )
|
|
|
|
{
|
|
|
|
myAttr->m_selectSaveFileName = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|