2018-03-27 01:51:14 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// Copyright (C) 2017- Statoil ASA
|
2019-09-06 03:40:57 -05:00
|
|
|
//
|
2018-03-27 01:51:14 -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
|
|
|
//
|
2018-03-27 01:51:14 -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>
|
2018-03-27 01:51:14 -05:00
|
|
|
// for more details.
|
|
|
|
//
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2022-01-17 06:14:21 -06:00
|
|
|
#include "RiuPlotWidget.h"
|
2018-03-27 01:51:14 -05:00
|
|
|
#include "cafPdmChildArrayField.h"
|
|
|
|
#include "cafPdmChildField.h"
|
|
|
|
#include "cafPdmField.h"
|
|
|
|
#include "cafPdmObject.h"
|
|
|
|
|
2018-04-19 07:00:00 -05:00
|
|
|
class RimEnsembleCurveSet;
|
2018-12-17 08:54:23 -06:00
|
|
|
class RimSummaryPlotSourceStepping;
|
|
|
|
class RimSummaryCurve;
|
2022-01-17 06:14:21 -06:00
|
|
|
class RiuPlotCurve;
|
2018-03-27 01:51:14 -05:00
|
|
|
|
|
|
|
//==================================================================================================
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2018-03-27 01:51:14 -05:00
|
|
|
//==================================================================================================
|
2018-04-19 07:00:00 -05:00
|
|
|
class RimEnsembleCurveSetCollection : public caf::PdmObject
|
2018-03-27 01:51:14 -05:00
|
|
|
{
|
|
|
|
CAF_PDM_HEADER_INIT;
|
|
|
|
|
|
|
|
public:
|
2018-04-19 07:00:00 -05:00
|
|
|
RimEnsembleCurveSetCollection();
|
2018-10-18 12:45:57 -05:00
|
|
|
~RimEnsembleCurveSetCollection() override;
|
2018-03-27 01:51:14 -05:00
|
|
|
|
2023-04-19 08:36:06 -05:00
|
|
|
bool isCurveSetsVisible() const;
|
2018-03-27 01:51:14 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
void loadDataAndUpdate( bool updateParentPlot );
|
2022-01-17 06:14:21 -06:00
|
|
|
void setParentPlotAndReplot( RiuPlotWidget* plot );
|
2022-04-01 12:23:27 -05:00
|
|
|
void setParentPlotNoReplot( RiuPlotWidget* plot );
|
2022-01-17 06:14:21 -06:00
|
|
|
void detachPlotCurves();
|
|
|
|
void reattachPlotCurves();
|
2018-03-27 01:51:14 -05:00
|
|
|
|
2022-01-17 06:14:21 -06:00
|
|
|
RimSummaryCurve* findRimCurveFromPlotCurve( const RiuPlotCurve* qwtCurve ) const;
|
|
|
|
RimEnsembleCurveSet* findCurveSetFromPlotCurve( const RiuPlotCurve* qwtCurve ) const;
|
2018-03-27 01:51:14 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
void addCurveSet( RimEnsembleCurveSet* curveSet );
|
|
|
|
void deleteCurveSet( RimEnsembleCurveSet* curveSet );
|
|
|
|
void deleteCurveSets( const std::vector<RimEnsembleCurveSet*> curveSets );
|
2018-03-27 01:51:14 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
std::vector<RimEnsembleCurveSet*> curveSets() const;
|
|
|
|
size_t curveSetCount() const;
|
2018-03-27 01:51:14 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
void deleteAllCurveSets();
|
2018-12-17 08:54:23 -06:00
|
|
|
|
|
|
|
// Functions related to source stepping
|
2019-09-06 03:40:57 -05:00
|
|
|
std::vector<caf::PdmFieldHandle*> fieldsToShowInToolbar();
|
|
|
|
void setCurveSetForSourceStepping( RimEnsembleCurveSet* curve );
|
|
|
|
RimEnsembleCurveSet* curveSetForSourceStepping() const;
|
|
|
|
std::vector<RimEnsembleCurveSet*> curveSetsForSourceStepping() const;
|
2019-10-04 06:20:15 -05:00
|
|
|
RimSummaryPlotSourceStepping* sourceSteppingObject() const;
|
2018-03-27 01:51:14 -05:00
|
|
|
|
2023-02-26 03:48:40 -06:00
|
|
|
void onChildDeleted( caf::PdmChildArrayFieldHandle* childArray, std::vector<caf::PdmObjectHandle*>& referringObjects ) override;
|
2020-05-18 09:02:27 -05:00
|
|
|
|
2018-03-27 01:51:14 -05:00
|
|
|
private:
|
2019-09-06 03:40:57 -05:00
|
|
|
caf::PdmFieldHandle* objectToggleField() override;
|
|
|
|
|
2020-02-12 04:43:15 -06:00
|
|
|
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
2018-03-27 01:51:14 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
2018-12-17 08:54:23 -06:00
|
|
|
|
2023-05-23 01:10:35 -05:00
|
|
|
void onCurveSetsReordered( const SignalEmitter* emitter );
|
|
|
|
|
2018-03-27 01:51:14 -05:00
|
|
|
private:
|
2019-09-06 03:40:57 -05:00
|
|
|
caf::PdmField<bool> m_showCurves;
|
|
|
|
caf::PdmChildArrayField<RimEnsembleCurveSet*> m_curveSets;
|
2018-03-27 01:51:14 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
caf::PdmChildField<RimSummaryPlotSourceStepping*> m_ySourceStepping;
|
2018-12-17 08:54:23 -06:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
caf::PdmPointer<RimEnsembleCurveSet> m_curveSetForSourceStepping;
|
2018-03-27 01:51:14 -05:00
|
|
|
};
|