Skip to content
Permalink
Browse files

Merge pull request #4235 from boundlessgeo/qgssettings-housekeeping

QgsSettings housekeeping
  • Loading branch information
elpaso committed Mar 9, 2017
2 parents f5d0ba1 + 5739478 commit bbc849d73e7057b30adfb337bb228a53b2a8ec4d
Showing with 841 additions and 841 deletions.
  1. +2 −2 src/app/composer/qgsattributeselectiondialog.cpp
  2. +19 −19 src/app/composer/qgscomposer.cpp
  3. +2 −2 src/app/composer/qgscomposerimageexportoptionsdialog.cpp
  4. +4 −4 src/app/composer/qgscomposermanager.cpp
  5. +2 −2 src/app/composer/qgscomposertablebackgroundcolorsdialog.cpp
  6. +33 −33 src/app/gps/qgsgpsinformationwidget.cpp
  7. +7 −7 src/app/main.cpp
  8. +16 −16 src/app/nodetool/qgsmaptoolnodetool.cpp
  9. +1 −1 src/app/nodetool/qgsselectedfeature.cpp
  10. +2 −2 src/app/ogr/qgsnewogrconnection.cpp
  11. +7 −7 src/app/ogr/qgsopenvectorlayerdialog.cpp
  12. +8 −8 src/app/ogr/qgsvectorlayersaveasdialog.cpp
  13. +2 −2 src/app/openstreetmap/qgsosmdownloaddialog.cpp
  14. +2 −2 src/app/openstreetmap/qgsosmexportdialog.cpp
  15. +5 −5 src/app/openstreetmap/qgsosmimportdialog.cpp
  16. +2 −2 src/app/pluginmanager/qgspluginmanager.cpp
  17. +122 −122 src/app/qgisapp.cpp
  18. +3 −3 src/app/qgisappstylesheet.cpp
  19. +1 −1 src/app/qgsalignrasterdialog.cpp
  20. +8 −8 src/app/qgsattributetabledialog.cpp
  21. +2 −2 src/app/qgsattributetypedialog.cpp
  22. +7 −7 src/app/qgsbookmarks.cpp
  23. +8 −8 src/app/qgsbrowserdockwidget.cpp
  24. +2 −2 src/app/qgsclipboard.cpp
  25. +5 −5 src/app/qgscustomization.cpp
  26. +2 −2 src/app/qgscustomprojectiondialog.cpp
  27. +2 −2 src/app/qgsdecorationcopyrightdialog.cpp
  28. +2 −2 src/app/qgsdecorationnortharrowdialog.cpp
  29. +1 −1 src/app/qgsdecorationscalebar.cpp
  30. +2 −2 src/app/qgsdecorationscalebardialog.cpp
  31. +2 −2 src/app/qgsdelattrdialog.cpp
  32. +4 −4 src/app/qgsdiagramproperties.cpp
  33. +2 −2 src/app/qgsdisplayangle.cpp
  34. +3 −3 src/app/qgsfeatureaction.cpp
  35. +2 −2 src/app/qgsfieldcalculator.cpp
  36. +1 −1 src/app/qgshandlebadlayers.cpp
  37. +16 −16 src/app/qgsidentifyresultsdialog.cpp
  38. +2 −2 src/app/qgslabelpropertydialog.cpp
  39. +1 −1 src/app/qgslayerstylingwidget.cpp
  40. +2 −2 src/app/qgsloadstylefromdbdialog.cpp
  41. +4 −4 src/app/qgsmaptoollabel.cpp
  42. +3 −3 src/app/qgsmaptoolmeasureangle.cpp
  43. +2 −2 src/app/qgsmaptooloffsetcurve.cpp
  44. +4 −4 src/app/qgsmaptoolsimplify.cpp
  45. +6 −6 src/app/qgsmeasuredialog.cpp
  46. +3 −3 src/app/qgsmeasuretool.cpp
  47. +3 −3 src/app/qgsmergeattributesdialog.cpp
  48. +5 −5 src/app/qgsnewspatialitelayerdialog.cpp
  49. +2 −2 src/app/qgspluginregistry.cpp
  50. +2 −2 src/app/qgsprojectlayergroupdialog.cpp
  51. +7 −7 src/app/qgsprojectproperties.cpp
  52. +2 −2 src/app/qgsrastercalcdialog.cpp
  53. +1 −1 src/app/qgsrasterlayerproperties.cpp
  54. +2 −2 src/app/qgssavestyletodbdialog.cpp
  55. +3 −3 src/app/qgsselectbyformdialog.cpp
  56. +4 −4 src/app/qgsstatisticalsummarydockwidget.cpp
  57. +1 −1 src/app/qgsstatusbarmagnifierwidget.cpp
  58. +1 −1 src/app/qgsvectorlayerproperties.cpp
  59. +1 −1 src/app/qgswelcomepage.cpp
  60. +1 −1 src/core/composer/qgscomposerlabel.cpp
  61. +1 −1 src/core/composer/qgscomposermapgrid.cpp
  62. +1 −1 src/core/composer/qgscomposerscalebar.cpp
  63. +1 −1 src/core/composer/qgscomposertablev2.cpp
  64. +4 −4 src/core/composer/qgscomposition.cpp
  65. +8 −8 src/core/qgsapplication.cpp
  66. +2 −2 src/core/qgsbrowsermodel.cpp
  67. +8 −8 src/core/qgscolorscheme.cpp
  68. +7 −7 src/core/qgscoordinatereferencesystem.cpp
  69. +11 −11 src/core/qgsdataitem.cpp
  70. +1 −1 src/core/qgsgeometryvalidator.cpp
  71. +1 −1 src/core/qgslegendstyle.cpp
  72. +1 −1 src/core/qgsmaplayer.cpp
  73. +1 −1 src/core/qgsmaplayerlegend.cpp
  74. +1 −1 src/core/qgsmaprendererjob.cpp
  75. +6 −6 src/core/qgstolerance.cpp
  76. +1 −1 src/core/qgsvectordataprovider.cpp
  77. +2 −2 src/core/qgsvectorfilewriter.cpp
  78. +5 −5 src/core/qgsvectorlayer.cpp
  79. +3 −3 src/core/qgsvectorlayerrenderer.cpp
  80. +3 −3 src/core/raster/qgsrasterminmaxorigin.cpp
  81. +2 −2 src/gui/attributetable/qgsattributetableview.cpp
  82. +1 −1 src/gui/attributetable/qgsdualview.cpp
  83. +2 −2 src/gui/attributetable/qgsorganizetablecolumnsdialog.cpp
  84. +1 −1 src/gui/auth/qgsauthauthoritieseditor.cpp
  85. +1 −1 src/gui/auth/qgsauthconfigeditor.cpp
  86. +1 −1 src/gui/auth/qgsautheditorwidgets.cpp
  87. +1 −1 src/gui/auth/qgsauthidentitieseditor.cpp
  88. +1 −1 src/gui/auth/qgsauthserverseditor.cpp
  89. +1 −1 src/gui/auth/qgsauthtrustedcasdialog.cpp
  90. +4 −4 src/gui/editorwidgets/qgsrelationreferencewidget.cpp
  91. +4 −4 src/gui/qgisgui.cpp
  92. +1 −1 src/gui/qgsattributeform.cpp
  93. +2 −2 src/gui/qgscolorbutton.cpp
  94. +4 −4 src/gui/qgscolordialog.cpp
  95. +2 −2 src/gui/qgscolorwidgets.cpp
  96. +3 −3 src/gui/qgscomposerview.cpp
  97. +40 −40 src/gui/qgscompoundcolorwidget.cpp
  98. +2 −2 src/gui/qgsconfigureshortcutsdialog.cpp
  99. +8 −8 src/gui/qgsdatumtransformdialog.cpp
  100. +2 −2 src/gui/qgsencodingfiledialog.cpp
  101. +2 −2 src/gui/qgserrordialog.cpp
  102. +2 −2 src/gui/qgsexpressionbuilderdialog.cpp
  103. +6 −6 src/gui/qgsexpressionbuilderwidget.cpp
  104. +3 −3 src/gui/qgsexpressionselectiondialog.cpp
  105. +3 −3 src/gui/qgsfilewidget.cpp
  106. +10 −10 src/gui/qgsgradientcolorrampdialog.cpp
  107. +4 −4 src/gui/qgshistogramwidget.cpp
  108. +4 −4 src/gui/qgsidentifymenu.cpp
  109. +4 −4 src/gui/qgsmapcanvas.cpp
  110. +4 −4 src/gui/qgsmapcanvassnapper.cpp
  111. +1 −1 src/gui/qgsmaptool.cpp
  112. +1 −1 src/gui/qgsmaptoolcapture.cpp
  113. +15 −15 src/gui/qgsmaptooledit.cpp
  114. +3 −3 src/gui/qgsmaptoolidentify.cpp
  115. +2 −2 src/gui/qgsmessageviewer.cpp
  116. +3 −3 src/gui/qgsnewgeopackagelayerdialog.cpp
  117. +3 −3 src/gui/qgsnewmemorylayerdialog.cpp
  118. +6 −6 src/gui/qgsnewvectorlayerdialog.cpp
  119. +3 −3 src/gui/qgsowssourceselect.cpp
  120. +2 −2 src/gui/qgsprojectionselectiondialog.cpp
  121. +1 −1 src/gui/qgsprojectionselectionwidget.cpp
  122. +2 −2 src/gui/qgsquerybuilder.cpp
  123. +4 −4 src/gui/qgsrasterformatsaveoptionswidget.cpp
  124. +1 −1 src/gui/qgsrasterlayersaveasdialog.cpp
  125. +4 −4 src/gui/qgssourceselectdialog.cpp
  126. +1 −1 src/gui/qgssublayersdialog.cpp
  127. +8 −8 src/gui/qgstextformatwidget.cpp
  128. +8 −8 src/gui/raster/qgsrasterhistogramwidget.cpp
  129. +2 −2 src/gui/raster/qgssinglebandpseudocolorrendererwidget.cpp
  130. +4 −4 src/gui/symbology-ng/qgscptcitycolorrampdialog.cpp
  131. +2 −2 src/gui/symbology-ng/qgsrulebasedrendererwidget.cpp
  132. +4 −4 src/gui/symbology-ng/qgsstylemanagerdialog.cpp
  133. +6 −6 src/gui/symbology-ng/qgssvgselectorwidget.cpp
  134. +2 −2 src/gui/symbology-ng/qgssymbollevelsdialog.cpp
  135. +2 −2 src/gui/symbology-ng/qgssymbolselectordialog.cpp
  136. +2 −2 src/helpviewer/qgshelpviewer.cpp
  137. +2 −2 src/plugins/evis/databaseconnection/evisdatabaseconnectiongui.cpp
  138. +11 −11 src/plugins/evis/eventbrowser/evisconfiguration.cpp
  139. +13 −13 src/plugins/evis/eventbrowser/evisgenericeventbrowsergui.cpp
  140. +3 −3 src/plugins/georeferencer/qgsgeorefplugingui.cpp
  141. +2 −2 src/plugins/georeferencer/qgstransformsettingsdialog.cpp
  142. +8 −8 src/plugins/gps_importer/qgsgpsplugin.cpp
  143. +22 −22 src/plugins/gps_importer/qgsgpsplugingui.cpp
  144. +2 −2 src/plugins/grass/qgsgrassmoduleparam.cpp
  145. +7 −7 src/plugins/grass/qgsgrassnewmapset.cpp
  146. +2 −2 src/plugins/grass/qgsgrassplugin.cpp
  147. +4 −4 src/plugins/grass/qgsgrassselect.cpp
  148. +2 −2 src/plugins/grass/qgsgrasstools.cpp
  149. +11 −11 src/providers/db2/qgsdb2sourceselect.cpp
  150. +4 −4 src/providers/gdal/qgsgdaldataitems.cpp
  151. +1 −1 src/providers/gdal/qgsgdalprovider.cpp
  152. +19 −19 src/providers/grass/qgsgrass.cpp
  153. +4 −4 src/providers/grass/qgsgrassoptions.cpp
  154. +2 −2 src/providers/grass/qgsgrassprovidermodule.cpp
  155. +11 −11 src/providers/mssql/qgsmssqlsourceselect.cpp
  156. +4 −4 src/providers/ogr/qgsogrdataitems.cpp
  157. +5 −5 src/providers/ogr/qgsogrprovider.cpp
  158. +8 −8 src/providers/postgres/qgspgsourceselect.cpp
  159. +3 −3 src/providers/postgres/qgspostgresconn.cpp
  160. +2 −2 src/providers/spatialite/qgsspatialiteconnection.cpp
  161. +1 −1 src/providers/spatialite/qgsspatialitedataitems.cpp
  162. +8 −8 src/providers/spatialite/qgsspatialitesourceselect.cpp
  163. +1 −1 src/providers/wfs/qgswfsdataitems.cpp
  164. +8 −8 src/providers/wfs/qgswfssourceselect.cpp
  165. +2 −2 src/providers/wms/qgstilescalewidget.cpp
  166. +3 −3 src/providers/wms/qgswmsconnection.cpp
  167. +5 −5 src/providers/wms/qgswmssourceselect.cpp
  168. +2 −2 src/providers/wms/qgswmtsdimensions.cpp
  169. +1 −1 src/providers/wms/qgsxyzconnection.cpp
