#1948 PLT plot. Initial version, RFT plot copy

This commit is contained in:
Bjørn Erik Jensen 2017-10-23 13:57:01 +02:00
parent be8c227313
commit a35329555b
21 changed files with 2440 additions and 2 deletions

View File

@ -48,6 +48,7 @@
#include "RimFlowPlotCollection.h"
#include "RimFormationNamesCollection.h"
#include "RimRftPlotCollection.h"
#include "RimPltPlotCollection.h"
#include "RimEclipseCase.h"
#include "RimGeoMechCase.h"
@ -61,7 +62,6 @@
#include "RimOilField.h"
#include "RimProject.h"
#include "RimReservoirCellResultsStorage.h"
#include "RimRftPlotCollection.h"
#include "RimScriptCollection.h"
#include "RimSummaryCase.h"
#include "RimSummaryCaseMainCollection.h"
@ -77,6 +77,7 @@
#include "RimWellPath.h"
#include "RimWellPathCollection.h"
#include "RimWellRftPlot.h"
#include "RimWellPltPlot.h"
#include "RiuMainPlotWindow.h"
#include "RiuMainWindow.h"
@ -622,6 +623,7 @@ void RiaApplication::loadAndUpdatePlotData()
RimSummaryPlotCollection* spColl = nullptr;
RimFlowPlotCollection* flowColl = nullptr;
RimRftPlotCollection* rftColl = nullptr;
RimPltPlotCollection* pltColl = nullptr;
if (m_project->mainPlotCollection() && m_project->mainPlotCollection()->wellLogPlotCollection())
{
@ -639,12 +641,17 @@ void RiaApplication::loadAndUpdatePlotData()
{
rftColl = m_project->mainPlotCollection()->rftPlotCollection();
}
if (m_project->mainPlotCollection() && m_project->mainPlotCollection()->pltPlotCollection())
{
pltColl = m_project->mainPlotCollection()->pltPlotCollection();
}
size_t plotCount = 0;
plotCount += wlpColl ? wlpColl->wellLogPlots().size() : 0;
plotCount += spColl ? spColl->summaryPlots().size() : 0;
plotCount += flowColl ? flowColl->plotCount() : 0;
plotCount += rftColl ? rftColl->rftPlots().size() : 0;
plotCount += pltColl ? pltColl->pltPlots().size() : 0;
caf::ProgressInfo plotProgress(plotCount, "Loading Plot Data");
if (wlpColl)
@ -680,6 +687,15 @@ void RiaApplication::loadAndUpdatePlotData()
plotProgress.incrementProgress();
}
}
if (pltColl)
{
for (const auto& pltPlot : pltColl->pltPlots())
{
pltPlot->loadDataAndUpdate();
plotProgress.incrementProgress();
}
}
}
//--------------------------------------------------------------------------------------------------

View File

@ -10,6 +10,8 @@ ${CEE_CURRENT_LIST_DIR}RicNewWellLogCurveExtractionFeature.h
${CEE_CURRENT_LIST_DIR}RicNewWellLogRftCurveFeature.h
${CEE_CURRENT_LIST_DIR}RicNewRftPlotFeature.h
${CEE_CURRENT_LIST_DIR}RicDeleteRftPlotFeature.h
${CEE_CURRENT_LIST_DIR}RicNewPltPlotFeature.h
${CEE_CURRENT_LIST_DIR}RicDeletePltPlotFeature.h
${CEE_CURRENT_LIST_DIR}RicNewWellLogFileCurveFeature.h
${CEE_CURRENT_LIST_DIR}RicNewWellLogPlotFeature.h
${CEE_CURRENT_LIST_DIR}RicNewWellLogPlotFeatureImpl.h
@ -33,6 +35,8 @@ ${CEE_CURRENT_LIST_DIR}RicNewWellLogCurveExtractionFeature.cpp
${CEE_CURRENT_LIST_DIR}RicNewWellLogRftCurveFeature.cpp
${CEE_CURRENT_LIST_DIR}RicNewRftPlotFeature.cpp
${CEE_CURRENT_LIST_DIR}RicDeleteRftPlotFeature.cpp
${CEE_CURRENT_LIST_DIR}RicNewPltPlotFeature.cpp
${CEE_CURRENT_LIST_DIR}RicDeletePltPlotFeature.cpp
${CEE_CURRENT_LIST_DIR}RicNewWellLogFileCurveFeature.cpp
${CEE_CURRENT_LIST_DIR}RicNewWellLogPlotFeature.cpp
${CEE_CURRENT_LIST_DIR}RicNewWellLogPlotFeatureImpl.cpp

View File

