Make the refactored RFT and PLT plots work

This commit is contained in:
Gaute Lindkvist
2019-09-04 20:18:18 +02:00
parent b9d78152e1
commit 42f494be5f
10 changed files with 6 additions and 345 deletions

View File

@@ -57,8 +57,6 @@
#include "RimWellPathCollection.h"
#include "RimWellPlotTools.h"
#include "RiuWellPltPlot.h"
#include "cafPdmUiTreeOrdering.h"
#include "cafPdmUiTreeSelectionEditor.h"
#include "cafVecIjk.h"
@@ -1089,12 +1087,3 @@ void RimWellPltPlot::onLoadDataAndUpdate()
updateFormationsOnPlot();
syncCurvesFromUiSelection();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QWidget* RimWellPltPlot::createViewWidget(QWidget* mainWindowParent)
{
m_viewer = new RiuWellLogPlot(this, mainWindowParent);
return m_viewer;
}

View File

@@ -106,8 +106,6 @@ private:
// RimViewWindow overrides
QWidget* createViewWidget(QWidget* mainWindowParent) override;
void setPlotXAxisTitles(RimWellLogTrack* plotTrack);
void updateFormationsOnPlot() const;

View File

@@ -53,7 +53,6 @@
#include "RimWellPltPlot.h"
#include "RiuWellLogTrack.h"
#include "RiuWellRftPlot.h"
#include "cafPdmUiTreeOrdering.h"
#include "cafPdmUiTreeSelectionEditor.h"
@@ -89,6 +88,8 @@ RimWellRftPlot::RimWellRftPlot()
m_wellLogPlot_OBSOLETE->setDepthType(RimWellLogPlot::TRUE_VERTICAL_DEPTH);
m_wellLogPlot_OBSOLETE.xmlCapability()->setIOWritable(false);
m_depthType = RimWellLogPlot::TRUE_VERTICAL_DEPTH;
CAF_PDM_InitFieldNoDefault(&m_wellPathNameOrSimWellName, "WellName", "Well Name", "", "", "");
CAF_PDM_InitField(&m_branchIndex, "BranchIndex", 0, "Branch Index", "", "", "");
CAF_PDM_InitField(&m_branchDetection,
@@ -522,7 +523,7 @@ void RimWellRftPlot::updateCurvesInPlot(const std::set<RiaRftPltCurveDefinition>
assignWellPathToExtractionCurves();
}
loadDataAndUpdate();
RimWellLogPlot::onLoadDataAndUpdate();
if (plotTrack->curveCount())
{
zoomAll();
@@ -957,15 +958,6 @@ void RimWellRftPlot::assignWellPathToExtractionCurves()
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QWidget* RimWellRftPlot::createViewWidget(QWidget* mainWindowParent)
{
m_viewer = new RiuWellLogPlot(this, mainWindowParent);
return m_viewer;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@@ -114,8 +114,6 @@ private:
// RimViewWindow overrides
QWidget* createViewWidget(QWidget* mainWindowParent) override;
void applyCurveAppearance(RimWellLogCurve* newCurve);
void updateFormationsOnPlot() const;

View File

@@ -58,8 +58,6 @@ ${CMAKE_CURRENT_LIST_DIR}/RiuFemTimeHistoryResultAccessor.h
${CMAKE_CURRENT_LIST_DIR}/RiuEditPerforationCollectionWidget.h
${CMAKE_CURRENT_LIST_DIR}/RiuAdvancedSnapshotExportWidget.h
${CMAKE_CURRENT_LIST_DIR}/RiuWellAllocationPlot.h
${CMAKE_CURRENT_LIST_DIR}/RiuWellRftPlot.h
${CMAKE_CURRENT_LIST_DIR}/RiuWellPltPlot.h
${CMAKE_CURRENT_LIST_DIR}/RiuFlowCharacteristicsPlot.h
${CMAKE_CURRENT_LIST_DIR}/RiuNightchartsWidget.h
${CMAKE_CURRENT_LIST_DIR}/RiuMessagePanel.h
@@ -144,8 +142,6 @@ ${CMAKE_CURRENT_LIST_DIR}/RiuFemTimeHistoryResultAccessor.cpp
${CMAKE_CURRENT_LIST_DIR}/RiuEditPerforationCollectionWidget.cpp
${CMAKE_CURRENT_LIST_DIR}/RiuAdvancedSnapshotExportWidget.cpp
${CMAKE_CURRENT_LIST_DIR}/RiuWellAllocationPlot.cpp
${CMAKE_CURRENT_LIST_DIR}/RiuWellRftPlot.cpp
${CMAKE_CURRENT_LIST_DIR}/RiuWellPltPlot.cpp
${CMAKE_CURRENT_LIST_DIR}/RiuFlowCharacteristicsPlot.cpp
${CMAKE_CURRENT_LIST_DIR}/RiuNightchartsWidget.cpp
${CMAKE_CURRENT_LIST_DIR}/RiuMessagePanel.cpp
@@ -210,8 +206,6 @@ ${CMAKE_CURRENT_LIST_DIR}/RiuCvfOverlayItemWidget.h
${CMAKE_CURRENT_LIST_DIR}/RiuEditPerforationCollectionWidget.h
${CMAKE_CURRENT_LIST_DIR}/RiuAdvancedSnapshotExportWidget.h
${CMAKE_CURRENT_LIST_DIR}/RiuWellAllocationPlot.h
${CMAKE_CURRENT_LIST_DIR}/RiuWellRftPlot.h
${CMAKE_CURRENT_LIST_DIR}/RiuWellPltPlot.h
${CMAKE_CURRENT_LIST_DIR}/RiuFlowCharacteristicsPlot.h
${CMAKE_CURRENT_LIST_DIR}/RiuNightchartsWidget.h
${CMAKE_CURRENT_LIST_DIR}/RiuMessagePanel.h

View File

@@ -27,6 +27,7 @@
#include "RiuMainWindow.h"
#include "RiuPlotMainWindow.h"
#include "RiuPlotObjectPicker.h"
#include "RiuWellLogTrack.h"
#include "cafSelectionManager.h"
@@ -55,6 +56,8 @@ RiuWellLogPlot::RiuWellLogPlot(RimWellLogPlot* plotDefinition, QWidget* parent)
Q_ASSERT(plotDefinition);
m_plotDefinition = plotDefinition;
new RiuPlotObjectPicker(m_plotTitle, m_plotDefinition);
QPalette newPalette(palette());
newPalette.setColor(QPalette::Background, Qt::white);
setPalette(newPalette);

View File

@@ -1,99 +0,0 @@
/////////////////////////////////////////////////////////////////////////////////
//
// 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 "RiuWellPltPlot.h"
#include "RiaApplication.h"
#include "RimContextCommandBuilder.h"
#include "RimTotalWellAllocationPlot.h"
#include "RimWellPltPlot.h"
#include "RimWellLogPlot.h"
#include "RimWellLogTrack.h"
#include "RimTofAccumulatedPhaseFractionsPlot.h"
#include "RiuContextMenuLauncher.h"
#include "RiuNightchartsWidget.h"
#include "RiuPlotObjectPicker.h"
#include "cvfColor3.h"
#include <QBoxLayout>
#include <QContextMenuEvent>
#include <QLabel>
#include <QMenu>
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RiuWellPltPlot::RiuWellPltPlot(RimWellPltPlot* plotDefinition, QWidget* parent)
: RiuWellLogPlot(plotDefinition, parent)
{
Q_ASSERT(m_plotDefinition);
QVBoxLayout* mainLayout = new QVBoxLayout();
this->setLayout(mainLayout);
this->layout()->setMargin(0);
this->layout()->setSpacing(2);
new RiuPlotObjectPicker(m_plotTitle, m_plotDefinition);
mainLayout->addWidget(m_plotTitle, 0, Qt::AlignCenter);
auto plotWidgetsLayout = new QHBoxLayout();
auto rightColumnLayout = new QVBoxLayout();
mainLayout->addLayout(plotWidgetsLayout);
plotWidgetsLayout->addLayout(rightColumnLayout);
QWidget* wellFlowWidget = m_plotDefinition->createPlotWidget();
plotWidgetsLayout->addWidget(wellFlowWidget);
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RiuWellPltPlot::~RiuWellPltPlot()
{
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QSize RiuWellPltPlot::minimumSizeHint() const
{
return QSize(0, 100);
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiuWellPltPlot::contextMenuEvent(QContextMenuEvent* event)
{
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QSize RiuWellPltPlot::sizeHint() const
{
return QSize(0, 0);
}

View File

@@ -1,57 +0,0 @@
/////////////////////////////////////////////////////////////////////////////////
//
// 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 "RiuWellLogPlot.h"
#include "cafPdmPointer.h"
#include "qwt_plot.h"
#include <QPointer>
#include <QFrame>
class RimWellPltPlot;
class RiuNightchartsWidget;
class QLabel;
namespace cvf {
class Color3f;
}
//==================================================================================================
//
//
//
//==================================================================================================
class RiuWellPltPlot : public RiuWellLogPlot
{
Q_OBJECT;
public:
RiuWellPltPlot(RimWellPltPlot* plotDefinition, QWidget* parent = nullptr);
~RiuWellPltPlot() override;
protected:
QSize sizeHint() const override;
QSize minimumSizeHint() const override;
void contextMenuEvent(QContextMenuEvent *) override;
};

View File

@@ -1,99 +0,0 @@
/////////////////////////////////////////////////////////////////////////////////
//
// 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 "RiuWellRftPlot.h"
#include "RiaApplication.h"
#include "RimContextCommandBuilder.h"
#include "RimTotalWellAllocationPlot.h"
#include "RimWellRftPlot.h"
#include "RimWellLogPlot.h"
#include "RimWellLogTrack.h"
#include "RimTofAccumulatedPhaseFractionsPlot.h"
#include "RiuContextMenuLauncher.h"
#include "RiuNightchartsWidget.h"
#include "RiuPlotObjectPicker.h"
#include "cvfColor3.h"
#include <QBoxLayout>
#include <QContextMenuEvent>
#include <QLabel>
#include <QMenu>
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RiuWellRftPlot::RiuWellRftPlot(RimWellRftPlot* plotDefinition, QWidget* parent)
: RiuWellLogPlot(plotDefinition, parent)
{
Q_ASSERT(m_plotDefinition);
QVBoxLayout* mainLayout = new QVBoxLayout();
this->setLayout(mainLayout);
this->layout()->setMargin(0);
this->layout()->setSpacing(2);
new RiuPlotObjectPicker(m_plotTitle, m_plotDefinition);
mainLayout->addWidget(m_plotTitle, 0, Qt::AlignCenter);
auto plotWidgetsLayout = new QHBoxLayout();
auto rightColumnLayout = new QVBoxLayout();
mainLayout->addLayout(plotWidgetsLayout);
plotWidgetsLayout->addLayout(rightColumnLayout);
QWidget* wellFlowWidget = m_plotDefinition->createPlotWidget();
plotWidgetsLayout->addWidget(wellFlowWidget);
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RiuWellRftPlot::~RiuWellRftPlot()
{
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QSize RiuWellRftPlot::minimumSizeHint() const
{
return QSize(0, 100);
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiuWellRftPlot::contextMenuEvent(QContextMenuEvent* event)
{
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QSize RiuWellRftPlot::sizeHint() const
{
return QSize(0, 0);
}

View File

@@ -1,58 +0,0 @@
/////////////////////////////////////////////////////////////////////////////////
//
// 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 "qwt_plot.h"
#include "cafPdmPointer.h"
#include <QPointer>
#include <QFrame>
#include "RiuInterfaceToViewWindow.h"
#include "RiuWellLogPlot.h"
class RimWellRftPlot;
class RiuNightchartsWidget;
class QLabel;
namespace cvf {
class Color3f;
}
//==================================================================================================
//
//
//
//==================================================================================================
class RiuWellRftPlot : public RiuWellLogPlot
{
Q_OBJECT;
public:
RiuWellRftPlot(RimWellRftPlot* plotDefinition, QWidget* parent = nullptr);
~RiuWellRftPlot() override;
protected:
QSize sizeHint() const override;
QSize minimumSizeHint() const override;
void contextMenuEvent(QContextMenuEvent *) override;
};