@@ -284,7 +284,7 @@ QgsAttributeSelectionDialog::QgsAttributeSelectionDialog( QgsComposerAttributeTa
setupUi( this );

QgsSettings settings;
restoreGeometry( settings.value( QStringLiteral( "/Windows/AttributeSelectionDialog/geometry" ) ).toByteArray() );
restoreGeometry( settings.value( QStringLiteral( "Windows/AttributeSelectionDialog/geometry" ) ).toByteArray() );

if ( mComposerTable )
{
@@ -323,7 +323,7 @@ QgsAttributeSelectionDialog::QgsAttributeSelectionDialog( QgsComposerAttributeTa
QgsAttributeSelectionDialog::~QgsAttributeSelectionDialog()
{
QgsSettings settings;
settings.setValue( QStringLiteral( "/Windows/AttributeSelectionDialog/geometry" ), saveGeometry() );
settings.setValue( QStringLiteral( "Windows/AttributeSelectionDialog/geometry" ), saveGeometry() );
}

void QgsAttributeSelectionDialog::on_mRemoveColumnPushButton_clicked()
@@ -123,7 +123,7 @@ QgsComposer::QgsComposer( QgisApp *qgis, const QString &title )
QgsSettings settings;
setStyleSheet( mQgis->styleSheet() );

int size = settings.value( QStringLiteral( "/IconSize" ), QGIS_ICON_SIZE ).toInt();
int size = settings.value( QStringLiteral( "IconSize" ), QGIS_ICON_SIZE ).toInt();
setIconSize( QSize( size, size ) );

QToolButton *orderingToolButton = new QToolButton( this );
@@ -537,7 +537,7 @@ QgsComposer::QgsComposer( QgisApp *qgis, const QString &title )

//initial state of rulers
QgsSettings myQSettings;
bool showRulers = myQSettings.value( QStringLiteral( "/Composer/showRulers" ), true ).toBool();
bool showRulers = myQSettings.value( QStringLiteral( "Composer/showRulers" ), true ).toBool();
mActionShowRulers->blockSignals( true );
mActionShowRulers->setChecked( showRulers );
mHorizontalRuler->setVisible( showRulers );
@@ -1420,7 +1420,7 @@ void QgsComposer::toggleRulers( bool checked )
mRulerLayoutFix->setVisible( checked );

QgsSettings myQSettings;
myQSettings.setValue( QStringLiteral( "/Composer/showRulers" ), checked );
myQSettings.setValue( QStringLiteral( "Composer/showRulers" ), checked );
}

void QgsComposer::on_mActionAtlasSettings_triggered()
@@ -1670,7 +1670,7 @@ void QgsComposer::exportCompositionAsPDF( QgsComposer::OutputMode mode )
if ( mode == QgsComposer::Single || ( mode == QgsComposer::Atlas && atlasOnASingleFile ) )
{
QgsSettings myQSettings; // where we keep last used filter in persistent state
QString lastUsedFile = myQSettings.value( QStringLiteral( "/UI/lastSaveAsPdfFile" ), "qgis.pdf" ).toString();
QString lastUsedFile = myQSettings.value( QStringLiteral( "UI/lastSaveAsPdfFile" ), "qgis.pdf" ).toString();
QFileInfo file( lastUsedFile );

if ( hasAnAtlas && !atlasOnASingleFile &&
@@ -1702,7 +1702,7 @@ void QgsComposer::exportCompositionAsPDF( QgsComposer::OutputMode mode )
outputFileName += QLatin1String( ".pdf" );
}

myQSettings.setValue( QStringLiteral( "/UI/lastSaveAsPdfFile" ), outputFileName );
myQSettings.setValue( QStringLiteral( "UI/lastSaveAsPdfFile" ), outputFileName );
}
// else, we need to choose a directory
else
@@ -1721,7 +1721,7 @@ void QgsComposer::exportCompositionAsPDF( QgsComposer::OutputMode mode )
}

QgsSettings myQSettings;
QString lastUsedDir = myQSettings.value( QStringLiteral( "/UI/lastSaveAtlasAsPdfDir" ), QDir::homePath() ).toString();
QString lastUsedDir = myQSettings.value( QStringLiteral( "UI/lastSaveAtlasAsPdfDir" ), QDir::homePath() ).toString();
outputDir = QFileDialog::getExistingDirectory( this,
tr( "Export atlas to directory" ),
lastUsedDir,
@@ -1740,7 +1740,7 @@ void QgsComposer::exportCompositionAsPDF( QgsComposer::OutputMode mode )
return;
}

myQSettings.setValue( QStringLiteral( "/UI/lastSaveAtlasAsPdfDir" ), outputDir );
myQSettings.setValue( QStringLiteral( "UI/lastSaveAtlasAsPdfDir" ), outputDir );
}