@ -0,0 +1,78 @@
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2015- Statoil ASA
// Copyright (C) 2015- Ceetron Solutions AS
//
// 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 "RicDeletePltPlotFeature.h"
#include "RimPltPlotCollection.h"
#include "RimWellPltPlot.h"
#include "cafSelectionManager.h"
#include <QAction>
CAF_CMD_SOURCE_INIT(RicDeletePltPlotFeature, "RicDeletePltPlotFeature");
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RicDeletePltPlotFeature::isCommandEnabled()
{
std::vector<RimWellPltPlot*> objects;
caf::SelectionManager::instance()->objectsByType(&objects);
if (objects.size() > 0)
{
return true;
}
return false;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RicDeletePltPlotFeature::onActionTriggered(bool isChecked)
{
std::vector<RimWellPltPlot*> selectedPlots;
caf::SelectionManager::instance()->objectsByType(&selectedPlots);
if (selectedPlots.size() == 0) return;
RimWellPltPlot* firstPlot = selectedPlots[0];
RimPltPlotCollection* pltPlotCollection = nullptr;
firstPlot->firstAncestorOrThisOfType(pltPlotCollection);
if (!pltPlotCollection) return;
for (RimWellPltPlot* plot : selectedPlots)
{
pltPlotCollection->removePlot(plot);
delete plot;
}
pltPlotCollection->uiCapability()->updateConnectedEditors();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RicDeletePltPlotFeature::setupActionLook(QAction* actionToSetup)
{
actionToSetup->setText("Delete PLT Plot");
actionToSetup->setIcon(QIcon(":/Erase.png"));
}

View File

@ -0,0 +1,36 @@
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2015- Statoil ASA
// Copyright (C) 2015- Ceetron Solutions AS
//
// 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 "cafCmdFeature.h"
//==================================================================================================
///
//==================================================================================================
class RicDeletePltPlotFeature : public caf::CmdFeature
{
CAF_CMD_HEADER_INIT;
protected:
// Overrides
virtual bool isCommandEnabled() override;
virtual void onActionTriggered( bool isChecked ) override;
virtual void setupActionLook( QAction* actionToSetup ) override;
};

View File

@ -0,0 +1,184 @@
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2015- Statoil ASA
// Copyright (C) 2015- Ceetron Solutions AS
//
// 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 "RicNewPltPlotFeature.h"
#include "RicWellLogPlotCurveFeatureImpl.h"
#include "RicNewWellLogPlotFeatureImpl.h"
#include "RiaApplication.h"
#include "RigWellLogCurveData.h"
#include "RimProject.h"
#include "RimSimWellInView.h"
#include "RimView.h"
#include "RimWellLogExtractionCurve.h"
#include "RimWellPltPlot.h"
#include "RimWellLogPlot.h"
#include "RimWellLogTrack.h"
#include "RimWellPath.h"
#include "RimPltPlotCollection.h"
#include "RimMainPlotCollection.h"
#include "RimEclipseResultCase.h"
#include "RiuMainPlotWindow.h"
#include "RiuSelectionManager.h"
#include "cafSelectionManagerTools.h"
#include <QAction>
#include <vector>
CAF_CMD_SOURCE_INIT(RicNewPltPlotFeature, "RicNewPltPlotFeature");
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RicNewPltPlotFeature::isCommandEnabled()
{
if (RicWellLogPlotCurveFeatureImpl::parentWellAllocationPlot()) return false;
RimSimWellInView* simWell = caf::firstAncestorOfTypeFromSelectedObject<RimSimWellInView*>();
RimWellPath* rimWellPath = simWell == nullptr ? caf::firstAncestorOfTypeFromSelectedObject<RimWellPath*>() : nullptr;
bool enable = true;
if (simWell != nullptr)
{
RimEclipseResultCase* eclCase = caf::firstAncestorOfTypeFromSelectedObject<RimEclipseResultCase*>();
if (simWell != nullptr)
{
enable &= RimWellPltPlot::hasPressureData(eclCase);
}
}
else if (rimWellPath)
{
enable &= RimWellPltPlot::hasPressureData(rimWellPath);
}
return enable;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RicNewPltPlotFeature::onActionTriggered(bool isChecked)
{
RimProject* proj = RiaApplication::instance()->project();
RimPltPlotCollection* pltPlotColl = proj->mainPlotCollection()->pltPlotCollection();
if (pltPlotColl)
{
QString wellName;
RimWellPath* wellPath = nullptr;
RimSimWellInView* eclipseWell = nullptr;
if ((wellPath = caf::firstAncestorOfTypeFromSelectedObject<RimWellPath*>()) != nullptr)
{
wellName = wellPath->name();
}
else if ((eclipseWell = caf::firstAncestorOfTypeFromSelectedObject<RimSimWellInView*>()) != nullptr)
{
wellName = eclipseWell->name();
}
QString plotName = QString(RimWellPltPlot::plotNameFormatString()).arg(wellName);
RimWellPltPlot* pltPlot = new RimWellPltPlot();
pltPlot->setCurrentWellName(wellName);
RimWellLogTrack* plotTrack = new RimWellLogTrack();
pltPlot->wellLogPlot()->addTrack(plotTrack);
plotTrack->setDescription(QString("Track %1").arg(pltPlot->wellLogPlot()->trackCount()));
pltPlotColl->addPlot(pltPlot);
pltPlot->setDescription(plotName);
pltPlot->applyInitialSelections();
pltPlot->loadDataAndUpdate();
pltPlotColl->updateConnectedEditors();
RiuMainPlotWindow* mainPlotWindow = RiaApplication::instance()->getOrCreateAndShowMainPlotWindow();
if (mainPlotWindow)
{
mainPlotWindow->setExpanded(plotTrack);
mainPlotWindow->selectAsCurrentItem(pltPlot);
}
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RicNewPltPlotFeature::setupActionLook(QAction* actionToSetup)
{
actionToSetup->setText("New PLT Plot");
actionToSetup->setIcon(QIcon(":/SummaryPlot16x16.png"));
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimWellLogTrack* RicNewPltPlotFeature::selectedWellLogPlotTrack() const
{
auto selection = caf::selectedObjectsByType<RimWellLogTrack*>();
return selection.size() > 0 ? selection[0] : nullptr;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimWellPath* RicNewPltPlotFeature::selectedWellPath() const
{
auto selection = caf::selectedObjectsByType<RimWellPath*>();
return selection.size() > 0 ? selection[0] : nullptr;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimSimWellInView* RicNewPltPlotFeature::selectedSimulationWell(int * branchIndex) const
{
RiuSelectionItem* selItem = RiuSelectionManager::instance()->selectedItem(RiuSelectionManager::RUI_TEMPORARY);
RiuSimWellSelectionItem* simWellSelItem = dynamic_cast<RiuSimWellSelectionItem*>(selItem);
if (simWellSelItem)
{
(*branchIndex) = static_cast<int>(simWellSelItem->m_branchIndex);
return simWellSelItem->m_simWell;
}
else
{
std::vector<RimSimWellInView*> selection;
caf::SelectionManager::instance()->objectsByType(&selection);
(*branchIndex) = 0;
return selection.size() > 0 ? selection[0] : nullptr;
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RicNewPltPlotFeature::caseAvailable() const
{
std::vector<RimCase*> cases;
RiaApplication::instance()->project()->allCases(cases);
return cases.size() > 0;
}

View File

@ -0,0 +1,52 @@
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2015- Statoil ASA
// Copyright (C) 2015- Ceetron Solutions AS
//
// 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 "cafCmdFeature.h"
class RimSimWellInView;
class RimView;
class RimWellLogExtractionCurve;
class RimWellLogTrack;
class RimWellPath;
class RimPltPlotCollection;
class RimWellPltPlot;
//==================================================================================================
///
//==================================================================================================
class RicNewPltPlotFeature : public caf::CmdFeature
{
CAF_CMD_HEADER_INIT;
protected:
// Overrides
virtual bool isCommandEnabled();
virtual void onActionTriggered( bool isChecked );
virtual void setupActionLook( QAction* actionToSetup );
private:
RimWellLogTrack* selectedWellLogPlotTrack() const;
RimWellPath* selectedWellPath() const;
RimSimWellInView* selectedSimulationWell(int * branchIndex) const;
bool caseAvailable() const;
};

View File

@ -66,6 +66,7 @@ ${CEE_CURRENT_LIST_DIR}RimViewController.h
${CEE_CURRENT_LIST_DIR}RimMainPlotCollection.h
${CEE_CURRENT_LIST_DIR}RimWellLogPlotCollection.h
${CEE_CURRENT_LIST_DIR}RimRftPlotCollection.h
${CEE_CURRENT_LIST_DIR}RimPltPlotCollection.h
${CEE_CURRENT_LIST_DIR}RimWellLogPlot.h
${CEE_CURRENT_LIST_DIR}RimWellLogTrack.h
${CEE_CURRENT_LIST_DIR}RimWellLogCurve.h
@ -166,6 +167,7 @@ ${CEE_CURRENT_LIST_DIR}RimViewController.cpp
${CEE_CURRENT_LIST_DIR}RimMainPlotCollection.cpp
${CEE_CURRENT_LIST_DIR}RimWellLogPlotCollection.cpp
${CEE_CURRENT_LIST_DIR}RimRftPlotCollection.cpp
${CEE_CURRENT_LIST_DIR}RimPltPlotCollection.cpp
${CEE_CURRENT_LIST_DIR}RimWellLogPlot.cpp
${CEE_CURRENT_LIST_DIR}RimWellLogTrack.cpp
${CEE_CURRENT_LIST_DIR}RimWellLogCurve.cpp

View File

@ -14,6 +14,7 @@ ${CEE_CURRENT_LIST_DIR}RimWellFlowRateCurve.h
${CEE_CURRENT_LIST_DIR}RimWellAllocationPlotLegend.h
${CEE_CURRENT_LIST_DIR}RimFlowCharacteristicsPlot.h
${CEE_CURRENT_LIST_DIR}RimWellRftPlot.h
${CEE_CURRENT_LIST_DIR}RimWellPltPlot.h
${CEE_CURRENT_LIST_DIR}RimWellRftAddress.h
)
@ -27,6 +28,7 @@ ${CEE_CURRENT_LIST_DIR}RimWellFlowRateCurve.cpp
${CEE_CURRENT_LIST_DIR}RimWellAllocationPlotLegend.cpp
${CEE_CURRENT_LIST_DIR}RimFlowCharacteristicsPlot.cpp
${CEE_CURRENT_LIST_DIR}RimWellRftPlot.cpp
${CEE_CURRENT_LIST_DIR}RimWellPltPlot.cpp
${CEE_CURRENT_LIST_DIR}RimWellRftAddress.cpp
)

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,165 @@
/////////////////////////////////////////////////////////////////////////////////
//
// 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 "RimViewWindow.h"
#include "cafPdmField.h"
#include "cafPdmObject.h"
#include "cafPdmPtrField.h"
#include "cvfCollection.h"
#include "RimWellRftAddress.h"
#include "RimPlotCurve.h"
#include <QPointer>
#include <QDate>
#include <QMetaType>
#include <set>
#include <map>
class RimEclipseCase;
class RimEclipseResultCase;
class RimWellLogCurve;
class RimWellLogFileChannel;
class RimWellLogPlot;
class RimWellPath;
class RiuWellPltPlot;
namespace cvf {
class Color3f;
}
namespace caf {
class PdmOptionItemInfo;
}
//==================================================================================================
///
///
//==================================================================================================
class RimWellPltPlot : public RimViewWindow
{
CAF_PDM_HEADER_INIT;
static const char PRESSURE_DATA_NAME[];
static const char PLOT_NAME_QFORMAT_STRING[];
public:
RimWellPltPlot();
virtual ~RimWellPltPlot();
void setDescription(const QString& description);
QString description() const;
virtual void loadDataAndUpdate() override;
virtual QWidget* viewWidget() override;
virtual void zoomAll() override;
RimWellLogPlot* wellLogPlot() const;
void setCurrentWellName(const QString& currWellName);
QString currentWellName() const;
static bool hasPressureData(const RimWellLogFile* wellLogFile);
static bool isPressureChannel(RimWellLogFileChannel* channel);
static bool hasPressureData(RimEclipseResultCase* gridCase);
static bool hasPressureData(RimWellPath* wellPath);
static const char* plotNameFormatString();
void applyInitialSelections();
protected:
// Overridden PDM methods
virtual caf::PdmFieldHandle* userDescriptionField() { return &m_userName; }
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
virtual QList<caf::PdmOptionItemInfo> calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool * useOptionsOnly) override;
virtual QImage snapshotWindowContent() override;
virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override;
private:
void addTimeStepToMap(std::map<QDateTime, std::set<RimWellRftAddress>>& destMap,
const std::pair<QDateTime, std::set<RimWellRftAddress>>& timeStepToAdd);
void addTimeStepsToMap(std::map<QDateTime, std::set<RimWellRftAddress>>& destMap,
const std::map<QDateTime, std::set<RimWellRftAddress>>& timeStepsToAdd);
void calculateValueOptionsForWells(QList<caf::PdmOptionItemInfo>& options);
void calculateValueOptionsForTimeSteps(const QString& wellName, QList<caf::PdmOptionItemInfo>& options);
void updateEditorsFromCurves();
void updateWidgetTitleWindowTitle();
void syncCurvesFromUiSelection();
std::vector<RimWellLogFile*> wellLogFilesContainingPressure(const QString& wellName) const;
RimWellLogFileChannel* getPressureChannelFromWellFile(const RimWellLogFile* wellLogFile) const;
RimWellPath* wellPathFromWellLogFile(const RimWellLogFile* wellLogFile) const;
std::vector<std::tuple<RimEclipseResultCase*, bool, bool>> eclipseCasesForWell(const QString& wellName) const;
std::vector<RimEclipseResultCase*> gridCasesFromEclipseCases(const std::vector<std::tuple<RimEclipseResultCase*, bool, bool>>& eclipseCasesTuple) const;
std::vector<RimEclipseResultCase*> rftCasesFromEclipseCases(const std::vector<std::tuple<RimEclipseResultCase*, bool, bool>>& eclipseCasesTuple) const;
std::map<QDateTime, std::set<RimWellRftAddress>> timeStepsFromRftCase(RimEclipseResultCase* gridCase) const;
std::map<QDateTime, std::set<RimWellRftAddress>> timeStepsFromGridCase(RimEclipseCase* gridCase) const;
std::map<QDateTime, std::set<RimWellRftAddress>> timeStepsFromWellLogFile(RimWellLogFile* wellLogFile) const;
std::map<QDateTime, std::set<RimWellRftAddress>> adjacentTimeSteps(const std::vector<std::pair<QDateTime, std::set<RimWellRftAddress>>>& allTimeSteps,
const std::pair<QDateTime, std::set<RimWellRftAddress>>& searchTimeStepPair);
static bool mapContainsTimeStep(const std::map<QDateTime, std::set<RimWellRftAddress>>& map, const QDateTime& timeStep);
std::set<std::pair<RimWellRftAddress, QDateTime>> selectedCurveDefs() const;
std::set<std::pair<RimWellRftAddress, QDateTime>> curveDefsFromCurves() const;
std::pair<RimWellRftAddress, QDateTime> curveDefFromCurve(const RimWellLogCurve* curve) const;
void updateCurvesInPlot(const std::set<std::pair<RimWellRftAddress, QDateTime>>& allCurveDefs,
const std::set<std::pair<RimWellRftAddress, QDateTime>>& curveDefsToAdd,
const std::set<RimWellLogCurve*>& curvesToDelete);
bool isOnlyGridSourcesSelected() const;
bool isAnySourceAddressSelected(const std::set<RimWellRftAddress>& addresses) const;
std::vector<RimWellRftAddress> selectedSources() const;
// RimViewWindow overrides
virtual QWidget* createViewWidget(QWidget* mainWindowParent) override;
virtual void deleteViewWidget() override;
void applyCurveAppearance(RimWellLogCurve* newCurve);
void updateSelectedTimeStepsFromSelectedSources();
private:
caf::PdmField<bool> m_showPlotTitle;
caf::PdmField<QString> m_userName;
caf::PdmField<QString> m_wellName;
caf::PdmField<int> m_branchIndex;
caf::PdmField<std::vector<RimWellRftAddress>> m_selectedSources;
caf::PdmField<std::vector<QDateTime>> m_selectedTimeSteps;
QPointer<RiuWellPltPlot> m_wellLogPlotWidget;
caf::PdmChildField<RimWellLogPlot*> m_wellLogPlot;
std::map<QDateTime, std::set<RimWellRftAddress>> m_timeStepsToAddresses;
bool m_selectedSourcesOrTimeStepsFieldsChanged;
};

View File

@ -67,6 +67,9 @@
#include "RimWellPath.h"
#include "RimWellPathCollection.h"
#include "RimWellRftPlot.h"
#include "RimWellPltPlot.h"
#include "RimRftPlotCollection.h"
#include "RimPltPlotCollection.h"
#ifdef USE_PROTOTYPE_FEATURE_FRACTURES
#include "RimEllipseFractureTemplate.h"
@ -89,7 +92,6 @@
#include <vector>
#include <QMenu>
#include "RimRftPlotCollection.h"
//--------------------------------------------------------------------------------------------------
///
@ -224,6 +226,7 @@ QStringList RimContextCommandBuilder::commandsFromSelection()
else if (dynamic_cast<RimWellPath*>(uiItem))
{
commandIds << "RicNewRftPlotFeature";
commandIds << "RicNewPltPlotFeature";
commandIds << "RicNewWellLogFileCurveFeature";
commandIds << "RicNewWellLogCurveExtractionFeature";
commandIds << "RicNewWellPathIntersectionFeature";
@ -232,6 +235,10 @@ QStringList RimContextCommandBuilder::commandsFromSelection()
{
commandIds << "RicDeleteRftPlotFeature";
}
else if (dynamic_cast<RimWellPltPlot*>(uiItem))
{
commandIds << "RicDeletePltPlotFeature";
}
else if (dynamic_cast<RimCalcScript*>(uiItem))
{
commandIds << "RicEditScriptFeature";
@ -269,6 +276,10 @@ QStringList RimContextCommandBuilder::commandsFromSelection()
{
commandIds << "RicNewRftPlotFeature";
}
else if (dynamic_cast<RimPltPlotCollection*>(uiItem))
{
commandIds << "RicNewPltPlotFeature";
}
else if (dynamic_cast<RimSummaryPlotCollection*>(uiItem))
{
commandIds << "RicPasteSummaryPlotFeature";
@ -370,6 +381,7 @@ QStringList RimContextCommandBuilder::commandsFromSelection()
commandIds << "RicNewWellLogRftCurveFeature";
commandIds << "RicNewSimWellIntersectionFeature";
commandIds << "RicNewRftPlotFeature";
commandIds << "RicNewPltPlotFeature";
commandIds << "RicShowWellAllocationPlotFeature";
}
else if(dynamic_cast<RimFormationNames*>(uiItem))

View File

@ -23,6 +23,7 @@
#include "RimProject.h"
#include "RimSummaryPlotCollection.h"
#include "RimRftPlotCollection.h"
#include "RimPltPlotCollection.h"
#include "RimWellLogPlotCollection.h"
#include "RiuMainWindow.h"
@ -47,6 +48,9 @@ RimMainPlotCollection::RimMainPlotCollection()
CAF_PDM_InitFieldNoDefault(&m_rftPlotCollection, "RftPlotCollection", "", "", "", "");
m_rftPlotCollection.uiCapability()->setUiHidden(true);
CAF_PDM_InitFieldNoDefault(&m_pltPlotCollection, "PltPlotCollection", "", "", "", "");
m_pltPlotCollection.uiCapability()->setUiHidden(true);
CAF_PDM_InitFieldNoDefault(&m_summaryPlotCollection, "SummaryPlotCollection", "Summary Plots", "", "", "");
m_summaryPlotCollection.uiCapability()->setUiHidden(true);
@ -55,6 +59,7 @@ RimMainPlotCollection::RimMainPlotCollection()
m_wellLogPlotCollection = new RimWellLogPlotCollection();
m_rftPlotCollection = new RimRftPlotCollection();
m_pltPlotCollection = new RimPltPlotCollection();
m_summaryPlotCollection = new RimSummaryPlotCollection();
m_flowPlotCollection = new RimFlowPlotCollection();
@ -67,6 +72,7 @@ RimMainPlotCollection::~RimMainPlotCollection()
{
if (m_wellLogPlotCollection()) delete m_wellLogPlotCollection();
if (m_rftPlotCollection()) delete m_rftPlotCollection();
if (m_pltPlotCollection()) delete m_pltPlotCollection();
if (m_summaryPlotCollection()) delete m_summaryPlotCollection();
if (m_flowPlotCollection()) delete m_flowPlotCollection();
@ -104,6 +110,14 @@ RimRftPlotCollection* RimMainPlotCollection::rftPlotCollection()
return m_rftPlotCollection();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimPltPlotCollection* RimMainPlotCollection::pltPlotCollection()
{
return m_pltPlotCollection();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@ -127,6 +141,7 @@ void RimMainPlotCollection::deleteAllContainedObjects()
{
m_wellLogPlotCollection()->wellLogPlots.deleteAllChildObjects();
m_rftPlotCollection()->deleteAllPlots();
m_pltPlotCollection()->deleteAllPlots();
m_summaryPlotCollection()->summaryPlots.deleteAllChildObjects();
m_flowPlotCollection()->closeDefaultPlotWindowAndDeletePlots();

View File

@ -29,6 +29,7 @@
class RimWellLogPlotCollection;
class RimRftPlotCollection;
class RimPltPlotCollection;
class RimSummaryPlotCollection;
class RimSummaryPlot;
class RifReaderEclipseSummary;
@ -49,6 +50,7 @@ public:
RimWellLogPlotCollection* wellLogPlotCollection();
RimRftPlotCollection* rftPlotCollection();
RimPltPlotCollection* pltPlotCollection();
RimSummaryPlotCollection* summaryPlotCollection();
RimFlowPlotCollection* flowPlotCollection();
@ -63,6 +65,7 @@ protected:
caf::PdmChildField<RimWellLogPlotCollection*> m_wellLogPlotCollection;
caf::PdmChildField<RimRftPlotCollection*> m_rftPlotCollection;
caf::PdmChildField<RimPltPlotCollection*> m_pltPlotCollection;
caf::PdmChildField<RimSummaryPlotCollection*> m_summaryPlotCollection;
caf::PdmChildField<RimFlowPlotCollection*> m_flowPlotCollection;

View File

@ -0,0 +1,225 @@
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2015- Statoil ASA
// Copyright (C) 2015- Ceetron Solutions AS
//
// 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 "RimPltPlotCollection.h"
#include "RigEclipseWellLogExtractor.h"
#include "RigGeoMechCaseData.h"
#include "RigGeoMechWellLogExtractor.h"
#include "RimEclipseCase.h"
#include "RimGeoMechCase.h"
#include "RimWellLogPlot.h"
#include "RimWellPltPlot.h"
#include "RimWellPath.h"
#include "RimWellPathCollection.h"
#include "cvfAssert.h"
CAF_PDM_SOURCE_INIT(RimPltPlotCollection, "WellPltPlotCollection");
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimPltPlotCollection::RimPltPlotCollection()
{
CAF_PDM_InitObject("PLT Plots", ":/WellLogPlots16x16.png", "", "");
CAF_PDM_InitFieldNoDefault(&m_pltPlots, "PltPlots", "", "", "", "");
m_pltPlots.uiCapability()->setUiHidden(true);
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimPltPlotCollection::~RimPltPlotCollection()
{
m_pltPlots.deleteAllChildObjects();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RigEclipseWellLogExtractor* RimPltPlotCollection::findOrCreateSimWellExtractor(const QString& simWellName,
const QString& caseUserDescription,
const RigWellPath* wellPathGeom,
const RigEclipseCaseData* eclCaseData)
{
if (!(wellPathGeom && eclCaseData))
{
return nullptr;
}
for (size_t exIdx = 0; exIdx < m_extractors.size(); ++exIdx)
{
if (m_extractors[exIdx]->caseData() == eclCaseData && m_extractors[exIdx]->wellPathData() == wellPathGeom)
{
return m_extractors[exIdx].p();
}
}
std::string errorIdName = (simWellName + " " + caseUserDescription).toStdString();
cvf::ref<RigEclipseWellLogExtractor> extractor = new RigEclipseWellLogExtractor(eclCaseData, wellPathGeom, errorIdName);
m_extractors.push_back(extractor.p());
return extractor.p();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RigEclipseWellLogExtractor* RimPltPlotCollection::findOrCreateExtractor(RimWellPath* wellPath, RimEclipseCase* eclCase)
{
if (!(wellPath && eclCase && wellPath->wellPathGeometry() && eclCase->eclipseCaseData()))
{
return NULL;
}
RigEclipseCaseData* eclCaseData = eclCase->eclipseCaseData();
RigWellPath* wellPathGeom = wellPath->wellPathGeometry();
for (size_t exIdx = 0; exIdx < m_extractors.size(); ++exIdx)
{
if (m_extractors[exIdx]->caseData() == eclCaseData && m_extractors[exIdx]->wellPathData() == wellPathGeom)
{
return m_extractors[exIdx].p();
}
}
std::string errorIdName = (wellPath->name() + " " + eclCase->caseUserDescription()).toStdString();
cvf::ref<RigEclipseWellLogExtractor> extractor = new RigEclipseWellLogExtractor(eclCaseData, wellPathGeom, errorIdName);
m_extractors.push_back(extractor.p());
return extractor.p();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RigGeoMechWellLogExtractor* RimPltPlotCollection::findOrCreateExtractor(RimWellPath* wellPath, RimGeoMechCase* geomCase)
{
if (!(wellPath && geomCase && wellPath->wellPathGeometry() && geomCase->geoMechData()))
{
return NULL;
}
RigGeoMechCaseData* geomCaseData = geomCase->geoMechData();
RigWellPath* wellPathGeom = wellPath->wellPathGeometry();
for (size_t exIdx = 0; exIdx < m_geomExtractors.size(); ++exIdx)
{
if (m_geomExtractors[exIdx]->caseData() == geomCaseData && m_geomExtractors[exIdx]->wellPathData() == wellPathGeom)
{
return m_geomExtractors[exIdx].p();
}
}
std::string errorIdName = (wellPath->name() + " " + geomCase->caseUserDescription()).toStdString();
cvf::ref<RigGeoMechWellLogExtractor> extractor = new RigGeoMechWellLogExtractor(geomCaseData, wellPathGeom, errorIdName);
m_geomExtractors.push_back(extractor.p());
return extractor.p();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimPltPlotCollection::removeExtractors(const RigWellPath* wellPath)
{
for (int eIdx = (int) m_extractors.size() - 1; eIdx >= 0; eIdx--)
{
if (m_extractors[eIdx]->wellPathData() == wellPath)
{
m_extractors.eraseAt(eIdx);
}
}
for (int eIdx = (int) m_geomExtractors.size() - 1; eIdx >= 0; eIdx--)
{
if (m_geomExtractors[eIdx]->wellPathData() == wellPath)
{
m_geomExtractors.eraseAt(eIdx);
}
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimPltPlotCollection::removeExtractors(const RigEclipseCaseData* caseData)
{
for (int eIdx = (int) m_extractors.size() - 1; eIdx >= 0; eIdx--)
{
if (m_extractors[eIdx]->caseData() == caseData)
{
m_extractors.eraseAt(eIdx);
}
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimPltPlotCollection::removeExtractors(const RigGeoMechCaseData* caseData)
{
for (int eIdx = (int) m_geomExtractors.size() - 1; eIdx >= 0; eIdx--)
{
if (m_geomExtractors[eIdx]->caseData() == caseData)
{
m_geomExtractors.eraseAt(eIdx);
}
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
const std::vector<RimWellPltPlot*> RimPltPlotCollection::pltPlots() const
{
std::vector<RimWellPltPlot*> plots;
for (const auto& plot : m_pltPlots)
{
plots.push_back(plot);
}
return plots;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimPltPlotCollection::addPlot(RimWellPltPlot* newPlot)
{
m_pltPlots.push_back(newPlot);
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimPltPlotCollection::removePlot(RimWellPltPlot* plot)
{
size_t index = m_pltPlots.index(plot);
if (index < m_pltPlots.size())
m_pltPlots.erase(index);
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimPltPlotCollection::deleteAllPlots()
{
m_pltPlots.deleteAllChildObjects();
}

View File

@ -0,0 +1,71 @@
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2015- Statoil ASA
// Copyright (C) 2015- Ceetron Solutions AS
//
// 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 "cafPdmObject.h"
#include "cafPdmField.h"
#include "cafPdmChildArrayField.h"
#include "cvfCollection.h"
class RimWellLogPlot;
class RigEclipseWellLogExtractor;
class RigGeoMechWellLogExtractor;
class RimGeoMechCase;
class RigEclipseCaseData;
class RigGeoMechCaseData;
class RigWellPath;
class RimWellPath;
class RimEclipseCase;
class RiuWellLogPlot;
class RimWellPltPlot;
//==================================================================================================
///
///
//==================================================================================================
class RimPltPlotCollection : public caf::PdmObject
{
CAF_PDM_HEADER_INIT;
public:
RimPltPlotCollection();
virtual ~RimPltPlotCollection();
RigEclipseWellLogExtractor* findOrCreateSimWellExtractor(const QString& simWellName,
const QString& caseUserDescription,
const RigWellPath* wellPathGeom,
const RigEclipseCaseData* eclCaseData);
RigEclipseWellLogExtractor* findOrCreateExtractor(RimWellPath* wellPath, RimEclipseCase* eclCase);
RigGeoMechWellLogExtractor* findOrCreateExtractor(RimWellPath* wellPath, RimGeoMechCase* eclCase);
void removeExtractors(const RigWellPath* wellPath);
void removeExtractors(const RigEclipseCaseData* caseData);
void removeExtractors(const RigGeoMechCaseData* caseData);
const std::vector<RimWellPltPlot*> pltPlots() const;
void addPlot(RimWellPltPlot* newPlot);
void removePlot(RimWellPltPlot* plot);
void deleteAllPlots();
private:
caf::PdmChildArrayField<RimWellPltPlot*> m_pltPlots;
cvf::Collection<RigEclipseWellLogExtractor> m_extractors;
cvf::Collection<RigGeoMechWellLogExtractor> m_geomExtractors;
};

View File

@ -61,6 +61,7 @@
#include "RimViewLinkerCollection.h"
#include "RimWellLogPlotCollection.h"
#include "RimRftPlotCollection.h"
#include "RimPltPlotCollection.h"
#include "RimWellPathCollection.h"
#include "RimWellPathImport.h"
#include "RimWellPath.h"
@ -1047,6 +1048,11 @@ void RimProject::defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QS
uiTreeOrdering.add(mainPlotCollection->rftPlotCollection());
}
if (mainPlotCollection->pltPlotCollection())
{
uiTreeOrdering.add(mainPlotCollection->pltPlotCollection());
}
if (mainPlotCollection->flowPlotCollection())
{
uiTreeOrdering.add(mainPlotCollection->flowPlotCollection());

View File

@ -47,6 +47,7 @@ ${CEE_CURRENT_LIST_DIR}RiuEditPerforationCollectionWidget.h
${CEE_CURRENT_LIST_DIR}RiuExportMultipleSnapshotsWidget.h
${CEE_CURRENT_LIST_DIR}RiuWellAllocationPlot.h
${CEE_CURRENT_LIST_DIR}RiuWellRftPlot.h
${CEE_CURRENT_LIST_DIR}RiuWellPltPlot.h
${CEE_CURRENT_LIST_DIR}RiuFlowCharacteristicsPlot.h
${CEE_CURRENT_LIST_DIR}RiuNightchartsWidget.h
${CEE_CURRENT_LIST_DIR}RiuMessagePanel.h
@ -101,6 +102,7 @@ ${CEE_CURRENT_LIST_DIR}RiuEditPerforationCollectionWidget.cpp
${CEE_CURRENT_LIST_DIR}RiuExportMultipleSnapshotsWidget.cpp
${CEE_CURRENT_LIST_DIR}RiuWellAllocationPlot.cpp
${CEE_CURRENT_LIST_DIR}RiuWellRftPlot.cpp
${CEE_CURRENT_LIST_DIR}RiuWellPltPlot.cpp
${CEE_CURRENT_LIST_DIR}RiuFlowCharacteristicsPlot.cpp
${CEE_CURRENT_LIST_DIR}RiuNightchartsWidget.cpp
${CEE_CURRENT_LIST_DIR}RiuMessagePanel.cpp
@ -141,6 +143,7 @@ ${CEE_CURRENT_LIST_DIR}RiuEditPerforationCollectionWidget.h
${CEE_CURRENT_LIST_DIR}RiuExportMultipleSnapshotsWidget.h
${CEE_CURRENT_LIST_DIR}RiuWellAllocationPlot.h
${CEE_CURRENT_LIST_DIR}RiuWellRftPlot.h
${CEE_CURRENT_LIST_DIR}RiuWellPltPlot.h
${CEE_CURRENT_LIST_DIR}RiuFlowCharacteristicsPlot.h
${CEE_CURRENT_LIST_DIR}RiuNightchartsWidget.h
${CEE_CURRENT_LIST_DIR}RiuMessagePanel.h

View File

@ -327,6 +327,7 @@ void RiuViewerCommands::displayContextMenu(QMouseEvent* event)
commandIds << "RicNewWellLogCurveExtractionFeature";
commandIds << "RicNewWellLogRftCurveFeature";
commandIds << "RicNewRftPlotFeature";
commandIds << "RicNewPltPlotFeature";
commandIds << "RicShowWellAllocationPlotFeature";
commandIds << "RicPlotProductionRateFeature";
commandIds << "Separator";

View File

@ -0,0 +1,157 @@
/////////////////////////////////////////////////////////////////////////////////
//
// 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)
: m_plotDefinition(plotDefinition),
QFrame(parent)
{
Q_ASSERT(m_plotDefinition);
QVBoxLayout* mainLayout = new QVBoxLayout();
this->setLayout(mainLayout);
this->layout()->setMargin(0);
this->layout()->setSpacing(2);
m_titleLabel = new QLabel(this);
new RiuPlotObjectPicker(m_titleLabel, m_plotDefinition->wellLogPlot());
QFont font = m_titleLabel->font();
font.setPointSize(14);
font.setBold(true);
m_titleLabel->setFont(font);
// White background
QPalette pal = this->palette();
pal.setColor(QPalette::Background, Qt::white);
this->setAutoFillBackground(true);
this->setPalette(pal);
mainLayout->addWidget(m_titleLabel, 0, Qt::AlignCenter);
auto plotWidgetsLayout = new QHBoxLayout();
auto rightColumnLayout = new QVBoxLayout();
mainLayout->addLayout(plotWidgetsLayout);
plotWidgetsLayout->addLayout(rightColumnLayout);
QWidget* wellFlowWidget = m_plotDefinition->wellLogPlot()->createViewWidget(this);
plotWidgetsLayout->addWidget(wellFlowWidget);
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RiuWellPltPlot::~RiuWellPltPlot()
{
if (m_plotDefinition)
{
m_plotDefinition->handleMdiWindowClosed();
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimWellPltPlot* RiuWellPltPlot::ownerPlotDefinition()
{
return m_plotDefinition;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimViewWindow* RiuWellPltPlot::ownerViewWindow() const
{
return m_plotDefinition;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiuWellPltPlot::showTitle(const QString& title)
{
m_titleLabel->show();
m_titleLabel->setText(title);
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiuWellPltPlot::hideTitle()
{
m_titleLabel->hide();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QSize RiuWellPltPlot::minimumSizeHint() const
{
return QSize(0, 100);
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiuWellPltPlot::contextMenuEvent(QContextMenuEvent* event)
{
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QSize RiuWellPltPlot::sizeHint() const
{
return QSize(0, 0);
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiuWellPltPlot::setDefaults()
{
}

View File

@ -0,0 +1,69 @@
/////////////////////////////////////////////////////////////////////////////////
//
// 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"
class RimWellPltPlot;
class RiuNightchartsWidget;
class QLabel;
namespace cvf {
class Color3f;
}
//==================================================================================================
//
//
//
//==================================================================================================
class RiuWellPltPlot : public QFrame, public RiuInterfaceToViewWindow
{
Q_OBJECT;
public:
RiuWellPltPlot(RimWellPltPlot* plotDefinition, QWidget* parent = NULL);
virtual ~RiuWellPltPlot();
RimWellPltPlot* ownerPlotDefinition();
virtual RimViewWindow* ownerViewWindow() const override;
void showTitle(const QString& title);
void hideTitle();
protected:
virtual QSize sizeHint() const override;
virtual QSize minimumSizeHint() const override;
virtual void contextMenuEvent(QContextMenuEvent *) override;
private:
void setDefaults();
private:
caf::PdmPointer<RimWellPltPlot> m_plotDefinition;
QPointer<QLabel> m_titleLabel;
};

View File

@ -10,8 +10,10 @@ PdmObject <|-- RimWellLogTrack
RimViewWindow <|-- RimWellAllocationPlot
RimViewWindow <|-- RimWellRftPlot
RimViewWindow <|-- RimWellPltPlot
RimWellAllocationPlot *--> RimWellLogPlot
RimWellRftPlot *--> RimWellLogPlot
RimWellPltPlot *--> RimWellLogPlot
}
package curve {
@ -57,6 +59,8 @@ class RiuWellAllocationPlot{
}
class RiuWellRftPlot{
}
class RiuWellPltPlot{
}
}
class RiuWellLogPlot {
@ -78,7 +82,9 @@ RimPlotCurve -r-> RiuLineSegmentQwtPlotCurve
RimSummaryPlot -r-> RiuSummaryQwtPlot
RimWellAllocationPlot *-> RiuWellAllocationPlot
RimWellRftPlot *-> RiuWellRftPlot
RimWellPltPlot *-> RiuWellPltPlot
RiuWellAllocationPlot ....> RiuWellLogPlot
RiuWellRftPlot ....> RiuWellLogPlot
RiuWellPltPlot ....> RiuWellLogPlot
@enduml