mirror of
https://github.com/OPM/ResInsight.git
synced 2026-08-10 05:08:21 -05:00
#2535 Use the MainWindowTools class instead of MainWindow directly (part 4)
This commit is contained in:
+2
-2
@@ -27,7 +27,7 @@
|
||||
#include "RimWellPathCompletions.h"
|
||||
#include "RimWellPathCollection.h"
|
||||
|
||||
#include "RiuMainWindow.h"
|
||||
#include "Riu3DMainWindowTools.h"
|
||||
|
||||
#include "cafSelectionManager.h"
|
||||
|
||||
@@ -60,7 +60,7 @@ void RicWellPathImportCompletionsFileFeature::onActionTriggered(bool isChecked)
|
||||
// Open dialog box to select well path files
|
||||
RiaApplication* app = RiaApplication::instance();
|
||||
QString defaultDir = app->lastUsedDialogDirectory("WELLPATH_DIR");
|
||||
QStringList wellPathFilePaths = QFileDialog::getOpenFileNames(RiuMainWindow::instance(), "Import Well Path Completions", defaultDir, "Well Path Completions (*.json *.asc *.asci *.ascii *.dev);;All Files (*.*)");
|
||||
QStringList wellPathFilePaths = QFileDialog::getOpenFileNames(Riu3DMainWindowTools::mainWindowWidget(), "Import Well Path Completions", defaultDir, "Well Path Completions (*.json *.asc *.asci *.ascii *.dev);;All Files (*.*)");
|
||||
|
||||
if (wellPathFilePaths.size() < 1) return;
|
||||
|
||||
|
||||
+3
-3
@@ -29,7 +29,7 @@
|
||||
|
||||
#include "RifPerforationIntervalReader.h"
|
||||
|
||||
#include "RiuMainWindow.h"
|
||||
#include "Riu3DMainWindowTools.h"
|
||||
|
||||
#include "cafSelectionManager.h"
|
||||
|
||||
@@ -62,7 +62,7 @@ void RicWellPathImportPerforationIntervalsFeature::onActionTriggered(bool isChec
|
||||
// Open dialog box to select well path files
|
||||
RiaApplication* app = RiaApplication::instance();
|
||||
QString defaultDir = app->lastUsedDialogDirectory("WELLPATH_DIR");
|
||||
QStringList wellPathFilePaths = QFileDialog::getOpenFileNames(RiuMainWindow::instance(), "Import Well Path Perforation Intervals", defaultDir, "Well Path Perforation Intervals (*.ev);;All Files (*.*)");
|
||||
QStringList wellPathFilePaths = QFileDialog::getOpenFileNames(Riu3DMainWindowTools::mainWindowWidget(), "Import Well Path Perforation Intervals", defaultDir, "Well Path Perforation Intervals (*.ev);;All Files (*.*)");
|
||||
|
||||
if (wellPathFilePaths.size() < 1) return;
|
||||
|
||||
@@ -109,7 +109,7 @@ void RicWellPathImportPerforationIntervalsFeature::onActionTriggered(bool isChec
|
||||
|
||||
if (lastPerforationInterval)
|
||||
{
|
||||
RiuMainWindow::instance()->selectAsCurrentItem(lastPerforationInterval);
|
||||
Riu3DMainWindowTools::selectAsCurrentItem(lastPerforationInterval);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -34,7 +34,7 @@
|
||||
#include "RigEclipseCaseData.h"
|
||||
#include "RigWellPath.h"
|
||||
|
||||
#include "RiuMainWindow.h"
|
||||
#include "Riu3DMainWindowTools.h"
|
||||
|
||||
#include "cafSelectionManager.h"
|
||||
#include "cafPdmUiPropertyViewDialog.h"
|
||||
@@ -78,7 +78,7 @@ void RicExportFishbonesWellSegmentsFeature::onActionTriggered(bool isChecked)
|
||||
|
||||
exportSettings.folder = defaultDir;
|
||||
|
||||
caf::PdmUiPropertyViewDialog propertyDialog(RiuMainWindow::instance(), &exportSettings, "Export Well Segments", "");
|
||||
caf::PdmUiPropertyViewDialog propertyDialog(Riu3DMainWindowTools::mainWindowWidget(), &exportSettings, "Export Well Segments", "");
|
||||
RicExportFeatureImpl::configureForExport(&propertyDialog);
|
||||
|
||||
if (propertyDialog.exec() == QDialog::Accepted)
|
||||
|
||||
+2
-2
@@ -30,7 +30,7 @@
|
||||
#include "RimWellPath.h"
|
||||
#include "RimWellPathCollection.h"
|
||||
|
||||
#include "RiuMainWindow.h"
|
||||
#include "Riu3DMainWindowTools.h"
|
||||
|
||||
#include "cafPdmUiPropertyViewDialog.h"
|
||||
#include "cafSelectionManager.h"
|
||||
@@ -118,7 +118,7 @@ void RicWellPathExportCompletionDataFeature::onActionTriggered(bool isChecked)
|
||||
|
||||
if (exportSettings->folder().isEmpty()) exportSettings->folder = defaultDir;
|
||||
|
||||
caf::PdmUiPropertyViewDialog propertyDialog(RiuMainWindow::instance(), exportSettings, "Export Completion Data", "");
|
||||
caf::PdmUiPropertyViewDialog propertyDialog(Riu3DMainWindowTools::mainWindowWidget(), exportSettings, "Export Completion Data", "");
|
||||
RicExportFeatureImpl::configureForExport(&propertyDialog);
|
||||
|
||||
if (propertyDialog.exec() == QDialog::Accepted)
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#include "RimEclipseInputCase.h"
|
||||
|
||||
#include "RiaApplication.h"
|
||||
#include "RiuMainWindow.h"
|
||||
#include "Riu3DMainWindowTools.h"
|
||||
|
||||
#include "cafSelectionManager.h"
|
||||
|
||||
@@ -49,7 +49,7 @@ void RicAddEclipseInputPropertyFeature::onActionTriggered(bool isChecked)
|
||||
{
|
||||
RiaApplication* app = RiaApplication::instance();
|
||||
QString defaultDir = app->lastUsedDialogDirectory("INPUT_FILES");
|
||||
QStringList fileNames = QFileDialog::getOpenFileNames(RiuMainWindow::instance(), "Select Eclipse Input Property Files", defaultDir, "All Files (*.* *)");
|
||||
QStringList fileNames = QFileDialog::getOpenFileNames(Riu3DMainWindowTools::mainWindowWidget(), "Select Eclipse Input Property Files", defaultDir, "All Files (*.* *)");
|
||||
|
||||
if (fileNames.isEmpty()) return;
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
#include "RimEclipseCaseCollection.h"
|
||||
|
||||
#include "RiuMainWindow.h"
|
||||
#include "Riu3DMainWindowTools.h"
|
||||
|
||||
#include "cafSelectionManager.h"
|
||||
|
||||
@@ -50,7 +50,7 @@ void RicImportEclipseCaseFeature::onActionTriggered(bool isChecked)
|
||||
RiaApplication* app = RiaApplication::instance();
|
||||
|
||||
QString defaultDir = app->lastUsedDialogDirectory("BINARY_GRID");
|
||||
QStringList fileNames = QFileDialog::getOpenFileNames(RiuMainWindow::instance(), "Import Eclipse File", defaultDir, "Eclipse Grid Files (*.GRID *.EGRID)");
|
||||
QStringList fileNames = QFileDialog::getOpenFileNames(Riu3DMainWindowTools::mainWindowWidget(), "Import Eclipse File", defaultDir, "Eclipse Grid Files (*.GRID *.EGRID)");
|
||||
if (fileNames.size()) defaultDir = QFileInfo(fileNames.last()).absolutePath();
|
||||
app->setLastUsedDialogDirectory("BINARY_GRID", defaultDir);
|
||||
|
||||
|
||||
+2
-2
@@ -21,7 +21,7 @@
|
||||
#include "RiaApplication.h"
|
||||
#include "RiaImportEclipseCaseTools.h"
|
||||
|
||||
#include "RiuMainWindow.h"
|
||||
#include "Riu3DMainWindowTools.h"
|
||||
|
||||
#include <QAction>
|
||||
#include <QFileDialog>
|
||||
@@ -38,7 +38,7 @@ void RicImportEclipseCaseTimeStepFilterFeature::onActionTriggered(bool isChecked
|
||||
RiaApplication* app = RiaApplication::instance();
|
||||
|
||||
QString defaultDir = app->lastUsedDialogDirectory("BINARY_GRID");
|
||||
QString fileName = QFileDialog::getOpenFileName(RiuMainWindow::instance(), "Import Eclipse File", defaultDir, "Eclipse Grid Files (*.GRID *.EGRID)");
|
||||
QString fileName = QFileDialog::getOpenFileName(Riu3DMainWindowTools::mainWindowWidget(), "Import Eclipse File", defaultDir, "Eclipse Grid Files (*.GRID *.EGRID)");
|
||||
if (!fileName.isEmpty())
|
||||
{
|
||||
defaultDir = QFileInfo(fileName).absolutePath();
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#include "RimOilField.h"
|
||||
#include "RimProject.h"
|
||||
|
||||
#include "RiuMainWindow.h"
|
||||
#include "Riu3DMainWindowTools.h"
|
||||
|
||||
#include "cafSelectionManager.h"
|
||||
|
||||
@@ -76,7 +76,7 @@ bool RicImportInputEclipseCaseFeature::openInputEclipseCaseFromFileNames(const Q
|
||||
|
||||
analysisModels->updateConnectedEditors();
|
||||
|
||||
RiuMainWindow::instance()->selectAsCurrentItem(riv->cellResult());
|
||||
Riu3DMainWindowTools::selectAsCurrentItem(riv->cellResult());
|
||||
|
||||
if (fileNames.size() == 1)
|
||||
{
|
||||
@@ -101,7 +101,7 @@ void RicImportInputEclipseCaseFeature::onActionTriggered(bool isChecked)
|
||||
{
|
||||
RiaApplication* app = RiaApplication::instance();
|
||||
QString defaultDir = app->lastUsedDialogDirectory("INPUT_FILES");
|
||||
QStringList fileNames = QFileDialog::getOpenFileNames(RiuMainWindow::instance(), "Import Eclipse Input Files", defaultDir, "Eclipse Input Files and Input Properties Eclipse Input Files (*.GRDECL);;All Files (*.*)");
|
||||
QStringList fileNames = QFileDialog::getOpenFileNames(Riu3DMainWindowTools::mainWindowWidget(), "Import Eclipse Input Files", defaultDir, "Eclipse Input Files and Input Properties Eclipse Input Files (*.GRDECL);;All Files (*.*)");
|
||||
|
||||
if (fileNames.isEmpty()) return;
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#include "RimEclipseInputPropertyCollection.h"
|
||||
#include "RimExportInputPropertySettings.h"
|
||||
|
||||
#include "RiuMainWindow.h"
|
||||
#include "Riu3DMainWindowTools.h"
|
||||
|
||||
#include "cafPdmUiPropertyViewDialog.h"
|
||||
#include "cafSelectionManager.h"
|
||||
@@ -68,7 +68,7 @@ void RicSaveEclipseInputPropertyFeature::onActionTriggered(bool isChecked)
|
||||
|
||||
if (!isResolved)
|
||||
{
|
||||
QMessageBox::warning(RiuMainWindow::instance(), "Export failure", "Property is not resolved, and then it is not possible to export the property.");
|
||||
QMessageBox::warning(Riu3DMainWindowTools::mainWindowWidget(), "Export failure", "Property is not resolved, and then it is not possible to export the property.");
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -101,7 +101,7 @@ void RicSaveEclipseInputPropertyFeature::onActionTriggered(bool isChecked)
|
||||
exportSettings.fileName = outputFileName;
|
||||
}
|
||||
|
||||
caf::PdmUiPropertyViewDialog propertyDialog(RiuMainWindow::instance(), &exportSettings, "Export Eclipse Property to Text File", "");
|
||||
caf::PdmUiPropertyViewDialog propertyDialog(Riu3DMainWindowTools::mainWindowWidget(), &exportSettings, "Export Eclipse Property to Text File", "");
|
||||
RicExportFeatureImpl::configureForExport(&propertyDialog);
|
||||
|
||||
if (propertyDialog.exec() == QDialog::Accepted)
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
#include "RigActiveCellInfo.h"
|
||||
#include "RigEclipseCaseData.h"
|
||||
|
||||
#include "RiuMainWindow.h"
|
||||
#include "Riu3DMainWindowTools.h"
|
||||
|
||||
#include "cafPdmUiPropertyViewDialog.h"
|
||||
#include "cafSelectionManager.h"
|
||||
@@ -54,7 +54,7 @@ void executeCommand(RimEclipseView* view)
|
||||
if (!view) return;
|
||||
|
||||
RicSaveEclipseInputVisibleCellsUi exportSettings;
|
||||
caf::PdmUiPropertyViewDialog propertyDialog(RiuMainWindow::instance(), &exportSettings, "Export FLUXNUM/MULTNUM", "");
|
||||
caf::PdmUiPropertyViewDialog propertyDialog(Riu3DMainWindowTools::mainWindowWidget(), &exportSettings, "Export FLUXNUM/MULTNUM", "");
|
||||
RicExportFeatureImpl::configureForExport(&propertyDialog);
|
||||
|
||||
if (propertyDialog.exec() == QDialog::Accepted)
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
#include "RimEclipseCellColors.h"
|
||||
#include "RimEclipseView.h"
|
||||
|
||||
#include "RiuMainWindow.h"
|
||||
#include "Riu3DMainWindowTools.h"
|
||||
|
||||
#include "cafPdmUiPropertyViewDialog.h"
|
||||
#include "cafUtils.h"
|
||||
@@ -92,7 +92,7 @@ void RicSaveEclipseResultAsInputPropertyExec::redo()
|
||||
exportSettings.fileName = outputFileName;
|
||||
}
|
||||
|
||||
caf::PdmUiPropertyViewDialog propertyDialog(RiuMainWindow::instance(), &exportSettings, "Export Binary Eclipse Data to Text File", "");
|
||||
caf::PdmUiPropertyViewDialog propertyDialog(Riu3DMainWindowTools::mainWindowWidget(), &exportSettings, "Export Binary Eclipse Data to Text File", "");
|
||||
RicExportFeatureImpl::configureForExport(&propertyDialog);
|
||||
|
||||
if (propertyDialog.exec() == QDialog::Accepted)
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#include "RimCase.h"
|
||||
#include "RimIntersection.h"
|
||||
|
||||
#include "RiuMainWindow.h"
|
||||
#include "Riu3DMainWindowTools.h"
|
||||
#include "RiuSelectionManager.h"
|
||||
|
||||
#include "cafSelectionManagerTools.h"
|
||||
@@ -67,7 +67,7 @@ void RicNewIntersectionViewFeature::onActionTriggered(bool isChecked)
|
||||
QString text = QString("The intersection view only supports vertical intersections.\n"
|
||||
"The intersection '%1' is not vertical but a converted version will be shown in the view .").arg(intersection->name());
|
||||
|
||||
QMessageBox::warning(RiuMainWindow::instance(), "New Intersection View", text);
|
||||
QMessageBox::warning(Riu3DMainWindowTools::mainWindowWidget(), "New Intersection View", text);
|
||||
}
|
||||
|
||||
Rim2dIntersectionView* intersectionView = intersection->correspondingIntersectionView();
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#include "RicScriptFeatureImpl.h"
|
||||
|
||||
#include "RimScriptCollection.h"
|
||||
#include "RiuMainWindow.h"
|
||||
#include "Riu3DMainWindowTools.h"
|
||||
|
||||
#include "cvfAssert.h"
|
||||
|
||||
@@ -49,7 +49,7 @@ bool RicAddScriptPathFeature::isCommandEnabled()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicAddScriptPathFeature::onActionTriggered(bool isChecked)
|
||||
{
|
||||
QString selectedFolder = QFileDialog::getExistingDirectory(RiuMainWindow::instance(), "Select script folder");
|
||||
QString selectedFolder = QFileDialog::getExistingDirectory(Riu3DMainWindowTools::mainWindowWidget(), "Select script folder");
|
||||
if (!selectedFolder.isEmpty())
|
||||
{
|
||||
QString filePathString = RiaApplication::instance()->preferences()->scriptDirectories();
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#include "RimCalcScript.h"
|
||||
#include "RiaApplication.h"
|
||||
|
||||
#include "RiuMainWindow.h"
|
||||
#include "Riu3DMainWindowTools.h"
|
||||
|
||||
#include "cafSelectionManager.h"
|
||||
#include "cvfAssert.h"
|
||||
@@ -65,7 +65,7 @@ void RicEditScriptFeature::onActionTriggered(bool isChecked)
|
||||
|
||||
if (!myProcess->waitForStarted(1000))
|
||||
{
|
||||
QMessageBox::warning(RiuMainWindow::instance(), "Script editor", "Failed to start script editor executable\n" + scriptEditor);
|
||||
QMessageBox::warning(Riu3DMainWindowTools::mainWindowWidget(), "Script editor", "Failed to start script editor executable\n" + scriptEditor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#include "RimCalcScript.h"
|
||||
#include "RimScriptCollection.h"
|
||||
|
||||
#include "RiuMainWindow.h"
|
||||
#include "Riu3DMainWindowTools.h"
|
||||
#include "RiuTools.h"
|
||||
|
||||
#include "cafUtils.h"
|
||||
@@ -99,7 +99,7 @@ void RicNewScriptFeature::onActionTriggered(bool isChecked)
|
||||
QFile file(fullPathFilenameNewScript);
|
||||
if (!file.open(QIODevice::WriteOnly | QIODevice::Text))
|
||||
{
|
||||
QMessageBox::warning(RiuMainWindow::instance(), "Script editor", "Failed to create file\n" + fullPathFilenameNewScript);
|
||||
QMessageBox::warning(Riu3DMainWindowTools::mainWindowWidget(), "Script editor", "Failed to create file\n" + fullPathFilenameNewScript);
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -108,7 +108,7 @@ void RicNewScriptFeature::onActionTriggered(bool isChecked)
|
||||
|
||||
if (calcScript)
|
||||
{
|
||||
RiuMainWindow::instance()->selectAsCurrentItem(calcScript);
|
||||
Riu3DMainWindowTools::selectAsCurrentItem(calcScript);
|
||||
}
|
||||
|
||||
RiaApplication* app = RiaApplication::instance();
|
||||
@@ -123,7 +123,7 @@ void RicNewScriptFeature::onActionTriggered(bool isChecked)
|
||||
|
||||
if (!myProcess->waitForStarted(1000))
|
||||
{
|
||||
QMessageBox::warning(RiuMainWindow::instance(), "Script editor", "Failed to start script editor executable\n" + scriptEditor);
|
||||
QMessageBox::warning(Riu3DMainWindowTools::mainWindowWidget(), "Script editor", "Failed to start script editor executable\n" + scriptEditor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
#include "RigFemPartResultsCollection.h"
|
||||
#include "RigGeoMechCaseData.h"
|
||||
|
||||
#include "RiuMainWindow.h"
|
||||
#include "Riu3DMainWindowTools.h"
|
||||
|
||||
#include <QAction>
|
||||
#include <QFileDialog>
|
||||
@@ -56,7 +56,7 @@ void RicImportFormationNamesFeature::onActionTriggered(bool isChecked)
|
||||
{
|
||||
RiaApplication* app = RiaApplication::instance();
|
||||
QString defaultDir = app->lastUsedDialogDirectory("BINARY_GRID");
|
||||
QStringList fileNames = QFileDialog::getOpenFileNames(RiuMainWindow::instance(), "Import Formation Names", defaultDir, "Formation Names description File (*.lyr);;All Files (*.*)");
|
||||
QStringList fileNames = QFileDialog::getOpenFileNames(Riu3DMainWindowTools::mainWindowWidget(), "Import Formation Names", defaultDir, "Formation Names description File (*.lyr);;All Files (*.*)");
|
||||
|
||||
if (fileNames.isEmpty()) return;
|
||||
|
||||
@@ -96,7 +96,7 @@ void RicImportFormationNamesFeature::onActionTriggered(bool isChecked)
|
||||
|
||||
if (formationName)
|
||||
{
|
||||
RiuMainWindow::instance()->selectAsCurrentItem(formationName);
|
||||
Riu3DMainWindowTools::selectAsCurrentItem(formationName);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
#include "RiaApplication.h"
|
||||
#include "RimProject.h"
|
||||
#include "RiuMainWindow.h"
|
||||
#include "Riu3DMainWindowTools.h"
|
||||
|
||||
#include "cafPdmUiObjectEditorHandle.h"
|
||||
|
||||
@@ -46,7 +46,7 @@ void RicWellLogsImportFileFeature::onActionTriggered(bool isChecked)
|
||||
// Open dialog box to select well path files
|
||||
RiaApplication* app = RiaApplication::instance();
|
||||
QString defaultDir = app->lastUsedDialogDirectory("WELL_LOGS_DIR");
|
||||
QStringList wellLogFilePaths = QFileDialog::getOpenFileNames(RiuMainWindow::instance(), "Import Well Logs", defaultDir, "Well Logs (*.las);;All Files (*.*)");
|
||||
QStringList wellLogFilePaths = QFileDialog::getOpenFileNames(Riu3DMainWindowTools::mainWindowWidget(), "Import Well Logs", defaultDir, "Well Logs (*.las);;All Files (*.*)");
|
||||
|
||||
if (wellLogFilePaths.size() < 1) return;
|
||||
|
||||
|
||||
+3
-3
@@ -26,7 +26,7 @@
|
||||
#include "RimWellPath.h"
|
||||
#include "RimWellPathCollection.h"
|
||||
|
||||
#include "RiuMainWindow.h"
|
||||
#include "Riu3DMainWindowTools.h"
|
||||
|
||||
#include <QAction>
|
||||
#include <QFileDialog>
|
||||
@@ -50,7 +50,7 @@ void RicWellPathFormationsImportFileFeature::onActionTriggered(bool isChecked)
|
||||
RiaApplication* app = RiaApplication::instance();
|
||||
QString defaultDir = app->lastUsedDialogDirectory("WELLPATHFORMATIONS_DIR");
|
||||
QStringList wellPathFormationsFilePaths =
|
||||
QFileDialog::getOpenFileNames(RiuMainWindow::instance(), "Import Well Picks", defaultDir,
|
||||
QFileDialog::getOpenFileNames(Riu3DMainWindowTools::mainWindowWidget(), "Import Well Picks", defaultDir,
|
||||
"Well Picks (*.csv);;All Files (*.*)");
|
||||
|
||||
if (wellPathFormationsFilePaths.size() < 1)
|
||||
@@ -80,7 +80,7 @@ void RicWellPathFormationsImportFileFeature::onActionTriggered(bool isChecked)
|
||||
RimWellPath* wellPath = oilField->wellPathCollection->mostRecentlyUpdatedWellPath();
|
||||
if (wellPath)
|
||||
{
|
||||
RiuMainWindow::instance()->selectAsCurrentItem(wellPath);
|
||||
Riu3DMainWindowTools::selectAsCurrentItem(wellPath);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#include "RimWellPath.h"
|
||||
#include "RimWellPathCollection.h"
|
||||
|
||||
#include "RiuMainWindow.h"
|
||||
#include "Riu3DMainWindowTools.h"
|
||||
|
||||
#include <QAction>
|
||||
#include <QFileDialog>
|
||||
@@ -50,7 +50,7 @@ void RicWellPathsImportFileFeature::onActionTriggered(bool isChecked)
|
||||
// Open dialog box to select well path files
|
||||
RiaApplication* app = RiaApplication::instance();
|
||||
QString defaultDir = app->lastUsedDialogDirectory("WELLPATH_DIR");
|
||||
QStringList wellPathFilePaths = QFileDialog::getOpenFileNames(RiuMainWindow::instance(), "Import Well Paths", defaultDir, "Well Paths (*.json *.asc *.asci *.ascii *.dev);;All Files (*.*)");
|
||||
QStringList wellPathFilePaths = QFileDialog::getOpenFileNames(Riu3DMainWindowTools::mainWindowWidget(), "Import Well Paths", defaultDir, "Well Paths (*.json *.asc *.asci *.ascii *.dev);;All Files (*.*)");
|
||||
|
||||
if (wellPathFilePaths.size() < 1) return;
|
||||
|
||||
@@ -73,7 +73,7 @@ void RicWellPathsImportFileFeature::onActionTriggered(bool isChecked)
|
||||
RimWellPath* wellPath = oilField->wellPathCollection->mostRecentlyUpdatedWellPath();
|
||||
if (wellPath)
|
||||
{
|
||||
RiuMainWindow::instance()->selectAsCurrentItem(wellPath);
|
||||
Riu3DMainWindowTools::selectAsCurrentItem(wellPath);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
#include "RicWellPathsUnitSystemSettingsUi.h"
|
||||
|
||||
#include "RiuMainWindow.h"
|
||||
#include "Riu3DMainWindowTools.h"
|
||||
|
||||
#include "cafPdmUiPropertyViewDialog.h"
|
||||
|
||||
@@ -35,7 +35,7 @@ bool RicWellPathsUnitSystemSettingsImpl::ensureHasUnitSystem(RimWellPath * wellP
|
||||
}
|
||||
|
||||
RicWellPathsUnitSystemSettingsUi settings;
|
||||
caf::PdmUiPropertyViewDialog propertyDialog(RiuMainWindow::instance(), &settings, "Select Unit System for Well Path", "");
|
||||
caf::PdmUiPropertyViewDialog propertyDialog(Riu3DMainWindowTools::mainWindowWidget(), &settings, "Select Unit System for Well Path", "");
|
||||
if (propertyDialog.exec() == QDialog::Accepted)
|
||||
{
|
||||
wellPath->setUnitSystem(settings.unitSystem());
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#include "RifWellPathFormationReader.h"
|
||||
|
||||
#include "RiaLogging.h"
|
||||
#include "RiuMainWindow.h"
|
||||
#include "Riu3DMainWindowTools.h"
|
||||
|
||||
#include <QFile>
|
||||
#include <QMessageBox>
|
||||
@@ -63,7 +63,7 @@ std::map<QString, cvf::ref<RigWellPathFormations>>
|
||||
|
||||
if (wellNames.empty() || formationNames.empty())
|
||||
{
|
||||
QMessageBox::warning(RiuMainWindow::instance(), "Import failure",
|
||||
QMessageBox::warning(Riu3DMainWindowTools::mainWindowWidget(), "Import failure",
|
||||
QString("Failed to parse %1 as a well pick file").arg(filePath));
|
||||
RiaLogging::error(QString("Failed to parse %1 as a well pick file").arg(filePath));
|
||||
|
||||
@@ -71,7 +71,7 @@ std::map<QString, cvf::ref<RigWellPathFormations>>
|
||||
}
|
||||
else if (!(mdIsPresent || tvdIsPresent))
|
||||
{
|
||||
QMessageBox::warning(RiuMainWindow::instance(), "Import failure",
|
||||
QMessageBox::warning(Riu3DMainWindowTools::mainWindowWidget(), "Import failure",
|
||||
QString("Failed to parse %1 as a well pick file. Neither MD or TVD is present.").arg(filePath));
|
||||
RiaLogging::error(QString("Failed to parse %1 as a well pick file. Neither MD or TVD is present.").arg(filePath));
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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" +
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -20,6 +20,14 @@
|
||||
#include "RiuMainWindow.h"
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QWidget* Riu3DMainWindowTools::mainWindowWidget()
|
||||
{
|
||||
return RiuMainWindow::instance();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -29,6 +29,7 @@ namespace caf
|
||||
class Riu3DMainWindowTools
|
||||
{
|
||||
public:
|
||||
static QWidget* mainWindowWidget();
|
||||
static void setActiveViewer(QWidget* subWindow) ;
|
||||
static void setExpanded(const caf::PdmUiItem* uiItem, bool expanded = true);
|
||||
static void selectAsCurrentItem(const caf::PdmObject* object, bool allowActiveViewChange = true);
|
||||
|
||||
Reference in New Issue
Block a user