mView->setPaintingEnabled( false );
@@ -2064,7 +2064,7 @@ void QgsComposer::exportCompositionAsImage( QgsComposer::OutputMode mode )

if ( atlasMap->enabled() && mComposition->atlasMode() == QgsComposition::PreviewAtlas )
{
QString lastUsedDir = settings.value( QStringLiteral( "/UI/lastSaveAsImageDir" ), QDir::homePath() ).toString();
QString lastUsedDir = settings.value( QStringLiteral( "UI/lastSaveAsImageDir" ), QDir::homePath() ).toString();
outputFileName = QDir( lastUsedDir ).filePath( atlasMap->currentFilename() );
}

@@ -2215,8 +2215,8 @@ void QgsComposer::exportCompositionAsImage( QgsComposer::OutputMode mode )
}

QgsSettings myQSettings;
QString lastUsedDir = myQSettings.value( QStringLiteral( "/UI/lastSaveAtlasAsImagesDir" ), QDir::homePath() ).toString();
QString lastUsedFormat = myQSettings.value( QStringLiteral( "/UI/lastSaveAtlasAsImagesFormat" ), "jpg" ).toString();
QString lastUsedDir = myQSettings.value( QStringLiteral( "UI/lastSaveAtlasAsImagesDir" ), QDir::homePath() ).toString();
QString lastUsedFormat = myQSettings.value( QStringLiteral( "UI/lastSaveAtlasAsImagesFormat" ), "jpg" ).toString();

