Skip to content
Permalink
Browse files

More default path fixes. Remove What's This? from toolbar

  • Loading branch information
NathanW2 committed Dec 3, 2015
1 parent 3cbad7d commit 18c52abfda3ad9419b58878e1383a2667bccf1b1
@@ -3043,7 +3043,7 @@ void QgsComposer::on_mActionLoadFromTemplate_triggered()
void QgsComposer::loadTemplate( const bool newComposer )
{
QSettings settings;
QString openFileDir = settings.value( "UI/lastComposerTemplateDir", "" ).toString();
QString openFileDir = settings.value( "UI/lastComposerTemplateDir", QDir::homePath() ).toString();
QString openFileString = QFileDialog::getOpenFileName( 0, tr( "Load template" ), openFileDir, "*.qpt" );

if ( openFileString.isEmpty() )
@@ -1906,11 +1906,6 @@ void QgisApp::createToolBars()
connect( tbAddCircularString, SIGNAL( triggered( QAction * ) ), this, SLOT( toolButtonActionTriggered( QAction * ) ) );
mDigitizeToolBar->insertWidget( mActionMoveFeature, tbAddCircularString );

// Help Toolbar
QAction* actionWhatsThis = QWhatsThis::createAction( this );
actionWhatsThis->setIcon( QgsApplication::getThemeIcon( "/mActionWhatsThis.svg" ) );
mHelpToolBar->addAction( actionWhatsThis );

// Cad toolbar
mAdvancedDigitizeToolBar->insertAction( mActionUndo, mAdvancedDigitizingDockWidget->enableAction() );
}
@@ -808,7 +808,7 @@ QgsAttributeEditorElement* QgsFieldsProperties::createAttributeEditorWidget( QTr
void QgsFieldsProperties::on_pbnSelectEditForm_clicked()
{
QSettings myQSettings;
QString lastUsedDir = myQSettings.value( "style/lastUIDir", "." ).toString();
QString lastUsedDir = myQSettings.value( "style/lastUIDir", QDir::homePath() ).toString();
QString uifilename = QFileDialog::getOpenFileName( this, tr( "Select edit form" ), lastUsedDir, tr( "UI file" ) + " (*.ui)" );

if ( uifilename.isNull() )
@@ -1226,7 +1226,7 @@ void QgsRasterLayerProperties::adjustTransparencyCellWidth( int row, int column
void QgsRasterLayerProperties::on_pbnExportTransparentPixelValues_clicked()
{
QSettings myQSettings;
QString myLastDir = myQSettings.value( "lastRasterFileFilterDir", "" ).toString();
QString myLastDir = myQSettings.value( "lastRasterFileFilterDir", QDir::homePath() ).toString();
QString myFileName = QFileDialog::getSaveFileName( this, tr( "Save file" ), myLastDir, tr( "Textfile" ) + " (*.txt)" );
if ( !myFileName.isEmpty() )
{
@@ -1391,7 +1391,7 @@ void QgsRasterLayerProperties::on_pbnImportTransparentPixelValues_clicked()
bool myImportError = false;
QString myBadLines;
QSettings myQSettings;
QString myLastDir = myQSettings.value( "lastRasterFileFilterDir", "" ).toString();
QString myLastDir = myQSettings.value( "lastRasterFileFilterDir", QDir::homePath() ).toString();
QString myFileName = QFileDialog::getOpenFileName( this, tr( "Open file" ), myLastDir, tr( "Textfile" ) + " (*.txt)" );
QFile myInputFile( myFileName );
if ( myInputFile.open( QFile::ReadOnly ) )
@@ -1684,7 +1684,7 @@ void QgsRasterLayerProperties::saveDefaultStyle_clicked()
void QgsRasterLayerProperties::loadStyle_clicked()
{
QSettings settings;
QString lastUsedDir = settings.value( "style/lastStyleDir", "." ).toString();
QString lastUsedDir = settings.value( "style/lastStyleDir", QDir::homePath() ).toString();

QString fileName = QFileDialog::getOpenFileName(
this,
@@ -1715,7 +1715,7 @@ void QgsRasterLayerProperties::loadStyle_clicked()
void QgsRasterLayerProperties::saveStyleAs_clicked()
{
QSettings settings;
QString lastUsedDir = settings.value( "style/lastStyleDir", "." ).toString();
QString lastUsedDir = settings.value( "style/lastStyleDir", QDir::homePath() ).toString();

QString outputFileName = QFileDialog::getSaveFileName(
this,
@@ -68,7 +68,7 @@ void QgsSaveStyleToDbDialog::accept()
void QgsSaveStyleToDbDialog::on_mFilePickButton_clicked()
{
QSettings myQSettings; // where we keep last used filter in persistent state
QString myLastUsedDir = myQSettings.value( "style/lastStyleDir", "." ).toString();
QString myLastUsedDir = myQSettings.value( "style/lastStyleDir", QDir::homePath() ).toString();

QString myFileName = QFileDialog::getOpenFileName( this, tr( "Attach Qt Designer UI file" ), myLastUsedDir, tr( "Qt Designer UI file .ui" ) + " (*.ui)" );
if ( myFileName.isNull() )
@@ -814,7 +814,7 @@ void QgsVectorLayerProperties::saveDefaultStyle_clicked()
void QgsVectorLayerProperties::loadStyle_clicked()
{
QSettings myQSettings; // where we keep last used filter in persistent state
QString myLastUsedDir = myQSettings.value( "style/lastStyleDir", "." ).toString();
QString myLastUsedDir = myQSettings.value( "style/lastStyleDir", QDir::homePath() ).toString();

QString myFileName = QFileDialog::getOpenFileName( this, tr( "Load layer properties from style file" ), myLastUsedDir,
tr( "QGIS Layer Style File" ) + " (*.qml);;" + tr( "SLD File" ) + " (*.sld)" );
@@ -875,7 +875,7 @@ void QgsVectorLayerProperties::saveStyleAsMenuTriggered( QAction *action )
void QgsVectorLayerProperties::saveStyleAs( StyleType styleType )
{
QSettings myQSettings; // where we keep last used filter in persistent state
QString myLastUsedDir = myQSettings.value( "style/lastStyleDir", "." ).toString();
QString myLastUsedDir = myQSettings.value( "style/lastStyleDir", QDir::homePath() ).toString();

QString format, extension;
if ( styleType == DB )
@@ -492,7 +492,7 @@ void QgsSingleBandPseudoColorRendererWidget::on_mLoadFromFileButton_clicked()
void QgsSingleBandPseudoColorRendererWidget::on_mExportToFileButton_clicked()
{
QSettings settings;
QString lastDir = settings.value( "lastRasterFileFilterDir", "" ).toString();
QString lastDir = settings.value( "lastRasterFileFilterDir", QDir::homePath() ).toString();
QString fileName = QFileDialog::getSaveFileName( this, tr( "Save file" ), lastDir, tr( "Textfile (*.txt)" ) );
if ( !fileName.isEmpty() )
{
@@ -964,7 +964,7 @@ int QgsCategorizedSymbolRendererV2Widget::matchToSymbols( QgsStyleV2* style )
void QgsCategorizedSymbolRendererV2Widget::matchToSymbolsFromXml()
{
QSettings settings;
QString openFileDir = settings.value( "UI/lastMatchToSymbolsDir", "" ).toString();
QString openFileDir = settings.value( "UI/lastMatchToSymbolsDir", QDir::homePath() ).toString();

QString fileName = QFileDialog::getOpenFileName( this, tr( "Match to symbols from file" ), openFileDir,
tr( "XML files (*.xml *XML)" ) );
@@ -45,7 +45,7 @@ eVisConfiguration::eVisConfiguration()
setAttributeCompassOffset( myQSettings.value( "/eVis/attributecompassoffset", false ).toBool() );
setCompassOffsetField( myQSettings.value( "/eVis/compassoffsetfield", "" ).toString() );

setBasePath( myQSettings.value( "/eVis/basepath", "" ).toString() );
setBasePath( myQSettings.value( "/eVis/basepath", QDir::homePath() ).toString() );
mUseOnlyFilename = myQSettings.value( "/eVis/useonlyfilename", false ).toBool();
}

@@ -137,7 +137,7 @@ void QgsTransformSettingsDialog::resetSettings()
s.setValue( "/Plugin-GeoReferencer/user_specified_resx", 1.0 );
s.setValue( "/Plugin-GeoReferencer/user_specified_resy", -1.0 );
s.setValue( "/Plugin-GeoReferencer/word_file_checkbox", false );
s.setValue( "/Plugin-GeoReferencer/lastPDFReportDir", "" );
s.setValue( "/Plugin-GeoReferencer/lastPDFReportDir", QDir::homePath() );
}

void QgsTransformSettingsDialog::changeEvent( QEvent *e )
@@ -218,7 +218,7 @@ void QgsTransformSettingsDialog::on_tbnOutputRaster_clicked()
void QgsTransformSettingsDialog::on_tbnMapFile_clicked()
{
QSettings s;
QString myLastUsedDir = s.value( "/Plugin-GeoReferencer/lastPDFReportDir", "" ).toString();
QString myLastUsedDir = s.value( "/Plugin-GeoReferencer/lastPDFReportDir", QDir::homePath() ).toString();
QString initialFile = !mMapFileLineEdit->text().isEmpty() ? mMapFileLineEdit->text() : myLastUsedDir;
QString outputFileName = QFileDialog::getSaveFileName( this, tr( "Save Map File as" ), initialFile, tr( "PDF Format" ) + " (*.pdf *PDF)" );
if ( !outputFileName.isNull() )
@@ -234,7 +234,7 @@ void QgsTransformSettingsDialog::on_tbnMapFile_clicked()
void QgsTransformSettingsDialog::on_tbnReportFile_clicked()
{
QSettings s;
QString myLastUsedDir = s.value( "/Plugin-GeoReferencer/lastPDFReportDir", "" ).toString();
QString myLastUsedDir = s.value( "/Plugin-GeoReferencer/lastPDFReportDir", QDir::homePath() ).toString();
QString initialFile = !mReportFileLineEdit->text().isEmpty() ? mReportFileLineEdit->text() : myLastUsedDir;
QString outputFileName = QFileDialog::getSaveFileName( this, tr( "Save Report File as" ), initialFile, tr( "PDF Format" ) + " (*.pdf *PDF)" );
if ( !outputFileName.isNull() )
@@ -166,7 +166,7 @@ void QgsGPSPlugin::run()
void QgsGPSPlugin::createGPX()
{
QSettings settings;
QString dir = settings.value( "/Plugin-GPS/gpxdirectory", "." ).toString();
QString dir = settings.value( "/Plugin-GPS/gpxdirectory", QDir::homePath() ).toString();
QString fileName =
QFileDialog::getSaveFileName( mQGisInterface->mainWindow(),
tr( "Save new GPX file as..." ),
@@ -562,7 +562,7 @@ void QgsGPSPlugin::setupBabel()
{
// where is gpsbabel?
QSettings settings;
mBabelPath = settings.value( "/Plugin-GPS/gpsbabelpath", "" ).toString();
mBabelPath = settings.value( "/Plugin-GPS/gpsbabelpath", QDir::homePath() ).toString();
if ( mBabelPath.isEmpty() )
mBabelPath = "gpsbabel";
// the importable formats
@@ -241,7 +241,7 @@ void HeatmapGui::on_mButtonBox_helpRequested()
void HeatmapGui::on_mBrowseButton_clicked()
{
QSettings s;
QString lastDir = s.value( "/Heatmap/lastOutputDir", "" ).toString();
QString lastDir = s.value( "/Heatmap/lastOutputDir", QDir::homePath() ).toString();

QString outputFilename = QFileDialog::getSaveFileName( 0, tr( "Save Heatmap as:" ), lastDir );
if ( !outputFilename.isEmpty() )

0 comments on commit 18c52ab

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