///////////////////////////////////////////////////////////////////////////////// // // Copyright (C) 2020 Equinor 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 // for more details. // ///////////////////////////////////////////////////////////////////////////////// #pragma once #include "RifEclipseSummaryAddress.h" #include "RifEclipseSummaryAddressQMetaType.h" #include "RimPlot.h" #include "RimSummaryCaseCollection.h" #include "cafPdmPtrField.h" #include class RiaSummaryCurveDefinition; class RiaSummaryCurveDefinitionAnalyser; class RimAnalysisPlotDataEntry; class RimSummaryAddress; class RimAbstractCorrelationPlot : public RimPlot { CAF_PDM_HEADER_INIT; public: RimAbstractCorrelationPlot(); ~RimAbstractCorrelationPlot() override; public: std::vector curveDefinitions() const; void setCurveDefinitions( const std::vector& curveDefinitions ); std::set ensembles(); RiuQwtPlotWidget* viewer() override; void detachAllCurves() override; QDateTime timeStep() const; int labelFontSize() const; int axisTitleFontSize() const; int axisValueFontSize() const; void setLabelFontSize( caf::FontTools::RelativeSize fontSize ); void setAxisTitleFontSize( caf::FontTools::RelativeSize fontSize ); void setAxisValueFontSize( caf::FontTools::RelativeSize fontSize ); protected: // Overridden PDM methods void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override; void defineEditorAttribute( const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute ) override; caf::PdmFieldHandle* userDescriptionField() override; QList calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly ) override; std::set allAvailableTimeSteps(); RiaSummaryCurveDefinitionAnalyser* getOrCreateSelectedCurveDefAnalyser(); std::set addresses(); std::set ensembleParameters(); EnsembleParameter ensembleParameter( const QString& ensembleParameterName ); // RimViewWindow overrides QWidget* viewWidget() override; void deleteViewWidget() override; void zoomAll() override {} QImage snapshotWindowContent() override; // RimPlotWindow overrides QString description() const override; void doUpdateLayout() override {} // RimPlot Overrides RiuQwtPlotWidget* doCreatePlotViewWidget( QWidget* mainWindowParent = nullptr ) override; void reattachAllCurves() override {} void doRemoveFromCollection() override {} void updateZoomInQwt() override {} void updateZoomFromQwt() override {} void setAutoScaleXEnabled( bool enabled ) override {} void setAutoScaleYEnabled( bool enabled ) override {} void updateLegend() override; QString asciiDataForPlotExport() const override { return ""; } caf::PdmObject* findPdmObjectFromQwtCurve( const QwtPlotCurve* curve ) const override { return nullptr; } void cleanupBeforeClose(); virtual void updatePlotTitle() = 0; static time_t timeDiff( time_t lhs, time_t rhs ); QString selectedVarsText() const; protected: std::unique_ptr m_analyserOfSelectedCurveDefs; QPointer m_plotWidget; bool m_selectMultipleVectors; // Fields caf::PdmChildArrayField m_analysisPlotDataSelection; caf::PdmField m_selectedVarsUiField; caf::PdmField m_pushButtonSelectSummaryAddress; caf::PdmField m_timeStep; caf::PdmField m_showPlotTitle; caf::PdmField m_useAutoPlotTitle; caf::PdmField m_description; caf::PdmField m_labelFontSize; caf::PdmField m_axisTitleFontSize; caf::PdmField m_axisValueFontSize; };