QFileDialog dlg( this, tr( "Export atlas to directory" ) );
dlg.setFileMode( QFileDialog::Directory );
@@ -2286,7 +2286,7 @@ void QgsComposer::exportCompositionAsImage( QgsComposer::OutputMode mode )
mComposition->setCustomProperty( QStringLiteral( "imageCropMarginBottom" ), marginBottom );
mComposition->setCustomProperty( QStringLiteral( "imageCropMarginLeft" ), marginLeft );

myQSettings.setValue( QStringLiteral( "/UI/lastSaveAtlasAsImagesDir" ), dir );
myQSettings.setValue( QStringLiteral( "UI/lastSaveAtlasAsImagesDir" ), dir );

// So, now we can render the atlas
mView->setPaintingEnabled( false );
@@ -2526,7 +2526,7 @@ void QgsComposer::exportCompositionAsSVG( QgsComposer::OutputMode mode )

if ( mode == QgsComposer::Single )
{
QString lastUsedFile = settings.value( QStringLiteral( "/UI/lastSaveAsSvgFile" ), "qgis.svg" ).toString();
QString lastUsedFile = settings.value( QStringLiteral( "UI/lastSaveAsSvgFile" ), "qgis.svg" ).toString();
QFileInfo file( lastUsedFile );

if ( atlasMap->enabled() && mComposition->atlasMode() == QgsComposition::PreviewAtlas )
@@ -2558,7 +2558,7 @@ void QgsComposer::exportCompositionAsSVG( QgsComposer::OutputMode mode )
outputFileName += QLatin1String( ".svg" );
}

