#7605 Export Sector : Add support for export of ACTNUM

This commit is contained in:
Magne Sjaastad 2021-04-23 08:25:51 +02:00
parent fed4e40c26
commit 7d006674ba
5 changed files with 14 additions and 8 deletions

View File

@ -52,6 +52,7 @@ void AppEnum<RicfExportVisibleCells::ExportKeyword>::setUp()
{
addItem( RicfExportVisibleCells::ExportKeyword::FLUXNUM, "FLUXNUM", "FLUXNUM" );
addItem( RicfExportVisibleCells::ExportKeyword::MULTNUM, "MULTNUM", "MULTNUM" );
addItem( RicfExportVisibleCells::ExportKeyword::ACTNUM, "ACTNUM", "ACTNUM" );
setDefault( RicfExportVisibleCells::ExportKeyword::FLUXNUM );
}
@ -141,6 +142,8 @@ void RicfExportVisibleCells::buildExportSettings( const QString&
exportSettings->exportKeyword = RicSaveEclipseInputVisibleCellsUi::FLUXNUM;
else if ( m_exportKeyword == ExportKeyword::MULTNUM )
exportSettings->exportKeyword = RicSaveEclipseInputVisibleCellsUi::MULTNUM;
else if ( m_exportKeyword == ExportKeyword::ACTNUM )
exportSettings->exportKeyword = RicSaveEclipseInputVisibleCellsUi::ACTNUM;
exportSettings->visibleActiveCellsValue = m_visibleActiveCellsValue;
exportSettings->hiddenActiveCellsValue = m_hiddenActiveCellsValue;

View File

@ -39,7 +39,8 @@ class RicfExportVisibleCells : public RicfCommandObject
enum class ExportKeyword
{
FLUXNUM,
MULTNUM
MULTNUM,
ACTNUM
};
public:

View File

@ -56,7 +56,7 @@ void RicSaveEclipseInputVisibleCellsFeature::openDialogAndExecuteCommand( RimEcl
RicSaveEclipseInputVisibleCellsUi exportSettings;
caf::PdmUiPropertyViewDialog propertyDialog( Riu3DMainWindowTools::mainWindowWidget(),
&exportSettings,
"Export FLUXNUM/MULTNUM",
"Export FLUXNUM/MULTNUM/ACTNUM",
"" );
RicExportFeatureImpl::configureForExport( propertyDialog.dialogButtonBox() );
@ -130,7 +130,7 @@ void RicSaveEclipseInputVisibleCellsFeature::onActionTriggered( bool isChecked )
//--------------------------------------------------------------------------------------------------
void RicSaveEclipseInputVisibleCellsFeature::setupActionLook( QAction* actionToSetup )
{
actionToSetup->setText( "Export Visible Cells as FLUXNUM/MULTNUM" );
actionToSetup->setText( "Export Visible Cells as FLUXNUM/MULTNUM/ACTNUM" );
}
//--------------------------------------------------------------------------------------------------
@ -176,7 +176,7 @@ void RicSaveEclipseInputActiveVisibleCellsFeature::onActionTriggered( bool isChe
//--------------------------------------------------------------------------------------------------
void RicSaveEclipseInputActiveVisibleCellsFeature::setupActionLook( QAction* actionToSetup )
{
actionToSetup->setText( "Export Visible Cells as FLUXNUM/MULTNUM" );
actionToSetup->setText( "Export Visible Cells as FLUXNUM/MULTNUM/ACTNUM" );
}
//--------------------------------------------------------------------------------------------------

View File

@ -32,6 +32,7 @@ void RicSaveEclipseInputVisibleCellsUi::ExportKeywordEnum::setUp()
{
addItem( RicSaveEclipseInputVisibleCellsUi::FLUXNUM, "FLUXNUM", "FLUXNUM" );
addItem( RicSaveEclipseInputVisibleCellsUi::MULTNUM, "MULTNUM", "MULTNUM" );
addItem( RicSaveEclipseInputVisibleCellsUi::ACTNUM, "ACTNUM", "ACTNUM" );
setDefault( RicSaveEclipseInputVisibleCellsUi::FLUXNUM );
}
} // namespace caf
@ -41,10 +42,10 @@ CAF_PDM_SOURCE_INIT( RicSaveEclipseInputVisibleCellsUi, "RicSaveEclipseInputVisi
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RicSaveEclipseInputVisibleCellsUi::RicSaveEclipseInputVisibleCellsUi( void )
RicSaveEclipseInputVisibleCellsUi::RicSaveEclipseInputVisibleCellsUi()
: exportFilenameManuallyChanged( false )
{
CAF_PDM_InitObject( "Export Visible Cells FLUXNUM/MULTNUM", "", "", "" );
CAF_PDM_InitObject( "Export Visible Cells FLUXNUM/MULTNUM/ACTNUM", "", "", "" );
CAF_PDM_InitField( &exportFilename, "ExportFilename", QString(), "Export Filename", "", "", "" );
exportFilename.uiCapability()->setUiEditorTypeName( caf::PdmUiFilePathEditor::uiEditorTypeName() );

View File

@ -35,12 +35,13 @@ public:
{
FLUXNUM,
MULTNUM,
ACTNUM,
};
typedef caf::AppEnum<ExportKeyword> ExportKeywordEnum;
using ExportKeywordEnum = caf::AppEnum<ExportKeyword>;
public:
RicSaveEclipseInputVisibleCellsUi( void );
RicSaveEclipseInputVisibleCellsUi();
~RicSaveEclipseInputVisibleCellsUi() override;
caf::PdmField<QString> exportFilename;