QGIS API Documentation 3.99.0-Master (d270888f95f)
Loading...
Searching...
No Matches
qgslayerpropertiesdialog.cpp
Go to the documentation of this file.
1/***************************************************************************
2 qgslayerpropertiesdialog.cpp
3 --------------------------------------
4 Date : June 2023
5 Copyright : (C) 2023 by Nyall Dawson
6 Email : nyall dot dawson at gmail dot com
7 ***************************************************************************
8 * *
9 * This program is free software; you can redistribute it and/or modify *
10 * it under the terms of the GNU General Public License as published by *
11 * the Free Software Foundation; either version 2 of the License, or *
12 * (at your option) any later version. *
13 * *
14 ***************************************************************************/
15
17
18#include "qgsfileutils.h"
19#include "qgsmapcanvas.h"
20#include "qgsmaplayer.h"
26#include "qgsmetadatawidget.h"
27#include "qgsnative.h"
28#include "qgsproviderregistry.h"
29#include "qgssettings.h"
30#include "qgssldexportcontext.h"
31
32#include <QDesktopServices>
33#include <QDir>
34#include <QFileDialog>
35#include <QMessageBox>
36#include <QString>
37#include <qstackedwidget.h>
38
39#include "moc_qgslayerpropertiesdialog.cpp"
40
41using namespace Qt::StringLiterals;
42
43QgsLayerPropertiesDialog::QgsLayerPropertiesDialog( QgsMapLayer *layer, QgsMapCanvas *canvas, const QString &settingsKey, QWidget *parent, Qt::WindowFlags fl, QgsSettings *settings )
44 : QgsOptionsDialogBase( settingsKey, parent, fl, settings )
45 , mCanvas( canvas )
46 , mLayer( layer )
47{
48}
49
51{
52 mMetadataWidget = widget;
53 mMetadataPage = page;
54}
55
57{
58 if ( !mLayer || !mMetadataWidget )
59 return;
60
61 QgsSettings settings; // where we keep last used filter in persistent state
62 const QString lastUsedDir = settings.value( u"style/lastStyleDir"_s, QDir::homePath() ).toString();
63
64 const QString fileName = QFileDialog::getOpenFileName( this, tr( "Load Layer Metadata" ), lastUsedDir, tr( "QGIS Layer Metadata File" ) + " (*.qmd)" );
65 if ( fileName.isNull() )
66 {
67 return;
68 }
69
70 bool defaultLoadedFlag = false;
71 const QString message = mLayer->loadNamedMetadata( fileName, defaultLoadedFlag );
72
73 //reset if the default style was loaded OK only
74 if ( defaultLoadedFlag )
75 {
76 mMetadataWidget->setMetadata( &mLayer->metadata() );
77 }
78 else
79 {
80 //let the user know what went wrong
81 QMessageBox::warning( this, tr( "Load Metadata" ), message );
82 }
83
84 settings.setValue( u"style/lastStyleDir"_s, QFileInfo( fileName ).path() );
85
87}
88
90{
91 if ( !mLayer || !mMetadataWidget )
92 return;
93
94 QgsSettings settings; // where we keep last used filter in persistent state
95 const QString lastUsedDir = settings.value( u"style/lastStyleDir"_s, QDir::homePath() ).toString();
96
97 QString outputFileName = QFileDialog::getSaveFileName( this, tr( "Save Layer Metadata as QMD" ), lastUsedDir, tr( "QMD File" ) + " (*.qmd)" );
98 // return dialog focus on Mac
99 activateWindow();
100 raise();
101 if ( outputFileName.isEmpty() )
102 {
103 return;
104 }
105
106 mMetadataWidget->acceptMetadata();
107
108 //ensure the user never omitted the extension from the file name
109 if ( !outputFileName.endsWith( QgsMapLayer::extensionPropertyType( QgsMapLayer::Metadata ), Qt::CaseInsensitive ) )
110 {
112 }
113
114 bool defaultLoadedFlag = false;
115 const QString message = mLayer->saveNamedMetadata( outputFileName, defaultLoadedFlag );
116 if ( defaultLoadedFlag )
117 settings.setValue( u"style/lastStyleDir"_s, QFileInfo( outputFileName ).absolutePath() );
118 else
119 QMessageBox::information( this, tr( "Save Metadata" ), message );
120
122}
123
125{
126 if ( !mLayer || !mMetadataWidget )
127 return;
128
129 mMetadataWidget->acceptMetadata();
130
131 bool defaultSavedFlag = false;
132 const QString infoWindowTitle = QObject::tr( "Save Default Metadata" );
133 const QString errorMsg = mLayer->saveDefaultMetadata( defaultSavedFlag );
134 if ( !defaultSavedFlag )
135 {
136 QMessageBox::warning( this, infoWindowTitle, errorMsg );
138 }
139 else
140 {
141 QMessageBox::information( this, infoWindowTitle, tr( "Metadata saved." ) );
142 }
143}
144
146{
147 if ( !mLayer || !mMetadataWidget )
148 return;
149
150 bool defaultLoadedFlag = false;
151 const QString message = mLayer->loadNamedMetadata( mLayer->metadataUri(), defaultLoadedFlag );
152 //reset if the default metadata was loaded OK only
153 if ( defaultLoadedFlag )
154 {
155 mMetadataWidget->setMetadata( &mLayer->metadata() );
156 }
157 else
158 {
159 QMessageBox::information( this, tr( "Default Metadata" ), message );
161 }
162}
163
165{
166 if ( !mLayer )
167 return;
168
169 QgsSettings settings;
170 const QString lastUsedDir = settings.value( u"style/lastStyleDir"_s, QDir::homePath() ).toString();
171
172 QString fileName = QFileDialog::getOpenFileName(
173 this,
174 tr( "Load layer properties from style file" ),
175 lastUsedDir,
176 tr( "QGIS Layer Style File" ) + " (*.qml)"
177 );
178 if ( fileName.isEmpty() )
179 return;
180
181 // ensure the user never omits the extension from the file name
182 if ( !fileName.endsWith( ".qml"_L1, Qt::CaseInsensitive ) )
183 fileName += ".qml"_L1;
184
186
187 bool defaultLoadedFlag = false;
188 const QString message = mLayer->loadNamedStyle( fileName, defaultLoadedFlag );
189 if ( defaultLoadedFlag )
190 {
191 settings.setValue( u"style/lastStyleDir"_s, QFileInfo( fileName ).absolutePath() );
192 syncToLayer();
193 }
194 else
195 {
196 QMessageBox::information( this, tr( "Load Style" ), message );
198 }
199}
200
202{
203 if ( !mLayer )
204 return;
205
206 QgsSettings settings;
207 const QString lastUsedDir = settings.value( u"style/lastStyleDir"_s, QDir::homePath() ).toString();
208
209 QString outputFileName = QFileDialog::getSaveFileName(
210 this,
211 tr( "Save layer properties as style file" ),
212 lastUsedDir,
213 tr( "QGIS Layer Style File" ) + " (*.qml)"
214 );
215 // return dialog focus on Mac
216 activateWindow();
217 raise();
218 if ( outputFileName.isEmpty() )
219 return;
220
221 // ensure the user never omits the extension from the file name
222 outputFileName = QgsFileUtils::ensureFileNameHasExtension( outputFileName, QStringList() << u"qml"_s );
223
224 apply(); // make sure the style to save is up-to-date
225
226 // then export style
227 bool defaultLoadedFlag = false;
228 const QString message = mLayer->saveNamedStyle( outputFileName, defaultLoadedFlag );
229
230 if ( defaultLoadedFlag )
231 {
232 settings.setValue( u"style/lastStyleDir"_s, QFileInfo( outputFileName ).absolutePath() );
233 }
234 else
235 {
236 QMessageBox::information( this, tr( "Save Style" ), message );
238 }
239}
240
242{
243 if ( !mLayer )
244 return;
245
246 apply(); // make sure the style to save is up-to-date
247
248 // a flag passed by reference
249 bool defaultSavedFlag = false;
250 // TODO Once the deprecated `saveDefaultStyle()` method is gone, just
251 // remove the NOWARN_DEPRECATED tags
253 // after calling this the above flag will be set true for success
254 // or false if the save operation failed
255 const QString message = mLayer->saveDefaultStyle( defaultSavedFlag );
257 if ( !defaultSavedFlag )
258 {
259 // let the user know what went wrong
260 QMessageBox::information( this, tr( "Default Style" ), message );
262 }
263}
264
266{
267 restoreOptionsBaseUi( generateDialogTitle() );
268}
269
271{
272 activateWindow(); // set focus back to properties dialog
273}
274
276{
277 if ( !factory->supportsLayer( mLayer ) || !factory->supportLayerPropertiesDialog() )
278 {
279 return;
280 }
281
282 QgsMapLayerConfigWidget *page = factory->createWidget( mLayer, mCanvas, false, this );
283 mConfigWidgets << page;
284
285 const QString beforePage = factory->layerPropertiesPagePositionHint();
286 if ( beforePage.isEmpty() )
287 addPage( factory->title(), factory->title(), factory->icon(), page );
288 else
289 insertPage( factory->title(), factory->title(), factory->icon(), page, beforePage );
290
291 page->syncToLayer( mLayer );
292}
293
295{
296 QString msg;
297 bool defaultLoadedFlag = false;
298
299 const QgsDataProvider *provider = mLayer->dataProvider();
300 if ( !provider )
301 return;
303 {
304 QMessageBox askToUser;
305 askToUser.setText( tr( "Load default style from: " ) );
306 askToUser.setIcon( QMessageBox::Question );
307 askToUser.addButton( tr( "Cancel" ), QMessageBox::RejectRole );
308 askToUser.addButton( tr( "Local Database" ), QMessageBox::NoRole );
309 askToUser.addButton( tr( "Datasource Database" ), QMessageBox::YesRole );
310
311 switch ( askToUser.exec() )
312 {
313 case 0:
314 return;
315 case 2:
316 msg = mLayer->loadNamedStyle( mLayer->styleURI(), defaultLoadedFlag, false );
317 if ( !defaultLoadedFlag )
318 {
319 //something went wrong - let them know why
320 QMessageBox::information( this, tr( "Default Style" ), msg );
321 }
322 if ( msg.compare( tr( "Loaded from Provider" ) ) )
323 {
324 QMessageBox::information( this, tr( "Default Style" ), tr( "No default style was found for this layer." ) );
325 }
326 else
327 {
328 syncToLayer();
329 apply();
330 }
331
332 return;
333 default:
334 break;
335 }
336 }
337
338 QString myMessage = mLayer->loadNamedStyle( mLayer->styleURI(), defaultLoadedFlag, true );
339 // QString myMessage = layer->loadDefaultStyle( defaultLoadedFlag );
340 //reset if the default style was loaded OK only
341 if ( defaultLoadedFlag )
342 {
343 // all worked OK so no need to inform user
344 syncToLayer();
345 apply();
346 }
347 else
348 {
349 //something went wrong - let them know why
350 QMessageBox::information( this, tr( "Default Style" ), myMessage );
351 }
352}
353
355{
356 QString errorMsg;
357 const QgsDataProvider *provider = mLayer->dataProvider();
358 if ( !provider )
359 return;
361 {
362 QMessageBox askToUser;
363 askToUser.setText( tr( "Save default style to: " ) );
364 askToUser.setIcon( QMessageBox::Question );
365 askToUser.addButton( tr( "Cancel" ), QMessageBox::RejectRole );
366 askToUser.addButton( tr( "Local Database" ), QMessageBox::NoRole );
367 askToUser.addButton( tr( "Datasource Database" ), QMessageBox::YesRole );
368
369 switch ( askToUser.exec() )
370 {
371 case 0:
372 return;
373 case 2:
374 {
375 apply();
376 QString errorMessage;
377 if ( QgsProviderRegistry::instance()->styleExists( mLayer->providerType(), mLayer->source(), QString(), errorMessage ) )
378 {
379 if ( QMessageBox::question( nullptr, QObject::tr( "Save style in database" ), QObject::tr( "A matching style already exists in the database for this layer. Do you want to overwrite it?" ), QMessageBox::Yes | QMessageBox::No ) == QMessageBox::No )
380 {
381 return;
382 }
383 }
384 else if ( !errorMessage.isEmpty() )
385 {
386 QMessageBox::warning( nullptr, QObject::tr( "Save style in database" ), errorMessage );
387 return;
388 }
389
390 mLayer->saveStyleToDatabaseV2( QString(), QString(), true, QString(), errorMsg );
391 if ( errorMsg.isNull() )
392 {
393 return;
394 }
395 break;
396 }
397 default:
398 break;
399 }
400 }
401
403}
404
406{
407 if ( !mLayer->dataProvider() )
408 return;
409 QgsMapLayerSaveStyleDialog dlg( mLayer );
410
411 if ( dlg.exec() )
412 {
413 apply();
414
415 bool defaultLoadedFlag = false;
416 QString errorMessage;
417
418 StyleType type = dlg.currentStyleType();
419 switch ( type )
420 {
421 case QML:
422 case SLD:
423 {
424 QString filePath = dlg.outputFilePath();
425 if ( type == QML )
426 errorMessage = mLayer->saveNamedStyle( filePath, defaultLoadedFlag, dlg.styleCategories() );
427 else
428 {
430 errorMessage = mLayer->saveSldStyleV2( defaultLoadedFlag, sldContext );
431 }
432
433 //reset if the default style was loaded OK only
434 if ( defaultLoadedFlag )
435 {
436 syncToLayer();
437 }
438 else
439 {
440 //let the user know what went wrong
441 QMessageBox::information( this, tr( "Save Style" ), errorMessage );
442 }
443
444 break;
445 }
447 {
448 QString infoWindowTitle = QObject::tr( "Save style to DB (%1)" ).arg( mLayer->providerType() );
449
451
452 if ( QgsProviderRegistry::instance()->styleExists( mLayer->providerType(), mLayer->source(), dbSettings.name, errorMessage ) )
453 {
454 if ( QMessageBox::question( nullptr, QObject::tr( "Save style in database" ), QObject::tr( "A matching style already exists in the database for this layer. Do you want to overwrite it?" ), QMessageBox::Yes | QMessageBox::No ) == QMessageBox::No )
455 {
456 return;
457 }
458 }
459 else if ( !errorMessage.isEmpty() )
460 {
461 QMessageBox::warning( this, infoWindowTitle, errorMessage );
462 return;
463 }
464
465 mLayer->saveStyleToDatabaseV2( dbSettings.name, dbSettings.description, dbSettings.isDefault, dbSettings.uiFileContent, errorMessage, dlg.styleCategories() );
466
467 if ( !errorMessage.isNull() )
468 {
469 QMessageBox::warning( this, infoWindowTitle, errorMessage );
470 }
471 else
472 {
473 QMessageBox::information( this, infoWindowTitle, tr( "Style saved" ) );
474 }
475 break;
476 }
477 case UserDatabase:
478 {
479 QString infoWindowTitle = tr( "Save default style to local database" );
480 errorMessage = mLayer->saveDefaultStyle( defaultLoadedFlag, dlg.styleCategories() );
481 if ( !defaultLoadedFlag )
482 {
483 QMessageBox::warning( this, infoWindowTitle, errorMessage );
484 }
485 else
486 {
487 QMessageBox::information( this, infoWindowTitle, tr( "Style saved" ) );
488 }
489 break;
490 }
491 }
492 }
493}
494
496{
497 QString errorMsg;
498 QStringList ids, names, descriptions;
499
500 //get the list of styles in the db
501 int sectionLimit = mLayer->listStylesInDatabase( ids, names, descriptions, errorMsg );
502 QgsMapLayerLoadStyleDialog dlg( mLayer, this );
503 dlg.initializeLists( ids, names, descriptions, sectionLimit );
504
505 if ( dlg.exec() )
506 {
507 mOldStyle = mLayer->styleManager()->style( mLayer->styleManager()->currentStyle() );
509 StyleType type = dlg.currentStyleType();
510 bool defaultLoadedFlag = false;
511 switch ( type )
512 {
513 case QML:
514 case SLD:
515 {
516 QString filePath = dlg.filePath();
517 if ( type == SLD )
518 {
519 errorMsg = mLayer->loadSldStyle( filePath, defaultLoadedFlag );
520 }
521 else
522 {
523 errorMsg = mLayer->loadNamedStyle( filePath, defaultLoadedFlag, true, categories );
524 }
525 //reset if the default style was loaded OK only
526 if ( defaultLoadedFlag )
527 {
528 syncToLayer();
529 apply();
530 }
531 else
532 {
533 //let the user know what went wrong
534 QMessageBox::warning( this, tr( "Load Style" ), errorMsg );
535 }
536 break;
537 }
539 {
540 QString selectedStyleId = dlg.selectedStyleId();
541
542 QString qmlStyle = mLayer->getStyleFromDatabase( selectedStyleId, errorMsg );
543 if ( !errorMsg.isNull() )
544 {
545 QMessageBox::warning( this, tr( "Load Styles from Database" ), errorMsg );
546 return;
547 }
548
549 QDomDocument myDocument( u"qgis"_s );
550 myDocument.setContent( qmlStyle );
551
552 if ( mLayer->importNamedStyle( myDocument, errorMsg, categories ) )
553 {
554 syncToLayer();
555 apply();
556 }
557 else
558 {
559 QMessageBox::warning( this, tr( "Load Styles from Database" ), tr( "The retrieved style is not a valid named style. Error message: %1" ).arg( errorMsg ) );
560 }
561 break;
562 }
563 case UserDatabase:
564 {
565 errorMsg = mLayer->loadNamedStyle( mLayer->styleURI(), defaultLoadedFlag, true, categories );
566 //reset if the default style was loaded OK only
567 if ( defaultLoadedFlag )
568 {
569 syncToLayer();
570 apply();
571 }
572 else
573 {
574 QMessageBox::warning( this, tr( "Load Default Style" ), errorMsg );
575 }
576 break;
577 }
578 }
579 activateWindow(); // set focus back to properties dialog
580 }
581}
582
584{
585 if ( !mLayer )
586 return;
587
588 mOldStyle = mLayer->styleManager()->style( mLayer->styleManager()->currentStyle() );
589}
590
591QString QgsLayerPropertiesDialog::generateDialogTitle() const
592{
593 QString title = tr( "Layer Properties - %1" ).arg( mLayer->name() );
594
595 if ( !mLayer->styleManager()->isDefault( mLayer->styleManager()->currentStyle() ) )
596 title += u" (%1)"_s.arg( mLayer->styleManager()->currentStyle() );
597
598 return title;
599}
600
602{
603 if ( mOldStyle.xmlData() != mLayer->styleManager()->style( mLayer->styleManager()->currentStyle() ).xmlData() )
604 {
605 // need to reset style to previous - style applied directly to the layer (not in apply())
606 QString message;
607 QDomDocument doc( u"qgis"_s );
608 int errorLine, errorColumn;
609 doc.setContent( mOldStyle.xmlData(), false, &message, &errorLine, &errorColumn );
610 mLayer->importNamedStyle( doc, message );
611 syncToLayer();
612 }
613}
614
616{
618
619 if ( mMetadataPage && mBtnStyle && mBtnMetadata )
620 {
621 const bool isMetadataPanel = ( index == mOptStackedWidget->indexOf( mMetadataPage ) );
622 mBtnStyle->setVisible( !isMetadataPanel );
623 mBtnMetadata->setVisible( isMetadataPanel );
624 }
625}
626
628{
629 QFileInfo file( url.toLocalFile() );
630 if ( file.exists() && !file.isDir() )
631 QgsGui::nativePlatformInterface()->openFileExplorerAndSelectFile( url.toLocalFile() );
632 else
633 QDesktopServices::openUrl( url );
634}
@ NoVendorExtension
No vendor extensions.
Definition qgis.h:731
Abstract base class for spatial data provider implementations.
virtual Qgis::ProviderStyleStorageCapabilities styleStorageCapabilities() const
Returns the style storage capabilities.
static QString ensureFileNameHasExtension(const QString &fileName, const QStringList &extensions)
Ensures that a fileName ends with an extension from the provided list of extensions.
static QgsNative * nativePlatformInterface()
Returns the global native interface, which offers abstraction to the host OS's underlying public inte...
Definition qgsgui.cpp:99
QPushButton * mBtnStyle
Style button.
void saveMetadataToFile()
Allows the user to save the layer's metadata as a file.
virtual void rollback()
Rolls back changes made to the layer.
void optionsStackedWidget_CurrentChanged(int index) override
void saveStyleAsDefault()
Saves the current layer style as the default for the layer.
QList< QgsMapLayerConfigWidget * > mConfigWidgets
Layer config widgets.
void setMetadataWidget(QgsMetadataWidget *widget, QWidget *page)
Sets the metadata widget and page associated with the dialog.
void loadDefaultStyle()
Reloads the default style for the layer.
void saveStyleAs()
Saves a style when appriate button is pressed.
virtual void apply()=0
Applies the dialog settings to the layer.
virtual void syncToLayer()=0
Resets the dialog to the current layer state.
void loadStyle()
Triggers a dialog to load a saved style.
void saveStyleToFile()
Allows the user to save the layer's style to a file.
QgsMapCanvas * mCanvas
Associated map canvas.
void loadDefaultMetadata()
Reloads the default layer metadata for the layer.
void refocusDialog()
Ensures the dialog is focused and activated.
QgsLayerPropertiesDialog(QgsMapLayer *layer, QgsMapCanvas *canvas, const QString &settingsKey, QWidget *parent=nullptr, Qt::WindowFlags fl=Qt::WindowFlags(), QgsSettings *settings=nullptr)
Constructor for QgsLayerPropertiesDialog.
void storeCurrentStyleForUndo()
Stores the current layer style so that undo operations can be performed.
QgsMapLayerStyle mOldStyle
Previous layer style.
void loadMetadataFromFile()
Allows the user to load layer metadata from a file.
void saveDefaultStyle()
Saves the default style when appropriate button is pressed.
virtual void addPropertiesPageFactory(const QgsMapLayerConfigWidgetFactory *factory)
Adds properties page from a factory.
void loadStyleFromFile()
Allows the user to load layer style from a file.
QPushButton * mBtnMetadata
Metadata button.
void initialize()
Initialize the dialog.
void saveMetadataAsDefault()
Saves the current layer metadata as the default for the layer.
void openUrl(const QUrl &url)
Handles opening a url from the dialog.
Map canvas is a class for displaying all GIS data types on a canvas.
Factory class for creating custom map layer property pages.
virtual bool supportsLayer(QgsMapLayer *layer) const
Check if the layer is supported for this widget.
virtual QIcon icon() const
The icon that will be shown in the UI for the panel.
virtual QgsMapLayerConfigWidget * createWidget(QgsMapLayer *layer, QgsMapCanvas *canvas, bool dockWidget=true, QWidget *parent=nullptr) const =0
Factory function to create the widget on demand as needed by the dock.
virtual QString title() const
The title of the panel.
virtual bool supportLayerPropertiesDialog() const
Flag if widget is supported for use in layer properties dialog.
virtual QString layerPropertiesPagePositionHint() const
Returns a tab name hinting at where this page should be inserted into the layer properties tab list.
A panel widget that can be shown in the map style dock.
virtual void syncToLayer(QgsMapLayer *layer)
Reset to original (vector layer) values.
A reusable dialog which allows users to select stored layer styles and categories to load for a map l...
QgsMapLayer::StyleCategories styleCategories() const
Returns the list of selected style categories the user has opted to load.
void initializeLists(const QStringList &ids, const QStringList &names, const QStringList &descriptions, int sectionLimit)
Initialize list of database stored styles.
QString selectedStyleId()
Returns the ID of the selected database stored style.
QString filePath() const
Returns the full path to the selected layer style source file.
QgsLayerPropertiesDialog::StyleType currentStyleType() const
Returns the selected style type.
A dialog which allows saving map layer styles.
QString outputFilePath() const
Returns the selected file output path.
Qgis::SldExportOptions sldExportOptions() const
Returns the SLD export options.
SaveToDbSettings saveToDbSettings() const
Returns the database settings for saving the style in the DB.
QgsMapLayer::StyleCategories styleCategories() const
Returns the available style categories.
QgsLayerPropertiesDialog::StyleType currentStyleType() const
Returns the selected style storage type.
Base class for all map layer types.
Definition qgsmaplayer.h:83
QFlags< StyleCategory > StyleCategories
static QString extensionPropertyType(PropertyType type)
Returns the extension of a Property.
A wizard to edit metadata on a map layer.
virtual void optionsStackedWidget_CurrentChanged(int index)
Select relevant tab on current page change.
QgsOptionsDialogBase(const QString &settingsKey, QWidget *parent=nullptr, Qt::WindowFlags fl=Qt::WindowFlags(), QgsSettings *settings=nullptr)
Constructor.
void addPage(const QString &title, const QString &tooltip, const QIcon &icon, QWidget *widget, const QStringList &path=QStringList(), const QString &key=QString())
Adds a new page to the dialog pages.
void restoreOptionsBaseUi(const QString &title=QString())
Restore the base ui.
QStackedWidget * mOptStackedWidget
void insertPage(const QString &title, const QString &tooltip, const QIcon &icon, QWidget *widget, const QString &before, const QStringList &path=QStringList(), const QString &key=QString())
Inserts a new page into the dialog pages.
static QgsProviderRegistry * instance(const QString &pluginPath=QString())
Means of accessing canonical single instance.
Stores settings for use within QGIS.
Definition qgssettings.h:68
QVariant value(const QString &key, const QVariant &defaultValue=QVariant(), Section section=NoSection) const
Returns the value for setting key.
void setValue(const QString &key, const QVariant &value, QgsSettings::Section section=QgsSettings::NoSection)
Sets the value of setting key to value.
Holds SLD export options and other information related to SLD export of a QGIS layer style.
#define Q_NOWARN_DEPRECATED_POP
Definition qgis.h:7451
#define Q_NOWARN_DEPRECATED_PUSH
Definition qgis.h:7450