2021-12-23 02:30:36 -06:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// Copyright (C) 2021 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 <http://www.gnu.org/licenses/gpl.html>
|
|
|
|
// for more details.
|
|
|
|
//
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "RimPlotWindow.h"
|
2022-01-06 08:18:09 -06:00
|
|
|
#include "RimSummaryDataSourceStepping.h"
|
2021-12-23 02:30:36 -06:00
|
|
|
|
|
|
|
#include "cafPdmChildField.h"
|
|
|
|
#include "cafPdmObject.h"
|
|
|
|
#include "cafPdmPtrArrayField.h"
|
|
|
|
|
|
|
|
class RimMultiPlot;
|
2022-01-06 08:18:09 -06:00
|
|
|
class RimSummaryPlot;
|
|
|
|
class RimSummaryPlotSourceStepping;
|
|
|
|
class RimSummaryPlotNameHelper;
|
|
|
|
class RimSummaryNameHelper;
|
2021-12-23 02:30:36 -06:00
|
|
|
|
|
|
|
//==================================================================================================
|
|
|
|
///
|
|
|
|
///
|
|
|
|
//==================================================================================================
|
2022-01-06 08:18:09 -06:00
|
|
|
class RimSummaryMultiPlot : public RimPlotWindow, public RimSummaryDataSourceStepping
|
2021-12-23 02:30:36 -06:00
|
|
|
{
|
|
|
|
CAF_PDM_HEADER_INIT;
|
|
|
|
|
|
|
|
public:
|
|
|
|
RimSummaryMultiPlot();
|
2021-12-23 20:21:23 -06:00
|
|
|
~RimSummaryMultiPlot() override;
|
2021-12-23 02:30:36 -06:00
|
|
|
|
|
|
|
QWidget* viewWidget() override;
|
|
|
|
QImage snapshotWindowContent() override;
|
|
|
|
void zoomAll() override;
|
|
|
|
QString description() const override;
|
|
|
|
|
2022-01-10 07:51:31 -06:00
|
|
|
void addPlot( RimSummaryPlot* plot );
|
2021-12-23 02:30:36 -06:00
|
|
|
|
2022-01-06 08:18:09 -06:00
|
|
|
void updatePlotTitles();
|
|
|
|
const RimSummaryNameHelper* nameHelper() const;
|
|
|
|
|
2022-01-10 07:51:31 -06:00
|
|
|
void setAutoTitlePlot( bool enable );
|
|
|
|
void setAutoTitleGraphs( bool enable );
|
|
|
|
|
|
|
|
static RimSummaryMultiPlot* createAndAppendMultiPlot( const std::vector<RimSummaryPlot*>& plots );
|
2021-12-23 02:30:36 -06:00
|
|
|
|
2022-01-06 08:18:09 -06:00
|
|
|
std::vector<RimSummaryDataSourceStepping::Axis> availableAxes() const override;
|
|
|
|
std::vector<RimSummaryCurve*> curvesForStepping( RimSummaryDataSourceStepping::Axis axis ) const override;
|
|
|
|
std::vector<RimEnsembleCurveSet*> curveSets() const override;
|
|
|
|
std::vector<RimSummaryCurve*> allCurves( RimSummaryDataSourceStepping::Axis axis ) const override;
|
|
|
|
|
2021-12-23 02:30:36 -06:00
|
|
|
private:
|
|
|
|
QWidget* createViewWidget( QWidget* mainWindowParent = nullptr ) override;
|
|
|
|
void deleteViewWidget() override;
|
|
|
|
void onLoadDataAndUpdate() override;
|
|
|
|
|
|
|
|
void doRenderWindowContent( QPaintDevice* paintDevice ) override;
|
|
|
|
|
|
|
|
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions,
|
|
|
|
bool* useOptionsOnly ) override;
|
|
|
|
|
|
|
|
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
|
|
|
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;
|
|
|
|
void defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName ) override;
|
|
|
|
|
|
|
|
void updatePlots();
|
2022-01-06 08:18:09 -06:00
|
|
|
void populateNameHelper( RimSummaryPlotNameHelper* nameHelper );
|
|
|
|
|
|
|
|
std::vector<RimSummaryPlot*> summaryPlots() const;
|
2021-12-23 02:30:36 -06:00
|
|
|
|
2022-01-10 07:51:31 -06:00
|
|
|
static void insertGraphsIntoPlot( RimSummaryMultiPlot* plot, const std::vector<RimSummaryPlot*>& graphs );
|
|
|
|
|
2021-12-23 02:30:36 -06:00
|
|
|
private:
|
|
|
|
caf::PdmField<QString> m_filterText;
|
|
|
|
caf::PdmField<bool> m_individualPlotPerVector;
|
|
|
|
caf::PdmField<bool> m_individualPlotPerDataSource;
|
2022-01-10 07:51:31 -06:00
|
|
|
caf::PdmField<bool> m_individualPlotPerObject;
|
2022-01-06 08:18:09 -06:00
|
|
|
caf::PdmField<bool> m_autoPlotTitles;
|
|
|
|
caf::PdmField<bool> m_autoPlotTitlesOnSubPlots;
|
2021-12-23 02:30:36 -06:00
|
|
|
|
|
|
|
caf::PdmField<bool> m_showMultiPlotInProjectTree;
|
|
|
|
caf::PdmChildField<RimMultiPlot*> m_multiPlot;
|
2022-01-06 08:18:09 -06:00
|
|
|
|
|
|
|
caf::PdmChildField<RimSummaryPlotSourceStepping*> m_sourceStepping;
|
|
|
|
|
|
|
|
std::unique_ptr<RimSummaryPlotNameHelper> m_nameHelper;
|
2021-12-23 02:30:36 -06:00
|
|
|
};
|