2017-08-11 04:20:40 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// Copyright (C) 2017 Statoil ASA
|
2019-09-06 03:40:57 -05:00
|
|
|
//
|
2017-08-11 04:20:40 -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
|
|
|
//
|
2017-08-11 04:20:40 -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>
|
2017-08-11 04:20:40 -05:00
|
|
|
// for more details.
|
|
|
|
//
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
#include "cafPdmChildField.h"
|
2017-08-11 04:20:40 -05:00
|
|
|
#include "cafPdmField.h"
|
|
|
|
#include "cafPdmObject.h"
|
|
|
|
#include "cafPdmPointer.h"
|
|
|
|
#include "cafPdmPtrField.h"
|
|
|
|
|
2017-08-14 03:47:44 -05:00
|
|
|
#include "RiaDefines.h"
|
2019-09-06 03:40:57 -05:00
|
|
|
#include "RifEclipseSummaryAddress.h"
|
2017-08-11 04:20:40 -05:00
|
|
|
#include "RimPlotCurve.h"
|
|
|
|
|
|
|
|
#include "cafAppEnum.h"
|
|
|
|
|
|
|
|
#include <QDateTime>
|
|
|
|
|
|
|
|
class RifReaderEclipseSummary;
|
|
|
|
class RimSummaryCase;
|
2018-09-04 02:08:29 -05:00
|
|
|
class RiuQwtPlotCurve;
|
2017-08-11 04:20:40 -05:00
|
|
|
class RimAsciiDataCurveAutoName;
|
|
|
|
|
|
|
|
//==================================================================================================
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
|
|
|
///
|
2017-08-11 04:20:40 -05:00
|
|
|
//==================================================================================================
|
|
|
|
class RimAsciiDataCurve : public RimPlotCurve
|
|
|
|
{
|
|
|
|
CAF_PDM_HEADER_INIT;
|
|
|
|
|
|
|
|
public:
|
|
|
|
RimAsciiDataCurve();
|
2018-10-18 12:45:57 -05:00
|
|
|
~RimAsciiDataCurve() override;
|
2017-08-11 04:20:40 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
std::vector<double> yValues() const;
|
|
|
|
const std::vector<time_t>& timeSteps() const;
|
2017-08-11 04:20:40 -05:00
|
|
|
|
2022-01-19 02:50:28 -06:00
|
|
|
void setYAxis( RiaDefines::PlotAxis plotAxis );
|
|
|
|
RiuPlotAxis yAxis() const;
|
|
|
|
void updateQwtPlotAxis();
|
2017-08-11 04:20:40 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
void setTimeSteps( const std::vector<QDateTime>& timeSteps );
|
|
|
|
void setValues( const std::vector<double>& values );
|
2022-01-17 06:14:21 -06:00
|
|
|
void setTitle( const QString& title ) override;
|
2017-08-11 04:20:40 -05:00
|
|
|
|
|
|
|
protected:
|
|
|
|
// RimPlotCurve overrides
|
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
QString createCurveAutoName() override;
|
|
|
|
void updateZoomInParentPlot() override;
|
|
|
|
void onLoadDataAndUpdate( bool updateParentPlot ) override;
|
|
|
|
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
2017-08-11 04:20:40 -05:00
|
|
|
|
|
|
|
private:
|
2019-09-06 03:40:57 -05:00
|
|
|
bool curveData( std::vector<QDateTime>* timeSteps, std::vector<double>* values ) const;
|
2017-08-11 04:20:40 -05:00
|
|
|
|
2020-02-12 04:43:15 -06:00
|
|
|
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
2017-08-17 07:24:49 -05:00
|
|
|
|
2017-08-11 04:20:40 -05:00
|
|
|
private:
|
|
|
|
// Fields
|
2019-09-06 03:40:57 -05:00
|
|
|
caf::PdmField<caf::AppEnum<RiaDefines::PlotAxis>> m_plotAxis;
|
2017-08-11 04:20:40 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
caf::PdmField<std::vector<QDateTime>> m_timeSteps;
|
|
|
|
caf::PdmField<std::vector<double>> m_values;
|
|
|
|
caf::PdmField<QString> m_title;
|
2017-08-11 04:20:40 -05:00
|
|
|
};
|