2012-06-26 09:10:41 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// Copyright (C) 2011-2012 Statoil ASA, Ceetron AS
|
2019-09-06 03:40:57 -05:00
|
|
|
//
|
2012-06-26 09:10:41 -05: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
|
|
|
//
|
2012-06-26 09:10:41 -05: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>
|
2012-06-26 09:10:41 -05:00
|
|
|
// for more details.
|
|
|
|
//
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2015-07-31 11:58:23 -05:00
|
|
|
#include "RimEclipseCase.h"
|
|
|
|
|
|
|
|
#include "cafPdmChildField.h"
|
2012-06-26 09:10:41 -05:00
|
|
|
#include "cafPdmField.h"
|
|
|
|
#include "cafPdmObject.h"
|
2017-06-28 13:10:06 -05:00
|
|
|
#include "cafPdmProxyValueField.h"
|
2012-06-26 09:10:41 -05:00
|
|
|
|
2015-07-31 11:58:23 -05:00
|
|
|
#include "cvfObject.h"
|
2012-06-26 09:10:41 -05:00
|
|
|
|
|
|
|
class RifReaderInterface;
|
2015-06-25 04:51:59 -05:00
|
|
|
class RimEclipseInputProperty;
|
2015-07-31 11:58:23 -05:00
|
|
|
class RimEclipseInputPropertyCollection;
|
2012-06-26 09:10:41 -05:00
|
|
|
|
|
|
|
//==================================================================================================
|
|
|
|
//
|
2019-09-06 03:40:57 -05:00
|
|
|
//
|
2012-06-26 09:10:41 -05:00
|
|
|
//
|
|
|
|
//==================================================================================================
|
2015-06-25 04:50:13 -05:00
|
|
|
class RimEclipseInputCase : public RimEclipseCase
|
2012-06-26 09:10:41 -05:00
|
|
|
{
|
|
|
|
CAF_PDM_HEADER_INIT;
|
|
|
|
|
|
|
|
public:
|
2015-06-25 04:50:13 -05:00
|
|
|
RimEclipseInputCase();
|
2018-10-18 12:45:57 -05:00
|
|
|
~RimEclipseInputCase() override;
|
2012-06-26 09:10:41 -05:00
|
|
|
|
|
|
|
// File open methods
|
2019-09-06 03:40:57 -05:00
|
|
|
bool openDataFileSet( const QStringList& fileNames );
|
|
|
|
void loadAndSyncronizeInputProperties();
|
2012-06-26 09:10:41 -05:00
|
|
|
|
2018-10-10 02:35:01 -05:00
|
|
|
RimEclipseInputPropertyCollection* inputPropertyCollection();
|
|
|
|
|
2013-03-22 10:40:41 -05:00
|
|
|
// RimCase overrides
|
2019-09-06 03:40:57 -05:00
|
|
|
bool openEclipseGridFile() override;
|
|
|
|
void reloadEclipseGridFile() override;
|
2012-06-26 09:10:41 -05:00
|
|
|
|
2013-04-08 05:01:40 -05:00
|
|
|
// Overrides from RimCase
|
2019-09-06 03:40:57 -05:00
|
|
|
QString locationOnDisc() const override;
|
|
|
|
QString gridFileName() const override
|
|
|
|
{
|
|
|
|
return m_gridFileName();
|
|
|
|
}
|
2013-04-11 05:06:38 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
void updateFilePathsFromProjectPath( const QString& projectPath, const QString& oldProjectPath ) override;
|
2012-06-26 09:10:41 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
void updateAdditionalFileFolder( const QString& newFolder );
|
2017-06-28 13:10:06 -05:00
|
|
|
|
|
|
|
private:
|
2019-09-06 03:40:57 -05:00
|
|
|
std::vector<QString> additionalFiles() const;
|
2017-06-28 13:10:06 -05:00
|
|
|
|
2017-04-06 11:37:43 -05:00
|
|
|
protected:
|
2019-09-06 03:40:57 -05:00
|
|
|
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
|
|
|
void defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "" ) override;
|
2017-04-06 11:37:43 -05:00
|
|
|
|
2012-06-26 09:10:41 -05:00
|
|
|
private:
|
2019-09-06 03:40:57 -05:00
|
|
|
cvf::ref<RifReaderInterface> createMockModel( QString modelName );
|
2013-04-11 05:06:38 -05:00
|
|
|
|
2018-10-10 02:35:01 -05:00
|
|
|
private:
|
2013-04-11 05:06:38 -05:00
|
|
|
// Fields
|
2018-10-10 02:35:01 -05:00
|
|
|
caf::PdmChildField<RimEclipseInputPropertyCollection*> m_inputPropertyCollection;
|
2019-09-06 03:40:57 -05:00
|
|
|
caf::PdmField<QString> m_gridFileName;
|
|
|
|
caf::PdmProxyValueField<std::vector<QString>> m_additionalFiles;
|
2013-04-11 05:06:38 -05:00
|
|
|
|
2017-06-28 13:10:06 -05:00
|
|
|
// Obsolete fields
|
2019-09-06 03:40:57 -05:00
|
|
|
caf::PdmField<std::vector<QString>> m_additionalFilenames_OBSOLETE;
|
2012-06-26 09:10:41 -05:00
|
|
|
};
|