mirror of
https://github.com/qgis/QGIS.git
synced 2025-11-17 00:04:03 -05:00
Even more default path fixes
This commit is contained in:
parent
5198f634b4
commit
487be231a4
@ -1051,7 +1051,7 @@ void QgsGPSInformationWidget::on_mBtnLogFile_clicked()
|
|||||||
// Retrieve last used log file dir from persistent settings
|
// Retrieve last used log file dir from persistent settings
|
||||||
QSettings settings;
|
QSettings settings;
|
||||||
QString settingPath( "/gps/lastLogFileDir" );
|
QString settingPath( "/gps/lastLogFileDir" );
|
||||||
QString lastUsedDir = settings.value( settingPath, "." ).toString();
|
QString lastUsedDir = settings.value( settingPath, QDir::homePath() ).toString();
|
||||||
QString saveFilePath = QFileDialog::getSaveFileName( this, tr( "Save GPS log file as" ), lastUsedDir, tr( "NMEA files" ) + " (*.nmea)" );
|
QString saveFilePath = QFileDialog::getSaveFileName( this, tr( "Save GPS log file as" ), lastUsedDir, tr( "NMEA files" ) + " (*.nmea)" );
|
||||||
if ( saveFilePath.isNull() ) //canceled
|
if ( saveFilePath.isNull() ) //canceled
|
||||||
{
|
{
|
||||||
|
|||||||
@ -154,7 +154,7 @@ void QgsOSMDownloadDialog::onCurrentLayerChanged( int index )
|
|||||||
void QgsOSMDownloadDialog::onBrowseClicked()
|
void QgsOSMDownloadDialog::onBrowseClicked()
|
||||||
{
|
{
|
||||||
QSettings settings;
|
QSettings settings;
|
||||||
QString lastDir = settings.value( "/osm/lastDir" ).toString();
|
QString lastDir = settings.value( "/osm/lastDir", QDir::homePath() ).toString();
|
||||||
|
|
||||||
QString fileName = QFileDialog::getSaveFileName( this, QString(), lastDir, tr( "OpenStreetMap files (*.osm)" ) );
|
QString fileName = QFileDialog::getSaveFileName( this, QString(), lastDir, tr( "OpenStreetMap files (*.osm)" ) );
|
||||||
if ( fileName.isNull() )
|
if ( fileName.isNull() )
|
||||||
|
|||||||
@ -57,7 +57,7 @@ QgsOSMExportDialog::~QgsOSMExportDialog()
|
|||||||
void QgsOSMExportDialog::onBrowse()
|
void QgsOSMExportDialog::onBrowse()
|
||||||
{
|
{
|
||||||
QSettings settings;
|
QSettings settings;
|
||||||
QString lastDir = settings.value( "/osm/lastDir" ).toString();
|
QString lastDir = settings.value( "/osm/lastDir", QDir::homePath() ).toString();
|
||||||
|
|
||||||
QString fileName = QFileDialog::getOpenFileName( this, QString(), lastDir, tr( "SQLite databases (*.db)" ) );
|
QString fileName = QFileDialog::getOpenFileName( this, QString(), lastDir, tr( "SQLite databases (*.db)" ) );
|
||||||
if ( fileName.isNull() )
|
if ( fileName.isNull() )
|
||||||
|
|||||||
@ -46,7 +46,7 @@ QgsOSMImportDialog::~QgsOSMImportDialog()
|
|||||||
void QgsOSMImportDialog::onBrowseXml()
|
void QgsOSMImportDialog::onBrowseXml()
|
||||||
{
|
{
|
||||||
QSettings settings;
|
QSettings settings;
|
||||||
QString lastDir = settings.value( "/osm/lastDir" ).toString();
|
QString lastDir = settings.value( "/osm/lastDir", QDir::homePath() ).toString();
|
||||||
|
|
||||||
QString fileName = QFileDialog::getOpenFileName( this, QString(), lastDir, tr( "OpenStreetMap files (*.osm)" ) );
|
QString fileName = QFileDialog::getOpenFileName( this, QString(), lastDir, tr( "OpenStreetMap files (*.osm)" ) );
|
||||||
if ( fileName.isNull() )
|
if ( fileName.isNull() )
|
||||||
@ -59,7 +59,7 @@ void QgsOSMImportDialog::onBrowseXml()
|
|||||||
void QgsOSMImportDialog::onBrowseDb()
|
void QgsOSMImportDialog::onBrowseDb()
|
||||||
{
|
{
|
||||||
QSettings settings;
|
QSettings settings;
|
||||||
QString lastDir = settings.value( "/osm/lastDir" ).toString();
|
QString lastDir = settings.value( "/osm/lastDir", QDir::homePath() ).toString();
|
||||||
|
|
||||||
QString fileName = QFileDialog::getSaveFileName( this, QString(), lastDir, tr( "SQLite databases (*.db)" ) );
|
QString fileName = QFileDialog::getSaveFileName( this, QString(), lastDir, tr( "SQLite databases (*.db)" ) );
|
||||||
if ( fileName.isNull() )
|
if ( fileName.isNull() )
|
||||||
|
|||||||
@ -166,7 +166,7 @@ void QgsAttributeActionDialog::browse()
|
|||||||
{
|
{
|
||||||
// Popup a file browser and place the results into the action widget
|
// Popup a file browser and place the results into the action widget
|
||||||
QString action = QFileDialog::getOpenFileName(
|
QString action = QFileDialog::getOpenFileName(
|
||||||
this, tr( "Select an action", "File dialog window title" ) );
|
this, tr( "Select an action", "File dialog window title" ), QDir::homePath() );
|
||||||
|
|
||||||
if ( !action.isNull() )
|
if ( !action.isNull() )
|
||||||
actionAction->insertPlainText( action );
|
actionAction->insertPlainText( action );
|
||||||
|
|||||||
@ -241,7 +241,7 @@ void QgsBookmarks::importFromXML()
|
|||||||
{
|
{
|
||||||
QSettings settings;
|
QSettings settings;
|
||||||
|
|
||||||
QString lastUsedDir = settings.value( "/Windows/Bookmarks/LastUsedDirectory", QVariant() ).toString();
|
QString lastUsedDir = settings.value( "/Windows/Bookmarks/LastUsedDirectory", QDir::homePath() ).toString();
|
||||||
QString fileName = QFileDialog::getOpenFileName( this, tr( "Import Bookmarks" ), lastUsedDir,
|
QString fileName = QFileDialog::getOpenFileName( this, tr( "Import Bookmarks" ), lastUsedDir,
|
||||||
tr( "XML files (*.xml *XML)" ) );
|
tr( "XML files (*.xml *XML)" ) );
|
||||||
if ( fileName.isEmpty() )
|
if ( fileName.isEmpty() )
|
||||||
@ -317,7 +317,7 @@ void QgsBookmarks::exportToXML()
|
|||||||
{
|
{
|
||||||
QSettings settings;
|
QSettings settings;
|
||||||
|
|
||||||
QString lastUsedDir = settings.value( "/Windows/Bookmarks/LastUsedDirectory", QVariant() ).toString();
|
QString lastUsedDir = settings.value( "/Windows/Bookmarks/LastUsedDirectory", QDir::homePath() ).toString();
|
||||||
QString fileName = QFileDialog::getSaveFileName( this, tr( "Export bookmarks" ), lastUsedDir,
|
QString fileName = QFileDialog::getSaveFileName( this, tr( "Export bookmarks" ), lastUsedDir,
|
||||||
tr( "XML files( *.xml *.XML )" ) );
|
tr( "XML files( *.xml *.XML )" ) );
|
||||||
if ( fileName.isEmpty() )
|
if ( fileName.isEmpty() )
|
||||||
|
|||||||
@ -99,7 +99,8 @@ void QgsConfigureShortcutsDialog::populateActions()
|
|||||||
|
|
||||||
void QgsConfigureShortcutsDialog::saveShortcuts()
|
void QgsConfigureShortcutsDialog::saveShortcuts()
|
||||||
{
|
{
|
||||||
QString fileName = QFileDialog::getSaveFileName( this, tr( "Save shortcuts" ), ".", tr( "XML file" ) + " (*.xml);;" + tr( "All files" ) + " (*)" );
|
QString fileName = QFileDialog::getSaveFileName( this, tr( "Save shortcuts" ), QDir::homePath(),
|
||||||
|
tr( "XML file" ) + " (*.xml);;" + tr( "All files" ) + " (*)" );
|
||||||
|
|
||||||
if ( fileName.isEmpty() )
|
if ( fileName.isEmpty() )
|
||||||
return;
|
return;
|
||||||
@ -151,7 +152,8 @@ void QgsConfigureShortcutsDialog::saveShortcuts()
|
|||||||
|
|
||||||
void QgsConfigureShortcutsDialog::loadShortcuts()
|
void QgsConfigureShortcutsDialog::loadShortcuts()
|
||||||
{
|
{
|
||||||
QString fileName = QFileDialog::getOpenFileName( this, tr( "Load shortcuts" ), ".", tr( "XML file" ) + " (*.xml);;" + tr( "All files" ) + " (*)" );
|
QString fileName = QFileDialog::getOpenFileName( this, tr( "Load shortcuts" ), QDir::homePath(),
|
||||||
|
tr( "XML file" ) + " (*.xml);;" + tr( "All files" ) + " (*)" );
|
||||||
|
|
||||||
if ( fileName.isEmpty() )
|
if ( fileName.isEmpty() )
|
||||||
{
|
{
|
||||||
|
|||||||
@ -220,7 +220,7 @@ void QgsCustomizationDialog::on_actionSave_triggered( bool checked )
|
|||||||
{
|
{
|
||||||
Q_UNUSED( checked );
|
Q_UNUSED( checked );
|
||||||
QSettings mySettings;
|
QSettings mySettings;
|
||||||
QString lastDir = mySettings.value( mLastDirSettingsName, "." ).toString();
|
QString lastDir = mySettings.value( mLastDirSettingsName, QDir::homePath() ).toString();
|
||||||
|
|
||||||
QString fileName = QFileDialog::getSaveFileName( this,
|
QString fileName = QFileDialog::getSaveFileName( this,
|
||||||
tr( "Choose a customization INI file" ),
|
tr( "Choose a customization INI file" ),
|
||||||
@ -239,7 +239,7 @@ void QgsCustomizationDialog::on_actionLoad_triggered( bool checked )
|
|||||||
{
|
{
|
||||||
Q_UNUSED( checked );
|
Q_UNUSED( checked );
|
||||||
QSettings mySettings;
|
QSettings mySettings;
|
||||||
QString lastDir = mySettings.value( mLastDirSettingsName, "." ).toString();
|
QString lastDir = mySettings.value( mLastDirSettingsName, QDir::homePath() ).toString();
|
||||||
|
|
||||||
QString fileName = QFileDialog::getOpenFileName( this,
|
QString fileName = QFileDialog::getOpenFileName( this,
|
||||||
tr( "Choose a customization INI file" ),
|
tr( "Choose a customization INI file" ),
|
||||||
|
|||||||
@ -550,7 +550,7 @@ void QgsDxfExportDialog::on_mFileSelectionButton_clicked()
|
|||||||
{
|
{
|
||||||
//get last dxf save directory
|
//get last dxf save directory
|
||||||
QSettings s;
|
QSettings s;
|
||||||
QString lastSavePath = s.value( "qgis/lastDxfDir" ).toString();
|
QString lastSavePath = s.value( "qgis/lastDxfDir", QDir::homePath() ).toString();
|
||||||
|
|
||||||
QString filePath = QFileDialog::getSaveFileName( 0, tr( "Export as DXF" ), lastSavePath, tr( "DXF files *.dxf *.DXF" ) );
|
QString filePath = QFileDialog::getSaveFileName( 0, tr( "Export as DXF" ), lastSavePath, tr( "DXF files *.dxf *.DXF" ) );
|
||||||
if ( !filePath.isEmpty() )
|
if ( !filePath.isEmpty() )
|
||||||
|
|||||||
@ -111,7 +111,7 @@ void QgsNewSpatialiteLayerDialog::on_mTypeBox_currentIndexChanged( int index )
|
|||||||
void QgsNewSpatialiteLayerDialog::on_toolButtonNewDatabase_clicked()
|
void QgsNewSpatialiteLayerDialog::on_toolButtonNewDatabase_clicked()
|
||||||
{
|
{
|
||||||
QString fileName = QFileDialog::getSaveFileName( this, tr( "New SpatiaLite Database File" ),
|
QString fileName = QFileDialog::getSaveFileName( this, tr( "New SpatiaLite Database File" ),
|
||||||
".",
|
QDir::homePath(),
|
||||||
tr( "SpatiaLite" ) + " (*.sqlite *.db)" );
|
tr( "SpatiaLite" ) + " (*.sqlite *.db)" );
|
||||||
|
|
||||||
if ( fileName.isEmpty() )
|
if ( fileName.isEmpty() )
|
||||||
|
|||||||
@ -1923,7 +1923,7 @@ void QgsOptions::on_pbnDefaultScaleValues_clicked()
|
|||||||
|
|
||||||
void QgsOptions::on_pbnImportScales_clicked()
|
void QgsOptions::on_pbnImportScales_clicked()
|
||||||
{
|
{
|
||||||
QString fileName = QFileDialog::getOpenFileName( this, tr( "Load scales" ), ".",
|
QString fileName = QFileDialog::getOpenFileName( this, tr( "Load scales" ), QDir::homePath(),
|
||||||
tr( "XML files (*.xml *.XML)" ) );
|
tr( "XML files (*.xml *.XML)" ) );
|
||||||
if ( fileName.isEmpty() )
|
if ( fileName.isEmpty() )
|
||||||
{
|
{
|
||||||
@ -1949,7 +1949,7 @@ void QgsOptions::on_pbnImportScales_clicked()
|
|||||||
|
|
||||||
void QgsOptions::on_pbnExportScales_clicked()
|
void QgsOptions::on_pbnExportScales_clicked()
|
||||||
{
|
{
|
||||||
QString fileName = QFileDialog::getSaveFileName( this, tr( "Save scales" ), ".",
|
QString fileName = QFileDialog::getSaveFileName( this, tr( "Save scales" ), QDir::homePath(),
|
||||||
tr( "XML files (*.xml *.XML)" ) );
|
tr( "XML files (*.xml *.XML)" ) );
|
||||||
if ( fileName.isEmpty() )
|
if ( fileName.isEmpty() )
|
||||||
{
|
{
|
||||||
|
|||||||
@ -115,7 +115,7 @@ void QgsProjectLayerGroupDialog::on_mBrowseFileToolButton_clicked()
|
|||||||
QSettings s;
|
QSettings s;
|
||||||
QString projectFile = QFileDialog::getOpenFileName( this,
|
QString projectFile = QFileDialog::getOpenFileName( this,
|
||||||
tr( "Select project file" ),
|
tr( "Select project file" ),
|
||||||
s.value( "/qgis/last_embedded_project_path" ).toString(),
|
s.value( "/qgis/last_embedded_project_path", QDir::homePath() ).toString(),
|
||||||
tr( "QGIS files" ) + " (*.qgs *.QGS)" );
|
tr( "QGIS files" ) + " (*.qgs *.QGS)" );
|
||||||
if ( !projectFile.isEmpty() )
|
if ( !projectFile.isEmpty() )
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1379,7 +1379,7 @@ void QgsProjectProperties::on_pbnRemoveScale_clicked()
|
|||||||
|
|
||||||
void QgsProjectProperties::on_pbnImportScales_clicked()
|
void QgsProjectProperties::on_pbnImportScales_clicked()
|
||||||
{
|
{
|
||||||
QString fileName = QFileDialog::getOpenFileName( this, tr( "Load scales" ), ".",
|
QString fileName = QFileDialog::getOpenFileName( this, tr( "Load scales" ), QDir::homePath(),
|
||||||
tr( "XML files (*.xml *.XML)" ) );
|
tr( "XML files (*.xml *.XML)" ) );
|
||||||
if ( fileName.isEmpty() )
|
if ( fileName.isEmpty() )
|
||||||
{
|
{
|
||||||
@ -1405,7 +1405,7 @@ void QgsProjectProperties::on_pbnImportScales_clicked()
|
|||||||
|
|
||||||
void QgsProjectProperties::on_pbnExportScales_clicked()
|
void QgsProjectProperties::on_pbnExportScales_clicked()
|
||||||
{
|
{
|
||||||
QString fileName = QFileDialog::getSaveFileName( this, tr( "Save scales" ), ".",
|
QString fileName = QFileDialog::getSaveFileName( this, tr( "Save scales" ), QDir::homePath(),
|
||||||
tr( "XML files (*.xml *.XML)" ) );
|
tr( "XML files (*.xml *.XML)" ) );
|
||||||
if ( fileName.isEmpty() )
|
if ( fileName.isEmpty() )
|
||||||
{
|
{
|
||||||
|
|||||||
@ -225,7 +225,7 @@ void QgsRasterCalcDialog::on_mButtonBox_accepted()
|
|||||||
void QgsRasterCalcDialog::on_mOutputLayerPushButton_clicked()
|
void QgsRasterCalcDialog::on_mOutputLayerPushButton_clicked()
|
||||||
{
|
{
|
||||||
QSettings s;
|
QSettings s;
|
||||||
QString saveFileName = QFileDialog::getSaveFileName( 0, tr( "Enter result file" ), s.value( "/RasterCalculator/lastOutputDir" ).toString(), QDir::homePath() );
|
QString saveFileName = QFileDialog::getSaveFileName( 0, tr( "Enter result file" ), s.value( "/RasterCalculator/lastOutputDir", QDir::homePath() ).toString() );
|
||||||
if ( !saveFileName.isNull() )
|
if ( !saveFileName.isNull() )
|
||||||
{
|
{
|
||||||
mOutputLayerLineEdit->setText( saveFileName );
|
mOutputLayerLineEdit->setText( saveFileName );
|
||||||
|
|||||||
@ -161,7 +161,7 @@ void QgsValueMapConfigDlg::loadFromLayerButtonPushed()
|
|||||||
|
|
||||||
void QgsValueMapConfigDlg::loadFromCSVButtonPushed()
|
void QgsValueMapConfigDlg::loadFromCSVButtonPushed()
|
||||||
{
|
{
|
||||||
QString fileName = QFileDialog::getOpenFileName( 0, tr( "Select a file" ) );
|
QString fileName = QFileDialog::getOpenFileName( 0, tr( "Select a file" ), QDir::homePath() );
|
||||||
if ( fileName.isNull() )
|
if ( fileName.isNull() )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|||||||
@ -91,7 +91,7 @@ void QgsManageConnectionsDialog::doExportImport()
|
|||||||
|
|
||||||
if ( mDialogMode == Export )
|
if ( mDialogMode == Export )
|
||||||
{
|
{
|
||||||
QString fileName = QFileDialog::getSaveFileName( this, tr( "Save connections" ), ".",
|
QString fileName = QFileDialog::getSaveFileName( this, tr( "Save connections" ), QDir::homePath(),
|
||||||
tr( "XML files (*.xml *.XML)" ) );
|
tr( "XML files (*.xml *.XML)" ) );
|
||||||
if ( fileName.isEmpty() )
|
if ( fileName.isEmpty() )
|
||||||
{
|
{
|
||||||
|
|||||||
@ -291,7 +291,7 @@ void QgsOWSSourceSelect::on_mSaveButton_clicked()
|
|||||||
|
|
||||||
void QgsOWSSourceSelect::on_mLoadButton_clicked()
|
void QgsOWSSourceSelect::on_mLoadButton_clicked()
|
||||||
{
|
{
|
||||||
QString fileName = QFileDialog::getOpenFileName( this, tr( "Load connections" ), ".",
|
QString fileName = QFileDialog::getOpenFileName( this, tr( "Load connections" ), QDir::homePath(),
|
||||||
tr( "XML files (*.xml *XML)" ) );
|
tr( "XML files (*.xml *XML)" ) );
|
||||||
if ( fileName.isEmpty() )
|
if ( fileName.isEmpty() )
|
||||||
{
|
{
|
||||||
|
|||||||
@ -409,7 +409,7 @@ void QgsSingleBandPseudoColorRendererWidget::on_mLoadFromFileButton_clicked()
|
|||||||
bool importError = false;
|
bool importError = false;
|
||||||
QString badLines;
|
QString badLines;
|
||||||
QSettings settings;
|
QSettings settings;
|
||||||
QString lastDir = settings.value( "lastRasterFileFilterDir", "" ).toString();
|
QString lastDir = settings.value( "lastRasterFileFilterDir", QDir::homePath() ).toString();
|
||||||
QString fileName = QFileDialog::getOpenFileName( this, tr( "Open file" ), lastDir, tr( "Textfile (*.txt)" ) );
|
QString fileName = QFileDialog::getOpenFileName( this, tr( "Open file" ), lastDir, tr( "Textfile (*.txt)" ) );
|
||||||
QFile inputFile( fileName );
|
QFile inputFile( fileName );
|
||||||
if ( inputFile.open( QFile::ReadOnly ) )
|
if ( inputFile.open( QFile::ReadOnly ) )
|
||||||
|
|||||||
@ -123,7 +123,7 @@ void QgsStyleV2ExportImportDialog::doExportImport()
|
|||||||
|
|
||||||
if ( mDialogMode == Export )
|
if ( mDialogMode == Export )
|
||||||
{
|
{
|
||||||
QString fileName = QFileDialog::getSaveFileName( this, tr( "Save styles" ), ".",
|
QString fileName = QFileDialog::getSaveFileName( this, tr( "Save styles" ), QDir::homePath(),
|
||||||
tr( "XML files (*.xml *.XML)" ) );
|
tr( "XML files (*.xml *.XML)" ) );
|
||||||
if ( fileName.isEmpty() )
|
if ( fileName.isEmpty() )
|
||||||
{
|
{
|
||||||
@ -497,7 +497,7 @@ void QgsStyleV2ExportImportDialog::browse()
|
|||||||
|
|
||||||
if ( type == "file" )
|
if ( type == "file" )
|
||||||
{
|
{
|
||||||
mFileName = QFileDialog::getOpenFileName( this, tr( "Load styles" ), ".",
|
mFileName = QFileDialog::getOpenFileName( this, tr( "Load styles" ), QDir::homePath(),
|
||||||
tr( "XML files (*.xml *XML)" ) );
|
tr( "XML files (*.xml *XML)" ) );
|
||||||
if ( mFileName.isEmpty() )
|
if ( mFileName.isEmpty() )
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1933,7 +1933,7 @@ void QgsSvgMarkerSymbolLayerV2Widget::on_mFileToolButton_clicked()
|
|||||||
QSettings s;
|
QSettings s;
|
||||||
QString file = QFileDialog::getOpenFileName( 0,
|
QString file = QFileDialog::getOpenFileName( 0,
|
||||||
tr( "Select SVG file" ),
|
tr( "Select SVG file" ),
|
||||||
s.value( "/UI/lastSVGMarkerDir" ).toString(),
|
s.value( "/UI/lastSVGMarkerDir", QDir::homePath() ).toString(),
|
||||||
tr( "SVG files" ) + " (*.svg)" );
|
tr( "SVG files" ) + " (*.svg)" );
|
||||||
QFileInfo fi( file );
|
QFileInfo fi( file );
|
||||||
if ( file.isEmpty() || !fi.exists() )
|
if ( file.isEmpty() || !fi.exists() )
|
||||||
@ -2133,7 +2133,7 @@ QgsSymbolLayerV2* QgsSVGFillSymbolLayerWidget::symbolLayer()
|
|||||||
|
|
||||||
void QgsSVGFillSymbolLayerWidget::on_mBrowseToolButton_clicked()
|
void QgsSVGFillSymbolLayerWidget::on_mBrowseToolButton_clicked()
|
||||||
{
|
{
|
||||||
QString filePath = QFileDialog::getOpenFileName( 0, tr( "Select SVG texture file" ), QString(), tr( "SVG file" ) + " (*.svg);;" + tr( "All files" ) + " (*.*)" );
|
QString filePath = QFileDialog::getOpenFileName( 0, tr( "Select SVG texture file" ), QDir::homePath(), tr( "SVG file" ) + " (*.svg);;" + tr( "All files" ) + " (*.*)" );
|
||||||
if ( !filePath.isNull() )
|
if ( !filePath.isNull() )
|
||||||
{
|
{
|
||||||
mSVGLineEdit->setText( filePath );
|
mSVGLineEdit->setText( filePath );
|
||||||
|
|||||||
@ -143,7 +143,7 @@ void dxf2shpConverterGui::getInputFileName()
|
|||||||
QSettings settings;
|
QSettings settings;
|
||||||
QString s = QFileDialog::getOpenFileName( this,
|
QString s = QFileDialog::getOpenFileName( this,
|
||||||
tr( "Choose a DXF file to open" ),
|
tr( "Choose a DXF file to open" ),
|
||||||
settings.value( "/Plugin-DXF/text_path", "./" ).toString(),
|
settings.value( "/Plugin-DXF/text_path", QDir::homePath() ).toString(),
|
||||||
tr( "DXF files" ) + " (*.dxf)" );
|
tr( "DXF files" ) + " (*.dxf)" );
|
||||||
|
|
||||||
if ( !s.isEmpty() )
|
if ( !s.isEmpty() )
|
||||||
|
|||||||
@ -313,7 +313,7 @@ void eVisDatabaseConnectionGui::on_pbtnLoadPredefinedQueries_clicked()
|
|||||||
//There probably needs to be some more error checking, but works for now.
|
//There probably needs to be some more error checking, but works for now.
|
||||||
|
|
||||||
//Select the XML file to parse
|
//Select the XML file to parse
|
||||||
QString myFilename = QFileDialog::getOpenFileName( this, tr( "Open File" ), ".", "XML ( *.xml )" );
|
QString myFilename = QFileDialog::getOpenFileName( this, tr( "Open File" ), QDir::homePath(), "XML ( *.xml )" );
|
||||||
if ( myFilename != "" )
|
if ( myFilename != "" )
|
||||||
{
|
{
|
||||||
//Display the name of the file being parsed
|
//Display the name of the file being parsed
|
||||||
@ -453,9 +453,9 @@ void eVisDatabaseConnectionGui::on_cboxPredefinedQueryList_currentIndexChanged(
|
|||||||
void eVisDatabaseConnectionGui::on_pbtnOpenFile_clicked()
|
void eVisDatabaseConnectionGui::on_pbtnOpenFile_clicked()
|
||||||
{
|
{
|
||||||
if ( cboxDatabaseType->currentText() == "MSAccess" )
|
if ( cboxDatabaseType->currentText() == "MSAccess" )
|
||||||
leDatabaseName->setText( QFileDialog::getOpenFileName( this, tr( "Open File" ), ".", "MSAccess ( *.mdb )" ) );
|
leDatabaseName->setText( QFileDialog::getOpenFileName( this, tr( "Open File" ), QDir::homePath(), "MSAccess ( *.mdb )" ) );
|
||||||
else
|
else
|
||||||
leDatabaseName->setText( QFileDialog::getOpenFileName( this, tr( "Open File" ), ".", "Sqlite ( *.db )" ) );
|
leDatabaseName->setText( QFileDialog::getOpenFileName( this, tr( "Open File" ), QDir::homePath(), "Sqlite ( *.db )" ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -25,6 +25,7 @@
|
|||||||
**
|
**
|
||||||
**/
|
**/
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
|
#include <QDir>
|
||||||
|
|
||||||
#include "evisconfiguration.h"
|
#include "evisconfiguration.h"
|
||||||
|
|
||||||
|
|||||||
@ -1102,7 +1102,7 @@ void eVisGenericEventBrowserGui::on_tableFileTypeAssociations_cellDoubleClicked(
|
|||||||
{
|
{
|
||||||
if ( 1 == theColumn )
|
if ( 1 == theColumn )
|
||||||
{
|
{
|
||||||
QString myApplication = QFileDialog::getOpenFileName( this, tr( "Select Application" ), "", tr( "All ( * )" ) );
|
QString myApplication = QFileDialog::getOpenFileName( this, tr( "Select Application" ), QDir::homePath(), tr( "All ( * )" ) );
|
||||||
if ( "" != myApplication )
|
if ( "" != myApplication )
|
||||||
{
|
{
|
||||||
tableFileTypeAssociations->setItem( theRow, theColumn, new QTableWidgetItem( myApplication ) );
|
tableFileTypeAssociations->setItem( theRow, theColumn, new QTableWidgetItem( myApplication ) );
|
||||||
|
|||||||
@ -212,7 +212,7 @@ void QgsRasterTerrainAnalysisDialog::on_mAutomaticColorButton_clicked()
|
|||||||
|
|
||||||
void QgsRasterTerrainAnalysisDialog::on_mExportToCsvButton_clicked()
|
void QgsRasterTerrainAnalysisDialog::on_mExportToCsvButton_clicked()
|
||||||
{
|
{
|
||||||
QString file = QFileDialog::getSaveFileName( 0, tr( "Export Frequency distribution as csv" ) );
|
QString file = QFileDialog::getSaveFileName( 0, tr( "Export Frequency distribution as csv" ), QDir::homePath() );
|
||||||
if ( file.isEmpty() )
|
if ( file.isEmpty() )
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
@ -225,7 +225,7 @@ void QgsRasterTerrainAnalysisDialog::on_mExportToCsvButton_clicked()
|
|||||||
void QgsRasterTerrainAnalysisDialog::on_mExportColorsButton_clicked()
|
void QgsRasterTerrainAnalysisDialog::on_mExportColorsButton_clicked()
|
||||||
{
|
{
|
||||||
qWarning( "Export colors clicked" );
|
qWarning( "Export colors clicked" );
|
||||||
QString file = QFileDialog::getSaveFileName( 0, tr( "Export Colors and elevations as xml" ) );
|
QString file = QFileDialog::getSaveFileName( 0, tr( "Export Colors and elevations as xml" ), QDir::homePath() );
|
||||||
if ( file.isEmpty() )
|
if ( file.isEmpty() )
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
@ -259,7 +259,7 @@ void QgsRasterTerrainAnalysisDialog::on_mExportColorsButton_clicked()
|
|||||||
|
|
||||||
void QgsRasterTerrainAnalysisDialog::on_mImportColorsButton_clicked()
|
void QgsRasterTerrainAnalysisDialog::on_mImportColorsButton_clicked()
|
||||||
{
|
{
|
||||||
QString file = QFileDialog::getOpenFileName( 0, tr( "Import Colors and elevations from xml" ) );
|
QString file = QFileDialog::getOpenFileName( 0, tr( "Import Colors and elevations from xml" ), QDir::homePath() );
|
||||||
if ( file.isEmpty() )
|
if ( file.isEmpty() )
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
@ -297,7 +297,7 @@ void QgsRasterTerrainAnalysisDialog::on_mImportColorsButton_clicked()
|
|||||||
void QgsRasterTerrainAnalysisDialog::on_mOutputLayerToolButton_clicked()
|
void QgsRasterTerrainAnalysisDialog::on_mOutputLayerToolButton_clicked()
|
||||||
{
|
{
|
||||||
QSettings s;
|
QSettings s;
|
||||||
QString lastDir = s.value( "/RasterTerrainAnalysis/lastOutputDir" ).toString();
|
QString lastDir = s.value( "/RasterTerrainAnalysis/lastOutputDir", QDir::homePath() ).toString();
|
||||||
QString saveFileName = QFileDialog::getSaveFileName( 0, tr( "Enter result file" ), lastDir );
|
QString saveFileName = QFileDialog::getSaveFileName( 0, tr( "Enter result file" ), lastDir );
|
||||||
if ( !saveFileName.isNull() )
|
if ( !saveFileName.isNull() )
|
||||||
{
|
{
|
||||||
|
|||||||
@ -627,7 +627,7 @@ void QgsDelimitedTextSourceSelect::getOpenFileName()
|
|||||||
QString s = QFileDialog::getOpenFileName(
|
QString s = QFileDialog::getOpenFileName(
|
||||||
this,
|
this,
|
||||||
tr( "Choose a delimited text file to open" ),
|
tr( "Choose a delimited text file to open" ),
|
||||||
settings.value( mPluginKey + "/text_path", "./" ).toString(),
|
settings.value( mPluginKey + "/text_path", QDir::homePath() ).toString(),
|
||||||
tr( "Text files" ) + " (*.txt *.csv *.dat *.wkt);;"
|
tr( "Text files" ) + " (*.txt *.csv *.dat *.wkt);;"
|
||||||
+ tr( "All files" ) + " (* *.*)",
|
+ tr( "All files" ) + " (* *.*)",
|
||||||
&selectedFilter
|
&selectedFilter
|
||||||
|
|||||||
@ -254,7 +254,7 @@ void QgsMssqlSourceSelect::on_btnSave_clicked()
|
|||||||
|
|
||||||
void QgsMssqlSourceSelect::on_btnLoad_clicked()
|
void QgsMssqlSourceSelect::on_btnLoad_clicked()
|
||||||
{
|
{
|
||||||
QString fileName = QFileDialog::getOpenFileName( this, tr( "Load connections" ), ".",
|
QString fileName = QFileDialog::getOpenFileName( this, tr( "Load connections" ), QDir::homePath(),
|
||||||
tr( "XML files (*.xml *XML)" ) );
|
tr( "XML files (*.xml *XML)" ) );
|
||||||
if ( fileName.isEmpty() )
|
if ( fileName.isEmpty() )
|
||||||
{
|
{
|
||||||
|
|||||||
@ -313,7 +313,7 @@ void QgsPgSourceSelect::on_btnSave_clicked()
|
|||||||
|
|
||||||
void QgsPgSourceSelect::on_btnLoad_clicked()
|
void QgsPgSourceSelect::on_btnLoad_clicked()
|
||||||
{
|
{
|
||||||
QString fileName = QFileDialog::getOpenFileName( this, tr( "Load connections" ), ".",
|
QString fileName = QFileDialog::getOpenFileName( this, tr( "Load connections" ), QDir::homePath(),
|
||||||
tr( "XML files (*.xml *XML)" ) );
|
tr( "XML files (*.xml *XML)" ) );
|
||||||
if ( fileName.isEmpty() )
|
if ( fileName.isEmpty() )
|
||||||
{
|
{
|
||||||
|
|||||||
@ -528,7 +528,7 @@ void QgsWFSSourceSelect::on_btnSave_clicked()
|
|||||||
|
|
||||||
void QgsWFSSourceSelect::on_btnLoad_clicked()
|
void QgsWFSSourceSelect::on_btnLoad_clicked()
|
||||||
{
|
{
|
||||||
QString fileName = QFileDialog::getOpenFileName( this, tr( "Load connections" ), ".",
|
QString fileName = QFileDialog::getOpenFileName( this, tr( "Load connections" ), QDir::homePath(),
|
||||||
tr( "XML files (*.xml *XML)" ) );
|
tr( "XML files (*.xml *XML)" ) );
|
||||||
if ( fileName.isEmpty() )
|
if ( fileName.isEmpty() )
|
||||||
{
|
{
|
||||||
|
|||||||
@ -213,7 +213,7 @@ void QgsWMSSourceSelect::on_btnSave_clicked()
|
|||||||
|
|
||||||
void QgsWMSSourceSelect::on_btnLoad_clicked()
|
void QgsWMSSourceSelect::on_btnLoad_clicked()
|
||||||
{
|
{
|
||||||
QString fileName = QFileDialog::getOpenFileName( this, tr( "Load connections" ), ".",
|
QString fileName = QFileDialog::getOpenFileName( this, tr( "Load connections" ), QDir::homePath(),
|
||||||
tr( "XML files (*.xml *XML)" ) );
|
tr( "XML files (*.xml *XML)" ) );
|
||||||
if ( fileName.isEmpty() )
|
if ( fileName.isEmpty() )
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user