#2535 Use the MainWindowTools class instead of MainWindow directly (part 4)

This commit is contained in:
Jacob Støren
2018-02-27 16:37:06 +01:00
parent 562dfbe9b8
commit 267e3ef59d
27 changed files with 74 additions and 65 deletions

View File

@@ -40,7 +40,7 @@
#include "RimTensorResults.h"
#include "RimViewLinker.h"
#include "RiuMainWindow.h"
#include "Riu3DMainWindowTools.h"
#include "RiuSelectionManager.h"
#include "RiuViewer.h"
@@ -125,7 +125,7 @@ void RimGeoMechView::onLoadDataAndUpdate()
{
QString displayMessage = errorMessage.empty() ? "Could not open the Odb file: \n" + m_geomechCase->caseFileName() : QString::fromStdString(errorMessage);
QMessageBox::warning(RiuMainWindow::instance(),
QMessageBox::warning(Riu3DMainWindowTools::mainWindowWidget(),
"File open error",
displayMessage);
m_geomechCase = nullptr;

View File

@@ -36,7 +36,7 @@
#include "RimEclipseView.h"
#include "RimReservoirCellResultsStorage.h"
#include "RiuMainWindow.h"
#include "Riu3DMainWindowTools.h"
#include "cafProgressInfo.h"
@@ -173,7 +173,7 @@ void RimIdenticalGridCaseGroup::loadMainCaseAndActiveCellInfo()
RimEclipseCase* mainCase = caseCollection()->reservoirs[0];
if (!mainCase->openReserviorCase())
{
QMessageBox::warning(RiuMainWindow::instance(),
QMessageBox::warning(Riu3DMainWindowTools::mainWindowWidget(),
"Error when opening project file",
"Could not open the Eclipse Grid file: \n"+ mainCase->gridFileName() + "\n"+
"Current working directory is: \n" +

View File

@@ -29,7 +29,7 @@
#include "RigWellLogFile.h"
#include "RiuMainWindow.h"
#include "Riu3DMainWindowTools.h"
#include "cafPdmUiDateEditor.h"
@@ -124,9 +124,9 @@ RimWellLogFile* RimWellLogFile::readWellLogFile(const QString& logFilePath)
displayMessage += errorMessage;
}
QMessageBox::warning(RiuMainWindow::instance(),
"File open error",
displayMessage);
QMessageBox::warning(Riu3DMainWindowTools::mainWindowWidget(),
"File open error",
displayMessage);
delete wellLogFile;
wellLogFile = nullptr;

View File

@@ -39,7 +39,7 @@
#include "RimWellPath.h"
#include "RimPerforationCollection.h"
#include "RiuMainWindow.h"
#include "Riu3DMainWindowTools.h"
#include "RifWellPathFormationsImporter.h"
#include "RifWellPathImporter.h"
@@ -138,7 +138,7 @@ void RimWellPathCollection::readWellPathFiles()
QString errorMessage;
if (!wellPaths[wpIdx]->readWellPathFile(&errorMessage, m_wellPathImporter))
{
QMessageBox::warning(RiuMainWindow::instance(),
QMessageBox::warning(Riu3DMainWindowTools::mainWindowWidget(),
"File open error",
errorMessage);
}
@@ -159,7 +159,7 @@ void RimWellPathCollection::readWellPathFiles()
displayMessage += errorMessage;
}
QMessageBox::warning(RiuMainWindow::instance(),
QMessageBox::warning(Riu3DMainWindowTools::mainWindowWidget(),
"File open error",
displayMessage);
}
@@ -367,7 +367,7 @@ void RimWellPathCollection::addWellPathFormations(const QStringList& filePaths)
if (fileReadSuccess)
{
QMessageBox::information(RiuMainWindow::instance(), "Well Picks Import", outputMessage);
QMessageBox::information(Riu3DMainWindowTools::mainWindowWidget(), "Well Picks Import", outputMessage);
RiaLogging::info(outputMessage);
}
@@ -489,7 +489,7 @@ void RimWellPathCollection::readWellPathFormationFiles()
QString errorMessage;
if (!wellPaths[wpIdx]->readWellPathFormationsFile(&errorMessage, m_wellPathFormationsImporter))
{
QMessageBox::warning(RiuMainWindow::instance(),
QMessageBox::warning(Riu3DMainWindowTools::mainWindowWidget(),
"File open error",
errorMessage);
}
@@ -511,7 +511,7 @@ void RimWellPathCollection::reloadAllWellPathFormations()
QString errorMessage;
if (!wellPaths[wpIdx]->reloadWellPathFormationsFile(&errorMessage, m_wellPathFormationsImporter))
{
QMessageBox::warning(RiuMainWindow::instance(),
QMessageBox::warning(Riu3DMainWindowTools::mainWindowWidget(),
"File open error",
errorMessage);
}