2018-01-10 13:55:48 +01:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
//
|
|
|
|
|
// Copyright (C) 2016- Statoil ASA
|
2019-09-06 10:40:57 +02:00
|
|
|
//
|
2018-01-10 13:55:48 +01: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 10:40:57 +02:00
|
|
|
//
|
2018-01-10 13:55:48 +01: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 10:40:57 +02:00
|
|
|
//
|
|
|
|
|
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
2018-01-10 13:55:48 +01:00
|
|
|
// for more details.
|
|
|
|
|
//
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
2018-03-19 13:35:56 +01:00
|
|
|
#include "RiaPreferences.h"
|
|
|
|
|
|
2018-01-10 13:55:48 +01:00
|
|
|
#include "cafCmdFeature.h"
|
|
|
|
|
|
|
|
|
|
#include <QString>
|
2018-04-18 13:56:01 +02:00
|
|
|
#include <vector>
|
2018-01-10 13:55:48 +01:00
|
|
|
|
2018-03-16 09:02:28 +01:00
|
|
|
class RicSummaryCaseRestartDialogResult;
|
2018-04-18 13:56:01 +02:00
|
|
|
class RimSummaryCase;
|
2018-03-19 11:02:22 +01:00
|
|
|
|
2018-01-10 13:55:48 +01:00
|
|
|
//==================================================================================================
|
2019-09-06 10:40:57 +02:00
|
|
|
///
|
2018-01-10 13:55:48 +01:00
|
|
|
//==================================================================================================
|
|
|
|
|
class RicImportSummaryCasesFeature : public caf::CmdFeature
|
|
|
|
|
{
|
|
|
|
|
CAF_CMD_HEADER_INIT;
|
|
|
|
|
|
|
|
|
|
public:
|
2019-09-06 10:40:57 +02:00
|
|
|
RicImportSummaryCasesFeature() {}
|
2018-04-18 13:56:01 +02:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
static bool createAndAddSummaryCasesFromFiles( const QStringList& fileName,
|
|
|
|
|
bool doCreateDefaultPlot,
|
|
|
|
|
std::vector<RimSummaryCase*>* newCases = nullptr );
|
|
|
|
|
static bool createSummaryCasesFromFiles( const QStringList& fileName,
|
|
|
|
|
std::vector<RimSummaryCase*>* newCases,
|
|
|
|
|
bool ensembleOrGroup = false );
|
2019-11-03 12:19:24 +01:00
|
|
|
static void addSummaryCases( const std::vector<RimSummaryCase*>& cases );
|
|
|
|
|
static void addCasesToGroupIfRelevant( const std::vector<RimSummaryCase*>& cases );
|
2018-01-16 13:37:57 +01:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
static QStringList runRecursiveSummaryCaseFileSearchDialog( const QString& dialogTitle, const QString& pathCacheName );
|
2018-01-10 13:55:48 +01:00
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
// Overrides
|
2018-10-18 19:45:57 +02:00
|
|
|
bool isCommandEnabled() override;
|
|
|
|
|
void onActionTriggered( bool isChecked ) override;
|
|
|
|
|
void setupActionLook( QAction* actionToSetup ) override;
|
2018-01-16 13:37:57 +01:00
|
|
|
|
|
|
|
|
private:
|
2018-04-18 13:56:01 +02:00
|
|
|
static QString m_pathFilter;
|
|
|
|
|
static QString m_fileNameFilter;
|
2018-01-10 13:55:48 +01:00
|
|
|
};
|