2018-01-10 06:55:48 -06:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// Copyright (C) 2016- Statoil ASA
|
2019-09-06 03:40:57 -05:00
|
|
|
//
|
2018-01-10 06:55:48 -06:00
|
|
|
// ResInsight is free software: you can redistribute it and/or modify
|
|
|
|
// it under the terms of the GNU General Public License as published by
|
|
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
|
|
// (at your option) any later version.
|
2019-09-06 03:40:57 -05:00
|
|
|
//
|
2018-01-10 06:55:48 -06:00
|
|
|
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
|
|
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
// FITNESS FOR A PARTICULAR PURPOSE.
|
2019-09-06 03:40:57 -05:00
|
|
|
//
|
|
|
|
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
2018-01-10 06:55:48 -06:00
|
|
|
// for more details.
|
|
|
|
//
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2021-09-30 02:08:09 -05:00
|
|
|
#include "RiaEnsembleNameTools.h"
|
|
|
|
|
2018-01-10 06:55:48 -06:00
|
|
|
#include "cafCmdFeature.h"
|
|
|
|
|
|
|
|
#include <QString>
|
2018-04-18 06:56:01 -05:00
|
|
|
#include <vector>
|
2018-01-10 06:55:48 -06:00
|
|
|
|
2018-03-16 03:02:28 -05:00
|
|
|
class RicSummaryCaseRestartDialogResult;
|
2018-04-18 06:56:01 -05:00
|
|
|
class RimSummaryCase;
|
2018-03-19 05:02:22 -05:00
|
|
|
|
2018-01-10 06:55:48 -06:00
|
|
|
//==================================================================================================
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2018-01-10 06:55:48 -06:00
|
|
|
//==================================================================================================
|
|
|
|
class RicImportSummaryCasesFeature : public caf::CmdFeature
|
|
|
|
{
|
|
|
|
CAF_CMD_HEADER_INIT;
|
|
|
|
|
|
|
|
public:
|
2019-09-06 03:40:57 -05:00
|
|
|
RicImportSummaryCasesFeature() {}
|
2018-04-18 06:56:01 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
static bool createAndAddSummaryCasesFromFiles( const QStringList& fileName,
|
|
|
|
bool doCreateDefaultPlot,
|
|
|
|
std::vector<RimSummaryCase*>* newCases = nullptr );
|
|
|
|
static bool createSummaryCasesFromFiles( const QStringList& fileName,
|
|
|
|
std::vector<RimSummaryCase*>* newCases,
|
2020-09-09 07:35:15 -05:00
|
|
|
bool ensembleOrGroup = false,
|
|
|
|
bool allowDialogs = true );
|
2019-11-03 05:19:24 -06:00
|
|
|
static void addSummaryCases( const std::vector<RimSummaryCase*>& cases );
|
|
|
|
static void addCasesToGroupIfRelevant( const std::vector<RimSummaryCase*>& cases );
|
2018-01-16 06:37:57 -06:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
static QStringList runRecursiveSummaryCaseFileSearchDialog( const QString& dialogTitle, const QString& pathCacheName );
|
2018-01-10 06:55:48 -06:00
|
|
|
|
2021-09-30 02:08:09 -05:00
|
|
|
static std::pair<QStringList, RiaEnsembleNameTools::EnsembleGroupingMode>
|
2021-09-21 15:27:36 -05:00
|
|
|
runRecursiveSummaryCaseFileSearchDialogWithGrouping( const QString& dialogTitle, const QString& pathCacheName );
|
|
|
|
|
2018-01-10 06:55:48 -06:00
|
|
|
protected:
|
2018-10-18 12:45:57 -05:00
|
|
|
bool isCommandEnabled() override;
|
|
|
|
void onActionTriggered( bool isChecked ) override;
|
|
|
|
void setupActionLook( QAction* actionToSetup ) override;
|
2018-01-16 06:37:57 -06:00
|
|
|
|
|
|
|
private:
|
2018-04-18 06:56:01 -05:00
|
|
|
static QString m_pathFilter;
|
|
|
|
static QString m_fileNameFilter;
|
2018-01-10 06:55:48 -06:00
|
|
|
};
|