mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-11 07:56:08 -06:00
#8031 Ensemble import dialog: rename to 'Group by ensemble'
This commit is contained in:
parent
17f44b0f25
commit
e11c564802
@ -55,11 +55,11 @@ bool RicImportEnsembleFractureStatisticsFeature::isCommandEnabled()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicImportEnsembleFractureStatisticsFeature::onActionTriggered( bool isChecked )
|
||||
{
|
||||
RiaGuiApplication* app = RiaGuiApplication::instance();
|
||||
QString pathCacheName = "INPUT_FILES";
|
||||
auto [fileNames, groupByIteration] = runRecursiveFileSearchDialog( "Import StimPlan Fractures", pathCacheName );
|
||||
RiaGuiApplication* app = RiaGuiApplication::instance();
|
||||
QString pathCacheName = "INPUT_FILES";
|
||||
auto [fileNames, groupByEnsemble] = runRecursiveFileSearchDialog( "Import StimPlan Fractures", pathCacheName );
|
||||
|
||||
if ( groupByIteration )
|
||||
if ( groupByEnsemble )
|
||||
{
|
||||
std::vector<QStringList> groupedByEnsemble = RiaEnsembleNameTools::groupFilesByEnsemble( fileNames );
|
||||
for ( const QStringList& groupedFileNames : groupedByEnsemble )
|
||||
@ -148,5 +148,5 @@ std::pair<QStringList, bool>
|
||||
// Remember the path to next time
|
||||
app->setLastUsedDialogDirectory( pathCacheName, QFileInfo( result.rootDir ).absoluteFilePath() );
|
||||
|
||||
return std::make_pair( result.files, result.groupByIteration );
|
||||
return std::make_pair( result.files, result.groupByEnsemble );
|
||||
}
|
||||
|
@ -72,13 +72,13 @@ bool RicImportEnsembleFeature::isCommandEnabled()
|
||||
void RicImportEnsembleFeature::onActionTriggered( bool isChecked )
|
||||
{
|
||||
QString pathCacheName = "ENSEMBLE_FILES";
|
||||
auto [fileNames, groupByIteration] =
|
||||
auto [fileNames, groupByEnsemble] =
|
||||
RicImportSummaryCasesFeature::runRecursiveSummaryCaseFileSearchDialogWithGrouping( "Import Ensemble",
|
||||
pathCacheName );
|
||||
|
||||
if ( fileNames.isEmpty() ) return;
|
||||
|
||||
if ( groupByIteration )
|
||||
if ( groupByEnsemble )
|
||||
{
|
||||
std::vector<QStringList> groupedByEnsemble = RiaEnsembleNameTools::groupFilesByEnsemble( fileNames );
|
||||
for ( const QStringList& groupedFileNames : groupedByEnsemble )
|
||||
|
@ -62,11 +62,11 @@ bool RicImportEnsembleSurfaceFeature::isCommandEnabled()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicImportEnsembleSurfaceFeature::onActionTriggered( bool isChecked )
|
||||
{
|
||||
RiaApplication* app = RiaApplication::instance();
|
||||
QString pathCacheName = "ENSEMBLE_SURFACE_FILES";
|
||||
auto [fileNames, groupByIteration] = runRecursiveFileSearchDialog( "Import Ensemble Surface", pathCacheName );
|
||||
RiaApplication* app = RiaApplication::instance();
|
||||
QString pathCacheName = "ENSEMBLE_SURFACE_FILES";
|
||||
auto [fileNames, groupByEnsemble] = runRecursiveFileSearchDialog( "Import Ensemble Surface", pathCacheName );
|
||||
|
||||
if ( groupByIteration )
|
||||
if ( groupByEnsemble )
|
||||
importEnsembleSurfaceFromFiles( fileNames );
|
||||
else
|
||||
importSingleEnsembleSurfaceFromFiles( fileNames );
|
||||
@ -209,5 +209,5 @@ std::pair<QStringList, bool> RicImportEnsembleSurfaceFeature::runRecursiveFileSe
|
||||
// Remember the path to next time
|
||||
app->setLastUsedDialogDirectory( pathCacheName, QFileInfo( result.rootDir ).absoluteFilePath() );
|
||||
|
||||
return std::pair( result.files, result.groupByIteration );
|
||||
return std::pair( result.files, result.groupByEnsemble );
|
||||
}
|
||||
|
@ -58,12 +58,12 @@ bool RicImportEnsembleWellLogsFeature::isCommandEnabled()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicImportEnsembleWellLogsFeature::onActionTriggered( bool isChecked )
|
||||
{
|
||||
RiaApplication* app = RiaApplication::instance();
|
||||
QString pathCacheName = "ENSEMBLE_WELL_LOGS_FILES";
|
||||
auto [fileNames, groupByIteration] = runRecursiveFileSearchDialog( "Import Ensemble Well Logs", pathCacheName );
|
||||
RiaApplication* app = RiaApplication::instance();
|
||||
QString pathCacheName = "ENSEMBLE_WELL_LOGS_FILES";
|
||||
auto [fileNames, groupByEnsemble] = runRecursiveFileSearchDialog( "Import Ensemble Well Logs", pathCacheName );
|
||||
if ( fileNames.isEmpty() ) return;
|
||||
|
||||
if ( groupByIteration )
|
||||
if ( groupByEnsemble )
|
||||
createEnsembleWellLogsFromFiles( fileNames );
|
||||
else
|
||||
createSingleEnsembleWellLogsFromFiles( fileNames );
|
||||
@ -157,5 +157,5 @@ std::pair<QStringList, bool> RicImportEnsembleWellLogsFeature::runRecursiveFileS
|
||||
// Remember the path to next time
|
||||
app->setLastUsedDialogDirectory( pathCacheName, QFileInfo( result.rootDir ).absoluteFilePath() );
|
||||
|
||||
return std::make_pair( result.files, result.groupByIteration );
|
||||
return std::make_pair( result.files, result.groupByEnsemble );
|
||||
}
|
||||
|
@ -275,7 +275,7 @@ std::pair<QStringList, bool>
|
||||
// Remember the path to next time
|
||||
app->setLastUsedDialogDirectory( pathCacheName, QFileInfo( result.rootDir ).absoluteFilePath() );
|
||||
|
||||
return std::make_pair( result.files, result.groupByIteration );
|
||||
return std::make_pair( result.files, result.groupByEnsemble );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -134,7 +134,7 @@ RicRecursiveFileSearchDialogResult RicRecursiveFileSearchDialog::runRecursiveSea
|
||||
dialog.rootDirWithEndSeparator(),
|
||||
dialog.pathFilterWithoutStartSeparator(),
|
||||
dialog.fileNameFilter(),
|
||||
dialog.groupByIteration() );
|
||||
dialog.groupByEnsemble() );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -149,8 +149,8 @@ RicRecursiveFileSearchDialog::RicRecursiveFileSearchDialog( QWidget* parent )
|
||||
m_useRealizationStarCheckBox = new QCheckBox( "Use 'realization-*' in filter" );
|
||||
connect( m_useRealizationStarCheckBox, SIGNAL( clicked() ), this, SLOT( slotUseRealizationStarClicked() ) );
|
||||
|
||||
m_groupByIterationCheckBox = new QCheckBox( "Group by iteration" );
|
||||
m_groupByIterationCheckBox->setChecked( true );
|
||||
m_groupByEnsembleCheckBox = new QCheckBox( "Group by ensemble" );
|
||||
m_groupByEnsembleCheckBox->setChecked( true );
|
||||
|
||||
m_pathFilterLabel = new QLabel();
|
||||
m_pathFilterField = new QComboBox();
|
||||
@ -230,7 +230,7 @@ RicRecursiveFileSearchDialog::RicRecursiveFileSearchDialog( QWidget* parent )
|
||||
inputGridLayout->addWidget( m_fileFilterLabel, 1, 0 );
|
||||
inputGridLayout->addWidget( m_fileFilterField, 1, 1, 1, 2 );
|
||||
inputGridLayout->addWidget( m_useRealizationStarCheckBox, 2, 1 );
|
||||
inputGridLayout->addWidget( m_groupByIterationCheckBox, 3, 1 );
|
||||
inputGridLayout->addWidget( m_groupByEnsembleCheckBox, 3, 1 );
|
||||
inputGridLayout->addWidget( m_effectiveFilterLabel, 4, 0 );
|
||||
inputGridLayout->addWidget( m_effectiveFilterContentLabel, 4, 1 );
|
||||
inputGridLayout->addWidget( m_findOrCancelButton, 4, 2, 1, 2 );
|
||||
@ -375,13 +375,13 @@ void RicRecursiveFileSearchDialog::updateFileListWidget()
|
||||
{
|
||||
m_fileListWidget->clear();
|
||||
|
||||
if ( m_groupByIterationCheckBox->isChecked() )
|
||||
if ( m_groupByEnsembleCheckBox->isChecked() )
|
||||
{
|
||||
std::vector<QStringList> groupedByEnsemble = RiaEnsembleNameTools::groupFilesByEnsemble( m_foundFiles );
|
||||
for ( const QStringList& groupedFileNames : groupedByEnsemble )
|
||||
{
|
||||
QString iterationName = RiaEnsembleNameTools::findSuitableEnsembleName( groupedFileNames );
|
||||
QListWidgetItem* item = new QListWidgetItem( QDir::toNativeSeparators( iterationName ), m_fileListWidget );
|
||||
QString ensembleName = RiaEnsembleNameTools::findSuitableEnsembleName( groupedFileNames );
|
||||
QListWidgetItem* item = new QListWidgetItem( QDir::toNativeSeparators( ensembleName ), m_fileListWidget );
|
||||
addToFileListWidget( groupedFileNames );
|
||||
}
|
||||
}
|
||||
@ -885,9 +885,9 @@ void RicRecursiveFileSearchDialog::slotUseRealizationStarClicked()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicRecursiveFileSearchDialog::groupByIteration() const
|
||||
bool RicRecursiveFileSearchDialog::groupByEnsemble() const
|
||||
{
|
||||
return m_groupByIterationCheckBox->isChecked();
|
||||
return m_groupByEnsembleCheckBox->isChecked();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -70,7 +70,7 @@ private:
|
||||
|
||||
QStringList fileExtensions() const;
|
||||
QString extensionFromFileNameFilter() const;
|
||||
bool groupByIteration() const;
|
||||
bool groupByEnsemble() const;
|
||||
|
||||
void setOkButtonEnabled( bool enabled );
|
||||
void warningIfInvalidCharacters();
|
||||
@ -114,7 +114,7 @@ private:
|
||||
QComboBox* m_pathFilterField;
|
||||
QPushButton* m_browseButton;
|
||||
QCheckBox* m_useRealizationStarCheckBox;
|
||||
QCheckBox* m_groupByIterationCheckBox;
|
||||
QCheckBox* m_groupByEnsembleCheckBox;
|
||||
|
||||
QLabel* m_fileFilterLabel;
|
||||
QComboBox* m_fileFilterField;
|
||||
@ -151,13 +151,13 @@ public:
|
||||
const QString& rootDir,
|
||||
const QString& pathFilter,
|
||||
const QString& fileNameFilter,
|
||||
bool groupByIteration )
|
||||
bool groupByEnsemble )
|
||||
: ok( ok )
|
||||
, files( files )
|
||||
, rootDir( rootDir )
|
||||
, pathFilter( pathFilter )
|
||||
, fileNameFilter( fileNameFilter )
|
||||
, groupByIteration( groupByIteration )
|
||||
, groupByEnsemble( groupByEnsemble )
|
||||
{
|
||||
}
|
||||
|
||||
@ -166,5 +166,5 @@ public:
|
||||
QString rootDir;
|
||||
QString pathFilter;
|
||||
QString fileNameFilter;
|
||||
bool groupByIteration;
|
||||
bool groupByEnsemble;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user