mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-09 23:16:00 -06:00
#2535 Use the MainWindowTools class instead of MainWindow directly (part 2)
This commit is contained in:
parent
d74807d669
commit
72013f4ff8
@ -29,7 +29,7 @@
|
||||
#include "cafSelectionManager.h"
|
||||
|
||||
#include "cvfAssert.h"
|
||||
#include "RiuMainWindow.h"
|
||||
#include "Riu3DMainWindowTools.h"
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
@ -66,7 +66,7 @@ void RicEclipsePropertyFilterFeatureImpl::addPropertyFilter(RimEclipsePropertyFi
|
||||
propertyFilterCollection->reservoirView()->scheduleCreateDisplayModelAndRedraw();
|
||||
|
||||
propertyFilterCollection->updateConnectedEditors();
|
||||
RiuMainWindow::instance()->selectAsCurrentItem(propertyFilter);
|
||||
Riu3DMainWindowTools::selectAsCurrentItem(propertyFilter);
|
||||
|
||||
}
|
||||
|
||||
@ -83,7 +83,7 @@ void RicEclipsePropertyFilterFeatureImpl::insertPropertyFilter(RimEclipsePropert
|
||||
propertyFilterCollection->reservoirView()->scheduleCreateDisplayModelAndRedraw();
|
||||
|
||||
propertyFilterCollection->updateConnectedEditors();
|
||||
RiuMainWindow::instance()->selectAsCurrentItem(propertyFilter);
|
||||
Riu3DMainWindowTools::selectAsCurrentItem(propertyFilter);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -26,7 +26,7 @@
|
||||
#include "RimProject.h"
|
||||
|
||||
#include "RiaApplication.h"
|
||||
#include "RiuMainWindow.h"
|
||||
#include "Riu3DMainWindowTools.h"
|
||||
|
||||
#include "cafSelectionManager.h"
|
||||
|
||||
@ -53,7 +53,7 @@ void RicNewStatisticsCaseFeature::onActionTriggered(bool isChecked)
|
||||
RimEclipseStatisticsCase* newCase = addStatisticalCalculation(uiItem);
|
||||
if (newCase)
|
||||
{
|
||||
RiuMainWindow::instance()->selectAsCurrentItem(newCase);
|
||||
Riu3DMainWindowTools::selectAsCurrentItem(newCase);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -34,7 +34,7 @@
|
||||
#include "RimSimWellInView.h"
|
||||
#include "RimStimPlanColors.h"
|
||||
|
||||
#include "RiuMainWindow.h"
|
||||
#include "Riu3DMainWindowTools.h"
|
||||
#include "RiuSelectionManager.h"
|
||||
#include "RivSimWellPipeSourceInfo.h"
|
||||
|
||||
@ -109,7 +109,7 @@ void RicNewSimWellFractureAtPosFeature::onActionTriggered(bool isChecked)
|
||||
fracture->setFractureTemplate(fracDef);
|
||||
|
||||
simWell->updateConnectedEditors();
|
||||
RiuMainWindow::instance()->selectAsCurrentItem(fracture);
|
||||
Riu3DMainWindowTools::selectAsCurrentItem(fracture);
|
||||
|
||||
activeView->scheduleCreateDisplayModelAndRedraw();
|
||||
|
||||
|
@ -36,7 +36,7 @@
|
||||
#include "RimSimWellFractureCollection.h"
|
||||
#include "RimSimWellInView.h"
|
||||
|
||||
#include "RiuMainWindow.h"
|
||||
#include "Riu3DMainWindowTools.h"
|
||||
|
||||
#include "cafSelectionManager.h"
|
||||
|
||||
@ -98,7 +98,7 @@ void RicNewSimWellFractureFeature::onActionTriggered(bool isChecked)
|
||||
fracture->updateFracturePositionFromLocation();
|
||||
|
||||
eclipseWell->updateConnectedEditors();
|
||||
RiuMainWindow::instance()->selectAsCurrentItem(fracture);
|
||||
Riu3DMainWindowTools::selectAsCurrentItem(fracture);
|
||||
|
||||
RimEclipseCase* eclipseCase = nullptr;
|
||||
objHandle->firstAncestorOrThisOfType(eclipseCase);
|
||||
|
@ -26,7 +26,7 @@
|
||||
#include "RimProject.h"
|
||||
#include "RimStimPlanFractureTemplate.h"
|
||||
|
||||
#include "RiuMainWindow.h"
|
||||
#include "Riu3DMainWindowTools.h"
|
||||
|
||||
#include "cafSelectionManager.h"
|
||||
|
||||
@ -90,7 +90,7 @@ void RicNewStimPlanFractureTemplateFeature::onActionTriggered(bool isChecked)
|
||||
}
|
||||
}
|
||||
|
||||
RiuMainWindow::instance()->selectAsCurrentItem(fractureDef);
|
||||
Riu3DMainWindowTools::selectAsCurrentItem(fractureDef);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -36,7 +36,7 @@
|
||||
#include "RimWellPathFracture.h"
|
||||
#include "RimWellPathFractureCollection.h"
|
||||
|
||||
#include "RiuMainWindow.h"
|
||||
#include "Riu3DMainWindowTools.h"
|
||||
|
||||
#include "WellPathCommands/RicWellPathsUnitSystemSettingsImpl.h"
|
||||
|
||||
@ -93,7 +93,7 @@ void RicNewWellPathFractureFeature::addFracture(RimWellPath* wellPath, double me
|
||||
fracture->setFractureTemplate(fracDef);
|
||||
|
||||
wellPath->updateConnectedEditors();
|
||||
RiuMainWindow::instance()->selectAsCurrentItem(fracture);
|
||||
Riu3DMainWindowTools::selectAsCurrentItem(fracture);
|
||||
|
||||
RimProject* project = nullptr;
|
||||
fractureCollection->firstAncestorOrThisOfType(project);
|
||||
|
@ -21,7 +21,7 @@
|
||||
|
||||
#include "RiaApplication.h"
|
||||
|
||||
#include "RiuMainWindow.h"
|
||||
#include "Riu3DMainWindowTools.h"
|
||||
|
||||
#include "RicPasteFeatureImpl.h"
|
||||
|
||||
@ -112,7 +112,7 @@ void RicPasteEclipseViewsFeature::onActionTriggered(bool isChecked)
|
||||
lastViewCopy = rimReservoirView;
|
||||
}
|
||||
|
||||
if (lastViewCopy) RiuMainWindow::instance()->selectAsCurrentItem(lastViewCopy);
|
||||
if (lastViewCopy) Riu3DMainWindowTools::selectAsCurrentItem(lastViewCopy);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -21,7 +21,7 @@
|
||||
|
||||
#include "RicPasteFeatureImpl.h"
|
||||
|
||||
#include "RiuMainWindow.h"
|
||||
#include "Riu3DMainWindowTools.h"
|
||||
|
||||
#include "RimGeoMechView.h"
|
||||
#include "RimGeoMechCase.h"
|
||||
@ -105,7 +105,7 @@ void RicPasteGeoMechViewsFeature::onActionTriggered(bool isChecked)
|
||||
lastViewCopy = rimReservoirView;
|
||||
}
|
||||
|
||||
if (lastViewCopy) RiuMainWindow::instance()->selectAsCurrentItem(lastViewCopy);
|
||||
if (lastViewCopy) Riu3DMainWindowTools::selectAsCurrentItem(lastViewCopy);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -26,7 +26,7 @@
|
||||
#include "RimProject.h"
|
||||
#include "RimSummaryObservedDataFile.h"
|
||||
|
||||
#include "RiuMainPlotWindow.h"
|
||||
#include "RiuPlotMainWindowTools.h"
|
||||
|
||||
#include "cafSelectionManager.h"
|
||||
|
||||
@ -100,7 +100,8 @@ void RicImportObservedDataFeature::selectObservedDataFileInDialog()
|
||||
} while (retryImport);
|
||||
}
|
||||
|
||||
RiaApplication::instance()->getOrCreateAndShowMainPlotWindow()->selectAsCurrentItem(observedData);
|
||||
RiuPlotMainWindowTools::showPlotMainWindow();
|
||||
RiuPlotMainWindowTools::selectAsCurrentItem(observedData);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include "RimGeoMechCellColors.h"
|
||||
#include "RimGeoMechView.h"
|
||||
#include "RimGridView.h"
|
||||
#include "RiuMainWindow.h"
|
||||
#include "Riu3DMainWindowTools.h"
|
||||
|
||||
#include <QAction>
|
||||
|
||||
@ -60,13 +60,13 @@ void RicSelectColorResult::onActionTriggered(bool isChecked)
|
||||
RimEclipseView* eclView = dynamic_cast<RimEclipseView*>(activeView);
|
||||
if (eclView)
|
||||
{
|
||||
RiuMainWindow::instance()->selectAsCurrentItem(eclView->cellResult());
|
||||
Riu3DMainWindowTools::selectAsCurrentItem(eclView->cellResult());
|
||||
return;
|
||||
}
|
||||
|
||||
RimGeoMechView* geoMechView = dynamic_cast<RimGeoMechView*>(activeView);
|
||||
if (geoMechView)
|
||||
{
|
||||
RiuMainWindow::instance()->selectAsCurrentItem(geoMechView->cellResult());
|
||||
Riu3DMainWindowTools::selectAsCurrentItem(geoMechView->cellResult());
|
||||
}
|
||||
}
|
||||
|
@ -31,7 +31,7 @@
|
||||
#include "RimSummaryPlot.h"
|
||||
#include "RimSummaryPlotCollection.h"
|
||||
|
||||
#include "RiuMainPlotWindow.h"
|
||||
#include "RiuPlotMainWindowTools.h"
|
||||
|
||||
#include "WellLogCommands/RicWellLogPlotCurveFeatureImpl.h"
|
||||
|
||||
@ -65,8 +65,8 @@ void RicDuplicateSummaryCurveFeature::onActionTriggered(bool isChecked)
|
||||
if (curve)
|
||||
{
|
||||
RimSummaryCurve* newCurve = RicPasteSummaryCurveFeature::copyCurveAndAddToPlot(curve);
|
||||
|
||||
RiaApplication::instance()->getOrCreateAndShowMainPlotWindow()->selectAsCurrentItem(newCurve);
|
||||
RiuPlotMainWindowTools::showPlotMainWindow();
|
||||
RiuPlotMainWindowTools::selectAsCurrentItem(newCurve);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
#include "RimSummaryCurveFilter.h"
|
||||
#include "RimSummaryPlot.h"
|
||||
|
||||
#include "RiuMainPlotWindow.h"
|
||||
#include "RiuPlotMainWindowTools.h"
|
||||
|
||||
#include "cvfAssert.h"
|
||||
|
||||
@ -65,12 +65,9 @@ void RicNewSummaryCrossPlotFeature::onActionTriggered(bool isChecked)
|
||||
summaryCrossPlotColl->updateConnectedEditors();
|
||||
summaryPlot->loadDataAndUpdate();
|
||||
|
||||
RiuMainPlotWindow* mainPlotWindow = RiaApplication::instance()->getOrCreateAndShowMainPlotWindow();
|
||||
if (mainPlotWindow)
|
||||
{
|
||||
mainPlotWindow->selectAsCurrentItem(summaryPlot);
|
||||
mainPlotWindow->setExpanded(summaryPlot);
|
||||
}
|
||||
RiuPlotMainWindowTools::showPlotMainWindow();
|
||||
RiuPlotMainWindowTools::selectAsCurrentItem(summaryPlot);
|
||||
RiuPlotMainWindowTools::setExpanded(summaryPlot);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -38,7 +38,7 @@
|
||||
#include "RimMainPlotCollection.h"
|
||||
#include "RimEclipseResultCase.h"
|
||||
|
||||
#include "RiuMainPlotWindow.h"
|
||||
#include "RiuPlotMainWindowTools.h"
|
||||
#include "RiuSelectionManager.h"
|
||||
|
||||
#include "cafSelectionManagerTools.h"
|
||||
@ -123,12 +123,9 @@ void RicNewPltPlotFeature::onActionTriggered(bool isChecked)
|
||||
pltPlot->loadDataAndUpdate();
|
||||
pltPlotColl->updateConnectedEditors();
|
||||
|
||||
RiuMainPlotWindow* mainPlotWindow = RiaApplication::instance()->getOrCreateAndShowMainPlotWindow();
|
||||
if (mainPlotWindow)
|
||||
{
|
||||
mainPlotWindow->setExpanded(plotTrack);
|
||||
mainPlotWindow->selectAsCurrentItem(pltPlot);
|
||||
}
|
||||
RiuPlotMainWindowTools::showPlotMainWindow();
|
||||
RiuPlotMainWindowTools::setExpanded(plotTrack);
|
||||
RiuPlotMainWindowTools::selectAsCurrentItem(pltPlot);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -27,7 +27,7 @@
|
||||
#include "RimIntersectionBox.h"
|
||||
#include "RimSimWellInView.h"
|
||||
|
||||
#include "RiuMainWindow.h"
|
||||
#include "Riu3DMainWindowTools.h"
|
||||
|
||||
#include "RivIntersectionBoxPartMgr.h"
|
||||
#include "RivIntersectionPartMgr.h"
|
||||
@ -177,7 +177,7 @@ void RimIntersectionCollection::appendIntersectionAndUpdate(RimIntersection* int
|
||||
syncronize2dIntersectionViews();
|
||||
|
||||
updateConnectedEditors();
|
||||
RiuMainWindow::instance()->selectAsCurrentItem(intersection);
|
||||
Riu3DMainWindowTools::selectAsCurrentItem(intersection);
|
||||
|
||||
Rim3dView* rimView = nullptr;
|
||||
firstAncestorOrThisOfType(rimView);
|
||||
@ -224,7 +224,7 @@ void RimIntersectionCollection::appendIntersectionBoxAndUpdate(RimIntersectionBo
|
||||
m_intersectionBoxes.push_back(intersectionBox);
|
||||
|
||||
updateConnectedEditors();
|
||||
RiuMainWindow::instance()->selectAsCurrentItem(intersectionBox);
|
||||
Riu3DMainWindowTools::selectAsCurrentItem(intersectionBox);
|
||||
|
||||
Rim3dView* rimView = nullptr;
|
||||
firstAncestorOrThisOfType(rimView);
|
||||
|
@ -26,7 +26,7 @@
|
||||
#include "RimSummaryCurveCollection.h"
|
||||
#include "RimSummaryPlot.h"
|
||||
|
||||
#include "RiuMainPlotWindow.h"
|
||||
#include "RiuPlotMainWindowTools.h"
|
||||
#include "RiuQwtCurvePointTracker.h"
|
||||
#include "RiuQwtPlotWheelZoomer.h"
|
||||
#include "RiuQwtPlotZoomer.h"
|
||||
@ -368,7 +368,8 @@ void RiuSummaryQwtPlot::selectClosestCurve(const QPoint& pos)
|
||||
|
||||
if(proj && selectedCurve)
|
||||
{
|
||||
RiaApplication::instance()->getOrCreateAndShowMainPlotWindow()->selectAsCurrentItem(selectedCurve);
|
||||
RiuPlotMainWindowTools::showPlotMainWindow();
|
||||
RiuPlotMainWindowTools::selectAsCurrentItem(selectedCurve);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include "RimWellLogTrack.h"
|
||||
#include "RimWellLogCurve.h"
|
||||
|
||||
#include "RiuMainPlotWindow.h"
|
||||
#include "RiuPlotMainWindowTools.h"
|
||||
#include "RiuQwtCurvePointTracker.h"
|
||||
|
||||
#include "qwt_legend.h"
|
||||
@ -220,13 +220,15 @@ void RiuWellLogTrack::selectClosestCurve(const QPoint& pos)
|
||||
RimWellLogCurve* selectedCurve = m_plotTrackDefinition->curveDefinitionFromCurve(closestCurve);
|
||||
if (selectedCurve)
|
||||
{
|
||||
RiaApplication::instance()->getOrCreateAndShowMainPlotWindow()->selectAsCurrentItem(selectedCurve);
|
||||
RiuPlotMainWindowTools::showPlotMainWindow();
|
||||
RiuPlotMainWindowTools::selectAsCurrentItem(selectedCurve);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
RiaApplication::instance()->getOrCreateAndShowMainPlotWindow()->selectAsCurrentItem(m_plotTrackDefinition);
|
||||
RiuPlotMainWindowTools::showPlotMainWindow();
|
||||
RiuPlotMainWindowTools::selectAsCurrentItem(m_plotTrackDefinition);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user