mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Replace last QFileDialog usage with RiuFileDialogTools.
This commit is contained in:
parent
ccd99adb84
commit
034b39568d
@ -24,16 +24,17 @@
|
||||
#include "RimColorLegend.h"
|
||||
#include "RimColorLegendCollection.h"
|
||||
#include "RimColorLegendItem.h"
|
||||
|
||||
#include "RimProject.h"
|
||||
|
||||
#include "RifColorLegendData.h"
|
||||
|
||||
#include "Riu3DMainWindowTools.h"
|
||||
#include "RiuFileDialogTools.h"
|
||||
|
||||
#include "cafSelectionManager.h"
|
||||
|
||||
#include <QAction>
|
||||
#include <QFileDialog>
|
||||
#include <QFileInfo>
|
||||
|
||||
CAF_CMD_SOURCE_INIT( RicImportColorCategoriesFeature, "RicImportColorCategoriesFeature" );
|
||||
|
||||
@ -65,10 +66,10 @@ void RicImportColorCategoriesFeature::onActionTriggered( bool isChecked )
|
||||
|
||||
QString filterText = QString( "Formation Names description File (*.lyr);;All Files (*.*)" );
|
||||
|
||||
QString fileName = QFileDialog::getOpenFileName( Riu3DMainWindowTools::mainWindowWidget(),
|
||||
"Import Formation File",
|
||||
defaultDir,
|
||||
filterText );
|
||||
QString fileName = RiuFileDialogTools::getOpenFileName( Riu3DMainWindowTools::mainWindowWidget(),
|
||||
"Import Formation File",
|
||||
defaultDir,
|
||||
filterText );
|
||||
|
||||
if ( fileName.isEmpty() ) return;
|
||||
|
||||
|
@ -31,7 +31,6 @@
|
||||
#include "cafUtils.h"
|
||||
|
||||
#include <QAction>
|
||||
#include <QFileDialog>
|
||||
|
||||
CAF_CMD_SOURCE_INIT( RicExportFractureModelPlotToFileFeature, "RicExportFractureModelPlotToFileFeature" );
|
||||
|
||||
|
@ -25,11 +25,12 @@
|
||||
#include "RimFractureModel.h"
|
||||
|
||||
#include "Riu3DMainWindowTools.h"
|
||||
#include "RiuFileDialogTools.h"
|
||||
|
||||
#include "cafSelectionManager.h"
|
||||
|
||||
#include <QAction>
|
||||
#include <QFileDialog>
|
||||
#include <QFileInfo>
|
||||
|
||||
CAF_CMD_SOURCE_INIT( RicImportElasticPropertiesFeature, "RicImportElasticPropertiesFeature" );
|
||||
|
||||
@ -52,10 +53,10 @@ void RicImportElasticPropertiesFeature::onActionTriggered( bool isChecked )
|
||||
// Open dialog box to select files
|
||||
RiaApplication* app = RiaApplication::instance();
|
||||
QString defaultDir = app->lastUsedDialogDirectoryWithFallbackToProjectFolder( "STIMPLAN_DIR" );
|
||||
QString filePath = QFileDialog::getOpenFileName( Riu3DMainWindowTools::mainWindowWidget(),
|
||||
"Import Elastic Properties",
|
||||
defaultDir,
|
||||
"Elastic Properties (*.csv);;All Files (*.*)" );
|
||||
QString filePath = RiuFileDialogTools::getOpenFileName( Riu3DMainWindowTools::mainWindowWidget(),
|
||||
"Import Elastic Properties",
|
||||
defaultDir,
|
||||
"Elastic Properties (*.csv);;All Files (*.*)" );
|
||||
|
||||
if ( filePath.isNull() ) return;
|
||||
|
||||
|
@ -33,11 +33,12 @@
|
||||
#include "RifRoffReader.h"
|
||||
|
||||
#include "Riu3DMainWindowTools.h"
|
||||
#include "RiuFileDialogTools.h"
|
||||
|
||||
#include "cafColorTable.h"
|
||||
|
||||
#include <QAction>
|
||||
#include <QFileDialog>
|
||||
#include <QFileInfo>
|
||||
|
||||
CAF_CMD_SOURCE_INIT( RicImportFaciesFeature, "RicImportFaciesFeature" );
|
||||
|
||||
@ -59,8 +60,10 @@ void RicImportFaciesFeature::onActionTriggered( bool isChecked )
|
||||
|
||||
QString filterText = QString( "Roff ascii file (*.roff);;All Files (*.*)" );
|
||||
|
||||
QString fileName =
|
||||
QFileDialog::getOpenFileName( Riu3DMainWindowTools::mainWindowWidget(), "Import Facies", defaultDir, filterText );
|
||||
QString fileName = RiuFileDialogTools::getOpenFileName( Riu3DMainWindowTools::mainWindowWidget(),
|
||||
"Import Facies",
|
||||
defaultDir,
|
||||
filterText );
|
||||
|
||||
if ( fileName.isEmpty() ) return;
|
||||
|
||||
|
@ -29,7 +29,6 @@
|
||||
#include "cafUtils.h"
|
||||
|
||||
#include <QAction>
|
||||
#include <QFileDialog>
|
||||
|
||||
CAF_CMD_SOURCE_INIT( RicCopySurfaceFeature, "RicCopySurfaceFeature" );
|
||||
|
||||
|
@ -23,13 +23,15 @@
|
||||
#include "RifSurfaceExporter.h"
|
||||
#include "RigSurface.h"
|
||||
#include "RimGridCaseSurface.h"
|
||||
|
||||
#include "Riu3DMainWindowTools.h"
|
||||
#include "RiuFileDialogTools.h"
|
||||
|
||||
#include "cafSelectionManagerTools.h"
|
||||
#include "cafUtils.h"
|
||||
|
||||
#include <QAction>
|
||||
#include <QFileDialog>
|
||||
#include <QFileInfo>
|
||||
|
||||
CAF_CMD_SOURCE_INIT( RicExportKLayerToPtlFeature, "RicExportKLayerToPtlFeature" );
|
||||
|
||||
@ -70,11 +72,11 @@ void RicExportKLayerToPtlFeature::onActionTriggered( bool isChecked )
|
||||
|
||||
for ( RimGridCaseSurface* surf : surfaces )
|
||||
{
|
||||
QString fileName = QFileDialog::getSaveFileName( nullptr,
|
||||
tr( "Export to File" ),
|
||||
defaultAbsFileName,
|
||||
fileExtensionFilter,
|
||||
&selectedExtension );
|
||||
QString fileName = RiuFileDialogTools::getSaveFileName( nullptr,
|
||||
tr( "Export to File" ),
|
||||
defaultAbsFileName,
|
||||
fileExtensionFilter,
|
||||
&selectedExtension );
|
||||
if ( fileName.isEmpty() ) return;
|
||||
|
||||
app->setLastUsedDialogDirectory( "EXPORT_SURFACE", QFileInfo( fileName ).absolutePath() );
|
||||
|
@ -22,14 +22,17 @@
|
||||
|
||||
#include "RifSurfaceExporter.h"
|
||||
#include "RigSurface.h"
|
||||
|
||||
#include "RimSurface.h"
|
||||
|
||||
#include "Riu3DMainWindowTools.h"
|
||||
#include "RiuFileDialogTools.h"
|
||||
|
||||
#include "cafSelectionManagerTools.h"
|
||||
#include "cafUtils.h"
|
||||
|
||||
#include <QAction>
|
||||
#include <QFileDialog>
|
||||
#include <QFileInfo>
|
||||
|
||||
CAF_CMD_SOURCE_INIT( RicExportSurfaceToTsurfFeature, "RicExportSurfaceToTsurfFeature" );
|
||||
|
||||
@ -67,11 +70,11 @@ void RicExportSurfaceToTsurfFeature::onActionTriggered( bool isChecked )
|
||||
std::vector<RimSurface*> surfaces = caf::selectedObjectsByTypeStrict<RimSurface*>();
|
||||
for ( RimSurface* surf : surfaces )
|
||||
{
|
||||
QString fileName = QFileDialog::getSaveFileName( nullptr,
|
||||
tr( "Export to File" ),
|
||||
defaultAbsFileName,
|
||||
fileExtensionFilter,
|
||||
&selectedExtension );
|
||||
QString fileName = RiuFileDialogTools::getSaveFileName( nullptr,
|
||||
tr( "Export to File" ),
|
||||
defaultAbsFileName,
|
||||
fileExtensionFilter,
|
||||
&selectedExtension );
|
||||
if ( fileName.isEmpty() ) return;
|
||||
|
||||
app->setLastUsedDialogDirectory( "EXPORT_SURFACE", QFileInfo( fileName ).absolutePath() );
|
||||
|
@ -29,7 +29,6 @@
|
||||
#include "cafUtils.h"
|
||||
|
||||
#include <QAction>
|
||||
#include <QFileDialog>
|
||||
|
||||
CAF_CMD_SOURCE_INIT( RicNewSurfaceCollectionFeature, "RicNewSurfaceCollectionFeature" );
|
||||
|
||||
|
@ -29,7 +29,6 @@
|
||||
#include "cafUtils.h"
|
||||
|
||||
#include <QAction>
|
||||
#include <QFileDialog>
|
||||
|
||||
CAF_CMD_SOURCE_INIT( RicReloadSurfaceFeature, "RicReloadSurfaceFeature" );
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
#include "RifSurfaceExporter.h"
|
||||
|
||||
#include <QFileDialog>
|
||||
#include <QFile>
|
||||
#include <QTextStream>
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user