Skip to content
Permalink
Browse files

update filters with new formats

  • Loading branch information
PeterPetrik authored and wonder-sk committed Jul 13, 2018
1 parent 14fa499 commit f9fc708d97d943c4dbd86efdc2752ccc52343a56
@@ -134,7 +134,10 @@ void QgsMeshLayerProperties::addDataset()

QgsSettings settings;
QString openFileDir = settings.value( QStringLiteral( "lastMeshDatasetDir" ), QDir::homePath(), QgsSettings::App ).toString();
QString openFileString = QFileDialog::getOpenFileName( nullptr, tr( "Load mesh datasets" ), openFileDir, tr( "Layout mesh datasets" ) + " (*.*)" );
QString openFileString = QFileDialog::getOpenFileName( nullptr,
tr( "Load mesh datasets" ),
openFileDir,
QStringLiteral( "All files(*.*);;Results Files XMDF(*.xmdf);;Results Files DAT(*.dat)" ) );

if ( openFileString.isEmpty() )
{
@@ -64,7 +64,13 @@ QGISEXTERN QgsDataItem *dataItem( QString path, QgsDataItem *parentItem )
if ( sExtensions.isEmpty() )
{
// TODO ask MDAL for extensions !
sExtensions << QStringLiteral( "2dm" );
sExtensions << QStringLiteral( "2dm" )
<< QStringLiteral( "grb" )
<< QStringLiteral( "grb2" )
<< QStringLiteral( "bin" )
<< QStringLiteral( "grib" )
<< QStringLiteral( "grib1" )
<< QStringLiteral( "grib2" );
}

// Filter files by extension
@@ -28,7 +28,7 @@ QgsMdalSourceSelect::QgsMdalSourceSelect( QWidget *parent, Qt::WindowFlags fl, Q
setupButtons( buttonBox );

mFileWidget->setDialogTitle( tr( "Open MDAL Supported Mesh Dataset(s)" ) );
mFileWidget->setFilter( QStringLiteral( "Mesh File (*.2dm);;All files (*.*)" ) );
mFileWidget->setFilter( QStringLiteral( "All files(*.*);;GRIB File(*.grb *.grb2 *.bin *.grib *.grib1 *.grib2);;2DM Mesh File(*.2dm)" ) );
mFileWidget->setStorageMode( QgsFileWidget::GetMultipleFiles );
connect( mFileWidget, &QgsFileWidget::fileChanged, this, [ = ]( const QString & path )
{

0 comments on commit f9fc708

Please sign in to comment.
You can’t perform that action at this time.