ResInsight/ApplicationLibCode/ProjectDataModel/CorrelationPlots/RimCorrelationReportPlot.h

94 lines
3.5 KiB
C
Raw Normal View History

2020-04-29 01:11:30 -05:00
/////////////////////////////////////////////////////////////////////////////////
//
// 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 <http://www.gnu.org/licenses/gpl.html>
// for more details.
//
/////////////////////////////////////////////////////////////////////////////////
#pragma once
#include "RimPlotWindow.h"
#include "cafPdmChildField.h"
#include "cafPdmProxyValueField.h"
#include "cafPdmPtrField.h"
#include <QDateTime>
#include <QObject>
2020-04-29 01:11:30 -05:00
#include <QPointer>
class RimAnalysisPlotDataEntry;
class RimCorrelationMatrixPlot;
class RimParameterResultCrossPlot;
class RimSummaryCaseCollection;
2021-04-05 04:54:09 -05:00
class RimCorrelationPlot;
class RiaSummaryCurveDefinition;
2020-04-29 01:11:30 -05:00
class RiuMultiPlotPage;
class RimCorrelationReportPlot : public QObject, public RimPlotWindow
2020-04-29 01:11:30 -05:00
{
CAF_PDM_HEADER_INIT;
public:
RimCorrelationReportPlot();
~RimCorrelationReportPlot() override;
QWidget* viewWidget() override;
QString description() const override;
QImage snapshotWindowContent() override;
void zoomAll() override;
caf::PdmFieldHandle* userDescriptionField() override;
RimCorrelationMatrixPlot* matrixPlot() const;
RimCorrelationPlot* correlationPlot() const;
RimParameterResultCrossPlot* crossPlot() const;
int columnCount() const override;
2020-05-27 05:58:21 -05:00
int subTitleFontSize() const;
int axisTitleFontSize() const;
int axisValueFontSize() const;
2020-04-29 01:11:30 -05:00
private:
QString createPlotWindowTitle() const;
void recreatePlotWidgets();
void cleanupBeforeClose();
void doRenderWindowContent( QPaintDevice* paintDevice ) override;
QWidget* createViewWidget( QWidget* mainWindowParent = nullptr ) override;
void deleteViewWidget() override;
void onLoadDataAndUpdate() override;
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
void childFieldChangedByUi( const caf::PdmFieldHandle* changedChildField ) override;
2020-05-27 05:58:21 -05:00
void doUpdateLayout() override;
2020-04-29 01:11:30 -05:00
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions ) override;
void onDataSelection( const caf::SignalEmitter* emitter,
std::pair<QString, RiaSummaryCurveDefinition> parameterAndCurveDef );
2020-04-29 01:11:30 -05:00
private:
caf::PdmProxyValueField<QString> m_plotWindowTitle;
caf::PdmChildField<RimCorrelationMatrixPlot*> m_correlationMatrixPlot;
caf::PdmChildField<RimCorrelationPlot*> m_correlationPlot;
caf::PdmChildField<RimParameterResultCrossPlot*> m_parameterResultCrossPlot;
2020-05-27 05:58:21 -05:00
caf::PdmField<caf::FontTools::RelativeSizeEnum> m_subTitleFontSize;
caf::PdmField<caf::FontTools::RelativeSizeEnum> m_labelFontSize;
caf::PdmField<caf::FontTools::RelativeSizeEnum> m_axisTitleFontSize;
caf::PdmField<caf::FontTools::RelativeSizeEnum> m_axisValueFontSize;
2020-04-29 01:11:30 -05:00
QPointer<RiuMultiPlotPage> m_viewer;
};