2017-11-23 02:15:29 -06:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// Copyright (C) 2017- Statoil ASA
|
|
|
|
//
|
|
|
|
// 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.
|
|
|
|
//
|
|
|
|
// 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.
|
|
|
|
//
|
|
|
|
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
|
|
|
// for more details.
|
|
|
|
//
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2022-01-06 08:18:09 -06:00
|
|
|
#include "RimSummaryDataSourceStepping.h"
|
2017-12-01 04:15:19 -06:00
|
|
|
|
2017-11-23 02:15:29 -06:00
|
|
|
#include "cafPdmField.h"
|
|
|
|
#include "cafPdmObject.h"
|
|
|
|
#include "cafPdmProxyValueField.h"
|
|
|
|
#include "cafPdmPtrField.h"
|
|
|
|
|
|
|
|
#include <QString>
|
|
|
|
|
2022-05-03 04:30:09 -05:00
|
|
|
#include <map>
|
2017-12-01 04:15:19 -06:00
|
|
|
#include <set>
|
|
|
|
|
2017-11-23 02:15:29 -06:00
|
|
|
class RimSummaryCase;
|
2018-12-17 08:59:50 -06:00
|
|
|
class RimSummaryCurve;
|
2017-11-23 02:15:29 -06:00
|
|
|
class RifSummaryReaderInterface;
|
2018-12-17 08:59:50 -06:00
|
|
|
class RimSummaryCaseCollection;
|
2022-01-06 08:18:09 -06:00
|
|
|
class RifEclipseSummaryAddress;
|
2017-11-23 02:15:29 -06:00
|
|
|
|
|
|
|
//==================================================================================================
|
|
|
|
///
|
|
|
|
//==================================================================================================
|
2017-11-29 03:35:52 -06:00
|
|
|
class RimSummaryPlotSourceStepping : public caf::PdmObject
|
2017-11-23 02:15:29 -06:00
|
|
|
{
|
|
|
|
CAF_PDM_HEADER_INIT;
|
|
|
|
|
2022-04-26 05:08:22 -05:00
|
|
|
public:
|
|
|
|
enum class SourceSteppingDimension
|
|
|
|
{
|
|
|
|
SUMMARY_CASE,
|
|
|
|
ENSEMBLE,
|
|
|
|
WELL,
|
|
|
|
GROUP,
|
|
|
|
REGION,
|
2022-05-06 09:34:37 -05:00
|
|
|
VECTOR,
|
2022-04-26 05:08:22 -05:00
|
|
|
BLOCK,
|
|
|
|
AQUIFER
|
|
|
|
};
|
|
|
|
|
2017-11-23 02:15:29 -06:00
|
|
|
public:
|
2017-11-29 03:35:52 -06:00
|
|
|
RimSummaryPlotSourceStepping();
|
2017-11-23 02:15:29 -06:00
|
|
|
|
2022-01-06 08:18:09 -06:00
|
|
|
void setSourceSteppingType( RimSummaryDataSourceStepping::Axis sourceSteppingType );
|
|
|
|
void setSourceSteppingObject( caf::PdmObject* sourceObject );
|
2017-12-01 04:15:19 -06:00
|
|
|
|
2022-04-26 05:08:22 -05:00
|
|
|
void applyNextStep();
|
|
|
|
void applyPrevStep();
|
2017-12-04 01:26:23 -06:00
|
|
|
|
2017-12-01 04:15:19 -06:00
|
|
|
std::vector<caf::PdmFieldHandle*> fieldsToShowInToolbar();
|
2017-11-29 05:55:42 -06:00
|
|
|
|
2022-05-03 04:30:09 -05:00
|
|
|
RifEclipseSummaryAddress stepAddress( RifEclipseSummaryAddress addr, int direction );
|
|
|
|
RimSummaryCase* stepCase( int direction );
|
|
|
|
RimSummaryCaseCollection* stepEnsemble( int direction );
|
|
|
|
|
|
|
|
void syncWithStepper( RimSummaryPlotSourceStepping* other );
|
|
|
|
|
|
|
|
RimSummaryPlotSourceStepping::SourceSteppingDimension stepDimension() const;
|
2022-05-06 05:09:55 -05:00
|
|
|
void setStepDimension( RimSummaryPlotSourceStepping::SourceSteppingDimension dimension );
|
2022-05-03 04:30:09 -05:00
|
|
|
|
2022-05-04 06:11:04 -05:00
|
|
|
void updateStepIndex( int direction );
|
|
|
|
|
2017-11-23 02:15:29 -06:00
|
|
|
private:
|
2019-09-06 03:40:57 -05:00
|
|
|
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
2017-11-23 02:15:29 -06:00
|
|
|
|
2022-05-29 06:01:27 -05:00
|
|
|
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions ) override;
|
2017-11-23 02:15:29 -06:00
|
|
|
|
2020-02-12 04:43:15 -06:00
|
|
|
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
2017-11-24 08:17:20 -06:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
void defineEditorAttribute( const caf::PdmFieldHandle* field,
|
|
|
|
QString uiConfigName,
|
|
|
|
caf::PdmUiEditorAttribute* attribute ) override;
|
2017-11-29 09:23:57 -06:00
|
|
|
|
2017-11-23 02:15:29 -06:00
|
|
|
private:
|
2019-10-04 02:09:22 -05:00
|
|
|
caf::PdmValueField* fieldToModify();
|
2017-11-23 02:15:29 -06:00
|
|
|
|
2019-10-04 02:09:22 -05:00
|
|
|
std::set<RifEclipseSummaryAddress> adressesForSourceStepping() const;
|
|
|
|
|
|
|
|
std::set<RifEclipseSummaryAddress> addressesForCurvesInPlot() const;
|
2019-09-06 03:40:57 -05:00
|
|
|
std::set<RimSummaryCase*> summaryCasesCurveCollection() const;
|
2018-12-17 08:59:50 -06:00
|
|
|
std::set<RimSummaryCaseCollection*> ensembleCollection() const;
|
2017-12-01 04:15:19 -06:00
|
|
|
|
2022-04-26 05:08:22 -05:00
|
|
|
std::vector<caf::PdmFieldHandle*> activeFieldsForDataSourceStepping();
|
|
|
|
std::vector<caf::PdmFieldHandle*> toolbarFieldsForDataSourceStepping();
|
|
|
|
|
2017-12-01 04:15:19 -06:00
|
|
|
bool isXAxisStepping() const;
|
|
|
|
bool isYAxisStepping() const;
|
|
|
|
|
2022-05-04 06:11:04 -05:00
|
|
|
void modifyCurrentIndex( caf::PdmValueField* valueField, int indexOffset, bool notifyChange = true );
|
2017-12-04 01:26:23 -06:00
|
|
|
|
2018-12-20 01:36:35 -06:00
|
|
|
std::vector<RimSummaryCase*> summaryCasesForSourceStepping();
|
2018-12-20 01:13:49 -06:00
|
|
|
|
2022-01-06 08:18:09 -06:00
|
|
|
RimSummaryDataSourceStepping* dataSourceSteppingObject() const;
|
|
|
|
|
2022-05-03 04:30:09 -05:00
|
|
|
std::map<QString, QString> optionsForQuantity( std::set<RifEclipseSummaryAddress> addresses );
|
|
|
|
|
2017-11-23 02:15:29 -06:00
|
|
|
private:
|
2022-01-06 08:18:09 -06:00
|
|
|
caf::PdmPointer<caf::PdmObject> m_objectForSourceStepping;
|
|
|
|
|
2022-04-26 05:08:22 -05:00
|
|
|
caf::PdmField<QString> m_indexLabel;
|
|
|
|
caf::PdmField<caf::AppEnum<SourceSteppingDimension>> m_stepDimension;
|
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
caf::PdmPtrField<RimSummaryCase*> m_summaryCase;
|
2018-12-17 08:59:50 -06:00
|
|
|
caf::PdmPtrField<RimSummaryCaseCollection*> m_ensemble;
|
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
caf::PdmField<QString> m_wellName;
|
2022-04-07 14:06:40 -05:00
|
|
|
caf::PdmField<QString> m_groupName;
|
2019-09-06 03:40:57 -05:00
|
|
|
caf::PdmField<int> m_region;
|
2022-05-06 09:34:37 -05:00
|
|
|
caf::PdmField<QString> m_vectorName;
|
2019-09-06 03:40:57 -05:00
|
|
|
caf::PdmField<QString> m_placeholderForLabel;
|
2019-08-05 14:53:48 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
caf::PdmField<QString> m_cellBlock;
|
|
|
|
caf::PdmField<QString> m_segment;
|
|
|
|
caf::PdmField<QString> m_completion;
|
2019-08-05 14:53:48 -05:00
|
|
|
|
2020-11-10 07:49:43 -06:00
|
|
|
caf::PdmField<int> m_aquifer;
|
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
caf::PdmField<bool> m_includeEnsembleCasesForCaseStepping;
|
2018-12-20 01:36:35 -06:00
|
|
|
|
2022-01-06 08:18:09 -06:00
|
|
|
RimSummaryDataSourceStepping::Axis m_sourceSteppingType;
|
2017-11-23 02:15:29 -06:00
|
|
|
};
|