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