2018-03-27 01:51:14 -05: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
|
|
|
|
|
|
|
|
#include "cafPdmChildArrayField.h"
|
|
|
|
#include "cafPdmChildField.h"
|
|
|
|
#include "cafPdmField.h"
|
|
|
|
#include "cafPdmObject.h"
|
|
|
|
|
2018-04-19 07:00:00 -05:00
|
|
|
class RimEnsembleCurveSet;
|
2018-04-18 01:32:16 -05:00
|
|
|
class QwtPlot;
|
2018-04-20 05:30:59 -05:00
|
|
|
class QwtPlotCurve;
|
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();
|
|
|
|
virtual ~RimEnsembleCurveSetCollection();
|
2018-03-27 01:51:14 -05:00
|
|
|
|
2018-04-06 01:16:14 -05:00
|
|
|
bool isCurveSetsVisible();
|
2018-03-27 01:51:14 -05:00
|
|
|
|
|
|
|
void loadDataAndUpdate(bool updateParentPlot);
|
2018-04-18 01:32:16 -05:00
|
|
|
void setParentQwtPlotAndReplot(QwtPlot* plot);
|
2018-03-27 01:51:14 -05:00
|
|
|
void detachQwtCurves();
|
2018-09-07 07:26:14 -05:00
|
|
|
void reattachQwtCurves();
|
2018-03-27 01:51:14 -05:00
|
|
|
|
2018-04-20 05:30:59 -05:00
|
|
|
RimEnsembleCurveSet* findRimCurveSetFromQwtCurve(const QwtPlotCurve* qwtCurve) const;
|
2018-03-27 01:51:14 -05:00
|
|
|
|
2018-04-19 07:00:00 -05:00
|
|
|
void addCurveSet(RimEnsembleCurveSet* curveSet);
|
|
|
|
void deleteCurveSet(RimEnsembleCurveSet* curveSet);
|
2018-09-13 05:38:17 -05:00
|
|
|
void deleteCurveSets(const std::vector<RimEnsembleCurveSet*> curveSets);
|
2018-03-27 01:51:14 -05:00
|
|
|
|
2018-04-19 07:00:00 -05:00
|
|
|
std::vector<RimEnsembleCurveSet*> curveSets() const;
|
2018-05-11 01:01:10 -05:00
|
|
|
size_t curveSetCount() const;
|
2018-03-27 01:51:14 -05:00
|
|
|
|
2018-04-06 01:16:14 -05:00
|
|
|
void deleteAllCurveSets();
|
2018-03-27 01:51:14 -05:00
|
|
|
|
2018-04-20 05:30:59 -05:00
|
|
|
void setCurrentSummaryCurveSet(RimEnsembleCurveSet* curveSet);
|
2018-03-27 01:51:14 -05:00
|
|
|
|
|
|
|
private:
|
2018-05-02 05:47:12 -05:00
|
|
|
caf::PdmFieldHandle* objectToggleField() override;
|
2018-03-27 01:51:14 -05:00
|
|
|
|
|
|
|
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField,
|
|
|
|
const QVariant& oldValue, const QVariant& newValue) override;
|
|
|
|
|
|
|
|
private:
|
2018-04-06 01:16:14 -05:00
|
|
|
caf::PdmField<bool> m_showCurves;
|
2018-04-19 07:00:00 -05:00
|
|
|
caf::PdmChildArrayField<RimEnsembleCurveSet*> m_curveSets;
|
2018-03-27 01:51:14 -05:00
|
|
|
|
2018-04-20 05:30:59 -05:00
|
|
|
caf::PdmPointer<RimEnsembleCurveSet> m_currentEnsembleCurveSet;
|
2018-03-27 01:51:14 -05:00
|
|
|
};
|
|
|
|
|