settings.setValue( QStringLiteral( "/UI/lastSaveAsSvgFile" ), outputFileName );
settings.setValue( QStringLiteral( "UI/lastSaveAsSvgFile" ), outputFileName );
}
else
{
@@ -2577,7 +2577,7 @@ void QgsComposer::exportCompositionAsSVG( QgsComposer::OutputMode mode )
}

QgsSettings myQSettings;
QString lastUsedDir = myQSettings.value( QStringLiteral( "/UI/lastSaveAtlasAsSvgDir" ), QDir::homePath() ).toString();
QString lastUsedDir = myQSettings.value( QStringLiteral( "UI/lastSaveAtlasAsSvgDir" ), QDir::homePath() ).toString();

// open file dialog
outputDir = QFileDialog::getExistingDirectory( this,
@@ -2598,7 +2598,7 @@ void QgsComposer::exportCompositionAsSVG( QgsComposer::OutputMode mode )
QMessageBox::Ok );
return;
}
myQSettings.setValue( QStringLiteral( "/UI/lastSaveAtlasAsSvgDir" ), outputDir );
myQSettings.setValue( QStringLiteral( "UI/lastSaveAtlasAsSvgDir" ), outputDir );
}

// open options dialog
@@ -3443,9 +3443,9 @@ void QgsComposer::showEvent( QShowEvent *event )
void QgsComposer::saveWindowState()
{
QgsSettings settings;
settings.setValue( QStringLiteral( "/Composer/geometry" ), saveGeometry() );
settings.setValue( QStringLiteral( "Composer/geometry" ), saveGeometry() );
// store the toolbar/dock widget settings using Qt4 settings API
settings.setValue( QStringLiteral( "/ComposerUI/state" ), saveState() );
settings.setValue( QStringLiteral( "ComposerUI/state" ), saveState() );
}

