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:
@@ -23,6 +23,7 @@
|
||||
|
||||
#include "RimWellLogPlot.h"
|
||||
|
||||
#include "RiuFileDialogTools.h"
|
||||
#include "RiuMainWindow.h"
|
||||
|
||||
#include "cafPdmUiPropertyViewDialog.h"
|
||||
@@ -33,7 +34,7 @@
|
||||
|
||||
#include <QAction>
|
||||
#include <QDebug>
|
||||
#include <QFileDialog>
|
||||
#include <QDir>
|
||||
#include <QFileInfo>
|
||||
|
||||
CAF_CMD_SOURCE_INIT( RicAsciiExportWellLogPlotFeature, "RicAsciiExportWellLogPlotFeature" );
|
||||
@@ -66,10 +67,10 @@ void RicAsciiExportWellLogPlotFeature::onActionTriggered( bool isChecked )
|
||||
RimWellLogPlot* wellLogPlot = selectedWellLogPlots.at( 0 );
|
||||
QString defaultFileName = defaultDir + "/" +
|
||||
caf::Utils::makeValidFileBasename( ( wellLogPlot->description() ) ) + ".ascii";
|
||||
QString fileName = QFileDialog::getSaveFileName( nullptr,
|
||||
"Select File for Plot Data Export",
|
||||
defaultFileName,
|
||||
"Text File(*.ascii);;All files(*.*)" );
|
||||
QString fileName = RiuFileDialogTools::getSaveFileName( nullptr,
|
||||
"Select File for Plot Data Export",
|
||||
defaultFileName,
|
||||
"Text File(*.ascii);;All files(*.*)" );
|
||||
if ( fileName.isEmpty() ) return;
|
||||
RicAsciiExportWellLogPlotFeature::exportAsciiForWellLogPlot( fileName, wellLogPlot );
|
||||
|
||||
|
||||
@@ -25,11 +25,12 @@
|
||||
|
||||
#include "RimProject.h"
|
||||
#include "Riu3DMainWindowTools.h"
|
||||
#include "RiuFileDialogTools.h"
|
||||
|
||||
#include "cafPdmUiObjectEditorHandle.h"
|
||||
|
||||
#include <QAction>
|
||||
#include <QFileDialog>
|
||||
#include <QFileInfo>
|
||||
#include <QMessageBox>
|
||||
|
||||
CAF_CMD_SOURCE_INIT( RicWellLogsImportFileFeature, "RicWellLogsImportFileFeature" );
|
||||
@@ -80,10 +81,10 @@ void RicWellLogsImportFileFeature::onActionTriggered( bool isChecked )
|
||||
RiaApplication* app = RiaApplication::instance();
|
||||
QString defaultDir = app->lastUsedDialogDirectory( "WELL_LOGS_DIR" );
|
||||
QString nameFilterString = QString( "Well Logs (%1);;All Files (*.*)" ).arg( wellLogFileNameFilters().join( " " ) );
|
||||
QStringList wellLogFilePaths = QFileDialog::getOpenFileNames( Riu3DMainWindowTools::mainWindowWidget(),
|
||||
"Import Well Logs",
|
||||
defaultDir,
|
||||
nameFilterString );
|
||||
QStringList wellLogFilePaths = RiuFileDialogTools::getOpenFileNames( Riu3DMainWindowTools::mainWindowWidget(),
|
||||
"Import Well Logs",
|
||||
defaultDir,
|
||||
nameFilterString );
|
||||
|
||||
if ( wellLogFilePaths.size() >= 1 )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user