///////////////////////////////////////////////////////////////////////////////// // // 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 // for more details. // ///////////////////////////////////////////////////////////////////////////////// #pragma once #include "RimViewWindow.h" #include "RifDataSourceForRftPltQMetaType.h" #include "cafPdmField.h" #include "cafPdmObject.h" #include "cafPdmPtrField.h" #include "cvfCollection.h" #include #include #include #include #include #include class RimEclipseCase; class RimEclipseResultCase; class RimWellLogCurve; class RimWellLogFileChannel; class RimWellLogPlot; class RimWellPath; class RiuWellRftPlot; class RigEclipseCaseData; class RiaRftPltCurveDefinition; class RifDataSourceForRftPlt; namespace cvf { class Color3f; } namespace caf { class PdmOptionItemInfo; } //================================================================================================== /// /// //================================================================================================== class RimWellRftPlot : public RimViewWindow { CAF_PDM_HEADER_INIT; static const std::set PRESSURE_DATA_NAMES; static const char PLOT_NAME_QFORMAT_STRING[]; public: RimWellRftPlot(); ~RimWellRftPlot() override; void setDescription(const QString& description); QString description() const; QWidget* viewWidget() override; void zoomAll() override; RimWellLogPlot* wellLogPlot() const; void setSimWellOrWellPathName(const QString& currWellName); int branchIndex() const; void applyInitialSelections(); static const char* plotNameFormatString(); protected: // Overridden PDM methods caf::PdmFieldHandle* userDescriptionField() override { return &m_userName; } void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override; void defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName) override; QList calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool * useOptionsOnly) override; QImage snapshotWindowContent() override; void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override; void onLoadDataAndUpdate() override; private: void calculateValueOptionsForWells(QList& options); void updateEditorsFromCurves(); void updateWidgetTitleWindowTitle(); void syncCurvesFromUiSelection(); std::set selectedCurveDefs() const; std::set curveDefsFromCurves() const; void updateCurvesInPlot(const std::set& allCurveDefs, const std::set& curveDefsToAdd, const std::set& curvesToDelete); std::vector selectedSourcesExpanded() const; // RimViewWindow overrides QWidget* createViewWidget(QWidget* mainWindowParent) override; void deleteViewWidget() override; void applyCurveAppearance(RimWellLogCurve* newCurve); void updateFormationsOnPlot() const; QString associatedSimWellName() const; private: caf::PdmField m_showPlotTitle; caf::PdmField m_userName; caf::PdmField m_wellPathNameOrSimWellName; caf::PdmField m_branchIndex; caf::PdmField m_branchDetection; caf::PdmField> m_selectedSources; caf::PdmField> m_selectedTimeSteps; caf::PdmChildField m_wellLogPlot; QPointer m_wellLogPlotWidget; bool m_isOnLoad; };