#include "ui_defaults.h"
@@ -3455,12 +3455,12 @@ void QgsComposer::restoreWindowState()
// restore the toolbar and dock widgets positions using Qt4 settings API
QgsSettings settings;

if ( !restoreState( settings.value( QStringLiteral( "/ComposerUI/state" ), QByteArray::fromRawData( ( char * )defaultComposerUIstate, sizeof defaultComposerUIstate ) ).toByteArray() ) )
if ( !restoreState( settings.value( QStringLiteral( "ComposerUI/state" ), QByteArray::fromRawData( ( char * )defaultComposerUIstate, sizeof defaultComposerUIstate ) ).toByteArray() ) )
{
QgsDebugMsg( "restore of composer UI state failed" );
}
// restore window geometry
if ( !restoreGeometry( settings.value( QStringLiteral( "/Composer/geometry" ), QByteArray::fromRawData( ( char * )defaultComposerUIgeometry, sizeof defaultComposerUIgeometry ) ).toByteArray() ) )
if ( !restoreGeometry( settings.value( QStringLiteral( "Composer/geometry" ), QByteArray::fromRawData( ( char * )defaultComposerUIgeometry, sizeof defaultComposerUIgeometry ) ).toByteArray() ) )
{
QgsDebugMsg( "restore of composer UI geometry failed" );
}
@@ -30,13 +30,13 @@ QgsComposerImageExportOptionsDialog::QgsComposerImageExportOptionsDialog( QWidge
connect( mClipToContentGroupBox, SIGNAL( toggled( bool ) ), this, SLOT( clipToContentsToggled( bool ) ) );

QgsSettings settings;
restoreGeometry( settings.value( QStringLiteral( "/Windows/ComposerImageExportOptionsDialog/geometry" ) ).toByteArray() );
restoreGeometry( settings.value( QStringLiteral( "Windows/ComposerImageExportOptionsDialog/geometry" ) ).toByteArray() );
}

