#2092 Cross Plot : Add RimSummaryCrossPlot

This commit is contained in:
Magne Sjaastad 2017-11-14 12:50:21 +01:00
parent df9e0de39c
commit 1376727386
6 changed files with 78 additions and 9 deletions

View File

@ -30,6 +30,7 @@ ${CEE_CURRENT_LIST_DIR}RimObservedEclipseUserData.h
${CEE_CURRENT_LIST_DIR}RimCalculatedSummaryCase.h
${CEE_CURRENT_LIST_DIR}RimCalculatedSummaryCurveReader.h
${CEE_CURRENT_LIST_DIR}RimSummaryAddress.h
${CEE_CURRENT_LIST_DIR}RimSummaryCrossPlot.h
)
set (SOURCE_GROUP_SOURCE_FILES
@ -58,6 +59,7 @@ ${CEE_CURRENT_LIST_DIR}RimObservedEclipseUserData.cpp
${CEE_CURRENT_LIST_DIR}RimCalculatedSummaryCase.cpp
${CEE_CURRENT_LIST_DIR}RimCalculatedSummaryCurveReader.cpp
${CEE_CURRENT_LIST_DIR}RimSummaryAddress.cpp
${CEE_CURRENT_LIST_DIR}RimSummaryCrossPlot.cpp
)
list(APPEND CODE_HEADER_FILES

View File

@ -0,0 +1,33 @@
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2017 Statoil 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.
//
/////////////////////////////////////////////////////////////////////////////////
#include "RimSummaryCrossPlot.h"
CAF_PDM_SOURCE_INIT(RimSummaryCrossPlot, "SummaryCrossPlot");
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimSummaryCrossPlot::RimSummaryCrossPlot()
{
CAF_PDM_InitObject("Summary Cross Plot", ":/SummaryPlotLight16x16.png", "", "");
setAsCrossPlot();
}

View File

@ -0,0 +1,35 @@
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2017 Statoil 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 "RimSummaryPlot.h"
//==================================================================================================
///
///
//==================================================================================================
class RimSummaryCrossPlot : public RimSummaryPlot
{
CAF_PDM_HEADER_INIT;
public:
RimSummaryCrossPlot();
};

View File

@ -19,6 +19,7 @@
#include "RimSummaryCrossPlotCollection.h"
#include "RimSummaryPlot.h"
#include "RimSummaryCrossPlot.h"
CAF_PDM_SOURCE_INIT(RimSummaryCrossPlotCollection, "SummaryCrossPlotCollection");
@ -87,11 +88,10 @@ void RimSummaryCrossPlotCollection::summaryPlotItemInfos(QList<caf::PdmOptionIte
//--------------------------------------------------------------------------------------------------
RimSummaryPlot* RimSummaryCrossPlotCollection::addSummaryPlot()
{
RimSummaryPlot* plot = new RimSummaryPlot();
RimSummaryPlot* plot = new RimSummaryCrossPlot();
m_summaryCrossPlots().push_back(plot);
plot->setDescription(QString("Summary Cross Plot %1").arg(m_summaryCrossPlots.size()));
plot->setAsCrossPlot();
return plot;
}

View File

@ -105,10 +105,9 @@ RimSummaryPlot::RimSummaryPlot()
CAF_PDM_InitField(&m_isAutoZoom, "AutoZoom", true, "Auto Zoom", "", "", "");
m_isAutoZoom.uiCapability()->setUiHidden(true);
CAF_PDM_InitField(&m_isCrossPlot, "IsCrossPlot", false, "Cross Plot", "", "", "");
m_isCrossPlot.uiCapability()->setUiHidden(true);
setAsPlotMdiWindow();
m_isCrossPlot = false;
}
//--------------------------------------------------------------------------------------------------
@ -1018,7 +1017,7 @@ void RimSummaryPlot::defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering
{
caf::PdmUiTreeOrdering* axisFolder = uiTreeOrdering.add("Axes", ":/Axes16x16.png");
if (!m_isCrossPlot())
if (!m_isCrossPlot)
{
axisFolder->add(&m_timeAxisProperties);
}

View File

@ -56,8 +56,6 @@ public:
QString description() const;
void setShowDescription(bool showDescription);
void setAsCrossPlot();
void addCurveAndUpdate(RimSummaryCurve* curve);
void addCurveNoUpdate(RimSummaryCurve* curve);
@ -122,6 +120,8 @@ protected:
virtual QImage snapshotWindowContent() override;
void setAsCrossPlot();
private:
std::vector<RimSummaryCurve*> visibleSummaryCurvesForAxis(RiaDefines::PlotAxis plotAxis) const;
std::vector<RimGridTimeHistoryCurve*> visibleTimeHistoryCurvesForAxis(RiaDefines::PlotAxis plotAxis) const;
@ -156,5 +156,5 @@ private:
caf::PdmChildArrayField<RimSummaryCurve*> m_summaryCurves_OBSOLETE;
caf::PdmChildArrayField<RimSummaryCurveFilter*> m_curveFilters_OBSOLETE;
caf::PdmField<bool> m_isCrossPlot;
bool m_isCrossPlot;
};