///////////////////////////////////////////////////////////////////////////////// // // 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 "RimAbstractCorrelationPlot.h" #include #include class RiuQwtPlotRectAnnotation; //================================================================================================== /// /// //================================================================================================== class RimParameterResultCrossPlot : public RimAbstractCorrelationPlot { CAF_PDM_HEADER_INIT; public: RimParameterResultCrossPlot(); ~RimParameterResultCrossPlot() override; void setEnsembleParameter( const QString& ensembleParameter ); QString ensembleParameter() const; std::vector summaryCasesExcludedByFilter() const; void appendFilterFields( caf::PdmUiOrdering& uiOrdering ); void detachAllCurves() override; private: void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override; void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override; QList calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions ) override; void defineEditorAttribute( const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute ) override; RiuPlotWidget* doCreatePlotViewWidget( QWidget* mainWindowParent = nullptr ) override; void onLoadDataAndUpdate() override; void updateAxes() override; QString asciiDataForPlotExport() const override; void updatePlotTitle() override; void createPoints(); void updateValueRanges(); void updateFilterRanges(); QString excludedCasesText() const; struct CaseData { double parameterValue; double summaryValue; RimSummaryCase* summaryCase; }; std::vector createCaseData() const; size_t hashFromCurrentData() const; void writeDataToCache(); private: caf::PdmField m_ensembleParameter; caf::PdmField m_useParameterFilter; caf::PdmField> m_summaryFilterRange; caf::PdmField> m_parameterFilterRange; caf::PdmProxyValueField m_excludedCasesText; std::pair m_xValueRange; std::pair m_yValueRange; std::unique_ptr m_rectAnnotation; std::map> m_filterValueRangeCache; };