mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#6345 Use wrapper class instead of QFileDialog
This commit is contained in:
@@ -25,9 +25,10 @@
|
||||
#include "RicWellMeasurementImportTools.h"
|
||||
|
||||
#include "Riu3DMainWindowTools.h"
|
||||
#include "RiuFileDialogTools.h"
|
||||
|
||||
#include <QAction>
|
||||
#include <QFileDialog>
|
||||
#include <QFileInfo>
|
||||
|
||||
CAF_CMD_SOURCE_INIT( RicImportWellMeasurementsFeature, "RicImportWellMeasurementsFeature" );
|
||||
|
||||
@@ -48,12 +49,13 @@ void RicImportWellMeasurementsFeature::onActionTriggered( bool isChecked )
|
||||
CVF_ASSERT( wellPathCollection );
|
||||
|
||||
// Open dialog box to select well path files
|
||||
RiaApplication* app = RiaApplication::instance();
|
||||
QString defaultDir = app->lastUsedDialogDirectory( "WELLPATH_DIR" );
|
||||
QStringList wellPathFilePaths = QFileDialog::getOpenFileNames( Riu3DMainWindowTools::mainWindowWidget(),
|
||||
"Import Well Measurements",
|
||||
defaultDir,
|
||||
"Well Measurements (*.csv);;All Files (*.*)" );
|
||||
RiaApplication* app = RiaApplication::instance();
|
||||
QString defaultDir = app->lastUsedDialogDirectory( "WELLPATH_DIR" );
|
||||
QStringList wellPathFilePaths =
|
||||
RiuFileDialogTools::getOpenFileNames( Riu3DMainWindowTools::mainWindowWidget(),
|
||||
"Import Well Measurements",
|
||||
defaultDir,
|
||||
"Well Measurements (*.csv);;All Files (*.*)" );
|
||||
|
||||
if ( wellPathFilePaths.size() < 1 ) return;
|
||||
|
||||
|
||||
@@ -30,11 +30,12 @@
|
||||
#include "RimWellPathCollection.h"
|
||||
|
||||
#include "Riu3DMainWindowTools.h"
|
||||
#include "RiuFileDialogTools.h"
|
||||
|
||||
#include "cafPdmFieldIOScriptability.h"
|
||||
|
||||
#include <QAction>
|
||||
#include <QFileDialog>
|
||||
#include <QDir>
|
||||
#include <QMessageBox>
|
||||
|
||||
//==================================================================================================
|
||||
@@ -216,8 +217,10 @@ void RicImportWellPaths::onActionTriggered( bool isChecked )
|
||||
|
||||
QString nameList = QString( "Well Paths (%1);;All Files (*.*)" ).arg( wellPathNameFilters().join( " " ) );
|
||||
|
||||
QStringList wellPathFilePaths =
|
||||
QFileDialog::getOpenFileNames( Riu3DMainWindowTools::mainWindowWidget(), "Import Well Paths", defaultDir, nameList );
|
||||
QStringList wellPathFilePaths = RiuFileDialogTools::getOpenFileNames( Riu3DMainWindowTools::mainWindowWidget(),
|
||||
"Import Well Paths",
|
||||
defaultDir,
|
||||
nameList );
|
||||
|
||||
if ( wellPathFilePaths.size() >= 1 )
|
||||
{
|
||||
|
||||
@@ -27,9 +27,10 @@
|
||||
#include "RimWellPathCollection.h"
|
||||
|
||||
#include "Riu3DMainWindowTools.h"
|
||||
#include "RiuFileDialogTools.h"
|
||||
|
||||
#include <QAction>
|
||||
#include <QFileDialog>
|
||||
#include <QFileInfo>
|
||||
|
||||
CAF_CMD_SOURCE_INIT( RicWellPathFormationsImportFileFeature, "RicWellPathFormationsImportFileFeature" );
|
||||
|
||||
@@ -47,12 +48,13 @@ bool RicWellPathFormationsImportFileFeature::isCommandEnabled()
|
||||
void RicWellPathFormationsImportFileFeature::onActionTriggered( bool isChecked )
|
||||
{
|
||||
// Open dialog box to select well path formations files
|
||||
RiaApplication* app = RiaApplication::instance();
|
||||
QString defaultDir = app->lastUsedDialogDirectory( "WELLPATHFORMATIONS_DIR" );
|
||||
QStringList wellPathFormationsFilePaths = QFileDialog::getOpenFileNames( Riu3DMainWindowTools::mainWindowWidget(),
|
||||
"Import Well Picks",
|
||||
defaultDir,
|
||||
"Well Picks (*.csv);;All Files (*.*)" );
|
||||
RiaApplication* app = RiaApplication::instance();
|
||||
QString defaultDir = app->lastUsedDialogDirectory( "WELLPATHFORMATIONS_DIR" );
|
||||
QStringList wellPathFormationsFilePaths =
|
||||
RiuFileDialogTools::getOpenFileNames( Riu3DMainWindowTools::mainWindowWidget(),
|
||||
"Import Well Picks",
|
||||
defaultDir,
|
||||
"Well Picks (*.csv);;All Files (*.*)" );
|
||||
|
||||
if ( wellPathFormationsFilePaths.size() < 1 ) return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user