mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Refactoring. RimViewWindow.loadDataAndUpdate -> onLoadDataAndUpdate
This commit is contained in:
parent
6aaa8f7606
commit
ae20e1af10
@ -140,7 +140,7 @@ void RimFlowCharacteristicsPlot::setFromFlowSolution(RimFlowDiagSolution* flowSo
|
||||
m_flowDiagSolution = flowSolution;
|
||||
m_showWindow = true;
|
||||
|
||||
loadDataAndUpdate();
|
||||
onLoadDataAndUpdate();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -168,7 +168,7 @@ void RimFlowCharacteristicsPlot::updateCurrentTimeStep()
|
||||
|
||||
if (m_currentlyPlottedTimeSteps == calculatedTimesteps) return;
|
||||
|
||||
this->loadDataAndUpdate();
|
||||
this->onLoadDataAndUpdate();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -526,7 +526,7 @@ void RimFlowCharacteristicsPlot::fieldChangedByUi(const caf::PdmFieldHandle* cha
|
||||
|
||||
// All fields update plot
|
||||
|
||||
this->loadDataAndUpdate();
|
||||
this->onLoadDataAndUpdate();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -548,7 +548,7 @@ QImage RimFlowCharacteristicsPlot::snapshotWindowContent()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFlowCharacteristicsPlot::loadDataAndUpdate()
|
||||
void RimFlowCharacteristicsPlot::onLoadDataAndUpdate()
|
||||
{
|
||||
updateMdiWindowVisibility();
|
||||
|
||||
@ -652,7 +652,7 @@ void RimFlowCharacteristicsPlot::viewGeometryUpdated()
|
||||
if (m_cellFilter() == RigFlowDiagResults::CELLS_VISIBLE)
|
||||
{
|
||||
// Only need to reload data if cell filtering is based on visible cells in view.
|
||||
loadDataAndUpdate();
|
||||
onLoadDataAndUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -65,8 +65,6 @@ public:
|
||||
virtual void zoomAll() override;
|
||||
virtual QWidget* createViewWidget(QWidget* mainWindowParent) override;
|
||||
virtual void deleteViewWidget() override;
|
||||
virtual void loadDataAndUpdate() override;
|
||||
|
||||
void viewGeometryUpdated();
|
||||
|
||||
enum TimeSelectionType
|
||||
@ -85,6 +83,7 @@ protected:
|
||||
virtual QList<caf::PdmOptionItemInfo> calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly) override;
|
||||
virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override;
|
||||
virtual void defineEditorAttribute( const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute );
|
||||
virtual void onLoadDataAndUpdate() override;
|
||||
|
||||
private:
|
||||
|
||||
|
@ -85,7 +85,7 @@ void RimTofAccumulatedPhaseFractionsPlot::deleteViewWidget()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimTofAccumulatedPhaseFractionsPlot::reloadFromWell()
|
||||
{
|
||||
loadDataAndUpdate();
|
||||
onLoadDataAndUpdate();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -151,7 +151,7 @@ void RimTofAccumulatedPhaseFractionsPlot::fieldChangedByUi(const caf::PdmFieldHa
|
||||
}
|
||||
else if (changedField == &m_maxTof)
|
||||
{
|
||||
loadDataAndUpdate();
|
||||
onLoadDataAndUpdate();
|
||||
}
|
||||
|
||||
}
|
||||
@ -189,7 +189,7 @@ QString RimTofAccumulatedPhaseFractionsPlot::description() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimTofAccumulatedPhaseFractionsPlot::loadDataAndUpdate()
|
||||
void RimTofAccumulatedPhaseFractionsPlot::onLoadDataAndUpdate()
|
||||
{
|
||||
updateMdiWindowVisibility();
|
||||
|
||||
|
@ -74,7 +74,7 @@ public:
|
||||
protected:
|
||||
// RimViewWindow overrides
|
||||
|
||||
virtual void loadDataAndUpdate() override;
|
||||
virtual void onLoadDataAndUpdate() override;
|
||||
virtual QImage snapshotWindowContent() override;
|
||||
|
||||
// Overridden PDM methods
|
||||
|
@ -189,7 +189,7 @@ void RimTotalWellAllocationPlot::clearSlices()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimTotalWellAllocationPlot::loadDataAndUpdate()
|
||||
void RimTotalWellAllocationPlot::onLoadDataAndUpdate()
|
||||
{
|
||||
updateMdiWindowVisibility();
|
||||
|
||||
|
@ -70,7 +70,7 @@ public:
|
||||
protected:
|
||||
// RimViewWindow overrides
|
||||
|
||||
virtual void loadDataAndUpdate() override;
|
||||
virtual void onLoadDataAndUpdate() override;
|
||||
virtual QImage snapshotWindowContent() override;
|
||||
|
||||
// Overridden PDM methods
|
||||
|
@ -145,7 +145,7 @@ void RimWellAllocationPlot::setFromSimulationWell(RimSimWellInView* simWell)
|
||||
m_flowDiagSolution = m_case->defaultFlowDiagSolution();
|
||||
}
|
||||
|
||||
loadDataAndUpdate();
|
||||
onLoadDataAndUpdate();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -697,7 +697,7 @@ void RimWellAllocationPlot::fieldChangedByUi(const caf::PdmFieldHandle* changedF
|
||||
if (!sortedWellNames.size()) m_wellName = "";
|
||||
else if ( sortedWellNames.count(m_wellName()) == 0 ){ m_wellName = *sortedWellNames.begin();}
|
||||
|
||||
loadDataAndUpdate();
|
||||
onLoadDataAndUpdate();
|
||||
}
|
||||
else if ( changedField == &m_wellName
|
||||
|| changedField == &m_timeStep
|
||||
@ -706,7 +706,7 @@ void RimWellAllocationPlot::fieldChangedByUi(const caf::PdmFieldHandle* changedF
|
||||
|| changedField == &m_smallContributionsThreshold
|
||||
|| changedField == &m_flowType )
|
||||
{
|
||||
loadDataAndUpdate();
|
||||
onLoadDataAndUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
@ -787,7 +787,7 @@ QString RimWellAllocationPlot::description() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellAllocationPlot::loadDataAndUpdate()
|
||||
void RimWellAllocationPlot::onLoadDataAndUpdate()
|
||||
{
|
||||
updateMdiWindowVisibility();
|
||||
updateFromWell();
|
||||
|
@ -66,8 +66,6 @@ public:
|
||||
void setDescription(const QString& description);
|
||||
QString description() const;
|
||||
|
||||
virtual void loadDataAndUpdate() override;
|
||||
|
||||
virtual QWidget* viewWidget() override;
|
||||
virtual void zoomAll() override;
|
||||
|
||||
@ -96,6 +94,7 @@ protected:
|
||||
|
||||
|
||||
virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override;
|
||||
virtual void onLoadDataAndUpdate() override;
|
||||
|
||||
private:
|
||||
void updateFromWell();
|
||||
|
@ -412,16 +412,6 @@ void RimWellPltPlot::updateWidgetTitleWindowTitle()
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellPltPlot::syncCurvesFromUiSelection()
|
||||
{
|
||||
RimWellLogTrack* plotTrack = m_wellLogPlot->trackByIndex(0);
|
||||
const std::set<std::pair<RifWellRftAddress, QDateTime>>& curveDefs = selectedCurveDefs();
|
||||
updateCurvesInPlot(curveDefs);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -803,9 +793,10 @@ std::pair<RifWellRftAddress, QDateTime> RimWellPltPlot::curveDefFromCurve(const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellPltPlot::updateCurvesInPlot(const std::set<std::pair<RifWellRftAddress, QDateTime>>& curveDefs)
|
||||
void RimWellPltPlot::syncCurvesFromUiSelection()
|
||||
{
|
||||
RimWellLogTrack* const plotTrack = m_wellLogPlot->trackByIndex(0);
|
||||
RimWellLogTrack* plotTrack = m_wellLogPlot->trackByIndex(0);
|
||||
const std::set<std::pair<RifWellRftAddress, QDateTime>>& curveDefs = selectedCurveDefs();
|
||||
|
||||
setPlotXAxisTitles(plotTrack);
|
||||
|
||||
@ -1497,7 +1488,7 @@ QString RimWellPltPlot::description() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellPltPlot::loadDataAndUpdate()
|
||||
void RimWellPltPlot::onLoadDataAndUpdate()
|
||||
{
|
||||
if (m_doInitAfterLoad)
|
||||
{
|
||||
|
@ -84,8 +84,6 @@ public:
|
||||
void setDescription(const QString& description);
|
||||
QString description() const;
|
||||
|
||||
virtual void loadDataAndUpdate() override;
|
||||
|
||||
virtual QWidget* viewWidget() override;
|
||||
virtual void zoomAll() override;
|
||||
|
||||
@ -114,6 +112,7 @@ protected:
|
||||
|
||||
virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override;
|
||||
virtual void defineEditorAttribute(const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute);
|
||||
virtual void onLoadDataAndUpdate() override;
|
||||
|
||||
virtual void initAfterRead() override;
|
||||
virtual void setupBeforeSave() override;
|
||||
@ -149,7 +148,6 @@ private:
|
||||
std::set<std::pair<RifWellRftAddress, QDateTime>> selectedCurveDefs() const;
|
||||
std::set<std::pair<RifWellRftAddress, QDateTime>> curveDefsFromCurves() const;
|
||||
std::pair<RifWellRftAddress, QDateTime> curveDefFromCurve(const RimWellLogCurve* curve) const;
|
||||
void updateCurvesInPlot(const std::set<std::pair<RifWellRftAddress, QDateTime>>& curveDefs);
|
||||
void addStackedCurve(const QString& tracerName,
|
||||
const std::vector<double>& depthValues,
|
||||
const std::vector<double>& accFlow,
|
||||
|
@ -1313,7 +1313,7 @@ QString RimWellRftPlot::description() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellRftPlot::loadDataAndUpdate()
|
||||
void RimWellRftPlot::onLoadDataAndUpdate()
|
||||
{
|
||||
updateMdiWindowVisibility();
|
||||
m_wellLogPlot->loadDataAndUpdate();
|
||||
|
@ -71,8 +71,6 @@ public:
|
||||
void setDescription(const QString& description);
|
||||
QString description() const;
|
||||
|
||||
virtual void loadDataAndUpdate() override;
|
||||
|
||||
virtual QWidget* viewWidget() override;
|
||||
virtual void zoomAll() override;
|
||||
|
||||
@ -100,6 +98,7 @@ protected:
|
||||
|
||||
|
||||
virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override;
|
||||
virtual void onLoadDataAndUpdate() override;
|
||||
|
||||
private:
|
||||
static void addTimeStepToMap(std::map<QDateTime, std::set<RifWellRftAddress>>& destMap,
|
||||
|
@ -736,7 +736,7 @@ void RimEclipseView::updateCurrentTimeStep()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimEclipseView::loadDataAndUpdate()
|
||||
void RimEclipseView::onLoadDataAndUpdate()
|
||||
{
|
||||
updateScaleTransform();
|
||||
|
||||
|
@ -125,7 +125,6 @@ public:
|
||||
|
||||
// Display model generation
|
||||
|
||||
virtual void loadDataAndUpdate() override;
|
||||
bool isTimeStepDependentDataVisible() const;
|
||||
|
||||
virtual void scheduleGeometryRegen(RivCellSetEnum geometryType) override;
|
||||
@ -154,6 +153,7 @@ protected:
|
||||
virtual void initAfterRead() override;
|
||||
virtual void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||
virtual void defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "") override;
|
||||
virtual void onLoadDataAndUpdate() override;
|
||||
|
||||
virtual void createPartCollectionFromSelection(cvf::Collection<cvf::Part>* parts) override;
|
||||
virtual bool showActiveCellsOnly() override;
|
||||
|
@ -103,7 +103,7 @@ RimGeoMechView::~RimGeoMechView(void)
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimGeoMechView::loadDataAndUpdate()
|
||||
void RimGeoMechView::onLoadDataAndUpdate()
|
||||
{
|
||||
caf::ProgressInfo progress(7, "");
|
||||
progress.setNextProgressIncrement(5);
|
||||
|
@ -63,8 +63,6 @@ public:
|
||||
RimGeoMechCase* geoMechCase();
|
||||
virtual RimCase* ownerCase() const override;
|
||||
|
||||
virtual void loadDataAndUpdate() override;
|
||||
|
||||
caf::PdmChildField<RimGeoMechCellColors*> cellResult;
|
||||
RimGeoMechResultDefinition* cellResultResultDefinition();
|
||||
|
||||
@ -88,7 +86,8 @@ public:
|
||||
|
||||
protected:
|
||||
virtual void defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "") override;
|
||||
|
||||
virtual void onLoadDataAndUpdate() override;
|
||||
|
||||
virtual void createPartCollectionFromSelection(cvf::Collection<cvf::Part>* parts) override;
|
||||
|
||||
private:
|
||||
|
@ -170,7 +170,6 @@ public:
|
||||
void forceShowWindowOn();
|
||||
|
||||
public:
|
||||
virtual void loadDataAndUpdate() = 0;
|
||||
void updateGridBoxData();
|
||||
virtual RimCase* ownerCase() const = 0;
|
||||
|
||||
@ -205,6 +204,8 @@ protected:
|
||||
virtual void resetLegendsInViewer() = 0;
|
||||
virtual void calculateCurrentTotalCellVisibility(cvf::UByteArray* totalVisibility, int timeStep) = 0;
|
||||
|
||||
virtual void onLoadDataAndUpdate() = 0;
|
||||
|
||||
RimWellPathCollection* wellPathsPartManager();
|
||||
|
||||
QPointer<RiuViewer> m_viewer;
|
||||
|
@ -49,6 +49,14 @@ RimViewWindow::~RimViewWindow(void)
|
||||
if ( m_windowController() ) delete m_windowController() ;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimViewWindow::loadDataAndUpdate()
|
||||
{
|
||||
onLoadDataAndUpdate();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -143,7 +151,7 @@ void RimViewWindow::fieldChangedByUi(const caf::PdmFieldHandle* changedField, co
|
||||
{
|
||||
if (m_showWindow)
|
||||
{
|
||||
loadDataAndUpdate();
|
||||
onLoadDataAndUpdate();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -47,6 +47,7 @@ public:
|
||||
RimViewWindow(void);
|
||||
virtual ~RimViewWindow(void);
|
||||
|
||||
void loadDataAndUpdate();
|
||||
void handleMdiWindowClosed();
|
||||
|
||||
void setAs3DViewMdiWindow() { setAsMdiWindow(0); }
|
||||
@ -72,7 +73,7 @@ protected:
|
||||
virtual void updateViewWidgetAfterCreation() {};
|
||||
virtual void updateMdiWindowTitle(); // Has real default implementation
|
||||
virtual void deleteViewWidget() = 0;
|
||||
virtual void loadDataAndUpdate() = 0;
|
||||
virtual void onLoadDataAndUpdate() = 0;
|
||||
//////////
|
||||
|
||||
// Derived classes are not supposed to override this function. The intention is to always use m_showWindow
|
||||
|
@ -562,7 +562,7 @@ void RimWellLogPlot::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering&
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellLogPlot::loadDataAndUpdate()
|
||||
void RimWellLogPlot::onLoadDataAndUpdate()
|
||||
{
|
||||
updateMdiWindowVisibility();
|
||||
updateTracks();
|
||||
|
@ -84,7 +84,6 @@ public:
|
||||
|
||||
RimWellLogTrack* trackByIndex(size_t index);
|
||||
|
||||
virtual void loadDataAndUpdate() override;
|
||||
void updateTracks();
|
||||
void updateTrackNames();
|
||||
|
||||
@ -115,6 +114,7 @@ protected:
|
||||
virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering);
|
||||
virtual caf::PdmFieldHandle* userDescriptionField() { return &m_userName; }
|
||||
virtual QList<caf::PdmOptionItemInfo> calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly) override;
|
||||
virtual void onLoadDataAndUpdate() override;
|
||||
|
||||
virtual QImage snapshotWindowContent() override;
|
||||
|
||||
|
@ -1029,7 +1029,7 @@ void RimSummaryPlot::defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSummaryPlot::loadDataAndUpdate()
|
||||
void RimSummaryPlot::onLoadDataAndUpdate()
|
||||
{
|
||||
updateMdiWindowVisibility();
|
||||
|
||||
|
@ -72,8 +72,6 @@ public:
|
||||
caf::PdmObject* findRimCurveFromQwtCurve(const QwtPlotCurve* curve) const;
|
||||
size_t curveCount() const;
|
||||
|
||||
virtual void loadDataAndUpdate() override;
|
||||
|
||||
void detachAllCurves();
|
||||
void updateCaseNameHasChanged();
|
||||
|
||||
@ -118,6 +116,7 @@ protected:
|
||||
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
|
||||
virtual void defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "") override;
|
||||
virtual void defineEditorAttribute(const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute);
|
||||
virtual void onLoadDataAndUpdate() override;
|
||||
|
||||
virtual QImage snapshotWindowContent() override;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user