QgsComposerImageExportOptionsDialog::~QgsComposerImageExportOptionsDialog()
{
QgsSettings settings;
settings.setValue( QStringLiteral( "/Windows/ComposerImageExportOptionsDialog/geometry" ), saveGeometry() );
settings.setValue( QStringLiteral( "Windows/ComposerImageExportOptionsDialog/geometry" ), saveGeometry() );
}

void QgsComposerImageExportOptionsDialog::setResolution( int resolution )
@@ -37,7 +37,7 @@ QgsComposerManager::QgsComposerManager( QWidget *parent, Qt::WindowFlags f ): QD
setupUi( this );

QgsSettings settings;
restoreGeometry( settings.value( QStringLiteral( "/Windows/ComposerManager/geometry" ) ).toByteArray() );
restoreGeometry( settings.value( QStringLiteral( "Windows/ComposerManager/geometry" ) ).toByteArray() );

mComposerListWidget->setItemDelegate( new QgsComposerNameDelegate( mComposerListWidget ) );

@@ -77,15 +77,15 @@ QgsComposerManager::QgsComposerManager( QWidget *parent, Qt::WindowFlags f ): QD
this->addTemplates( defaultTemplateMap );
this->addTemplates( this->otherTemplates() );

mTemplatePathLineEdit->setText( settings.value( QStringLiteral( "/UI/ComposerManager/templatePath" ), QString() ).toString() );
mTemplatePathLineEdit->setText( settings.value( QStringLiteral( "UI/ComposerManager/templatePath" ), QString() ).toString() );

refreshComposers();
}

QgsComposerManager::~QgsComposerManager()
{
QgsSettings settings;
settings.setValue( QStringLiteral( "/Windows/ComposerManager/geometry" ), saveGeometry() );
settings.setValue( QStringLiteral( "Windows/ComposerManager/geometry" ), saveGeometry() );
}

void QgsComposerManager::refreshComposers()
@@ -313,7 +313,7 @@ void QgsComposerManager::on_mTemplate_currentIndexChanged( int indx )
void QgsComposerManager::on_mTemplatePathBtn_pressed()
{
QgsSettings settings;
QString lastTmplDir = settings.value( QStringLiteral( "/UI/lastComposerTemplateDir" ), QDir::homePath() ).toString();
QString lastTmplDir = settings.value( QStringLiteral( "UI/lastComposerTemplateDir" ), QDir::homePath() ).toString();
QString tmplPath = QFileDialog::getOpenFileName( this,
tr( "Choose template" ),
lastTmplDir,
@@ -52,15 +52,15 @@ QgsComposerTableBackgroundColorsDialog::QgsComposerTableBackgroundColorsDialog(
connect( buttonBox->button( QDialogButtonBox::Apply ), SIGNAL( clicked() ), this, SLOT( apply() ) );

QgsSettings settings;
restoreGeometry( settings.value( QStringLiteral( "/Windows/ComposerTableBackgroundColorsDialog/geometry" ) ).toByteArray() );
restoreGeometry( settings.value( QStringLiteral( "Windows/ComposerTableBackgroundColorsDialog/geometry" ) ).toByteArray() );

setGuiElementValues();
}

QgsComposerTableBackgroundColorsDialog::~QgsComposerTableBackgroundColorsDialog()
{
QgsSettings settings;
settings.setValue( QStringLiteral( "/Windows/ComposerTableBackgroundColorsDialog/geometry" ), saveGeometry() );
settings.setValue( QStringLiteral( "Windows/ComposerTableBackgroundColorsDialog/geometry" ), saveGeometry() );
}

void QgsComposerTableBackgroundColorsDialog::apply()

0 comments on commit bbc849d

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