QGIS API Documentation 4.1.0-Master (5bf3c20f3c9)
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
50{
51 mMetadataWidget = widget;
52 mMetadataPage = page;
53}
54
56{
57 if ( !mLayer || !mMetadataWidget )
58 return;
59
60 QgsSettings settings; // where we keep last used filter in persistent state
61 const QString lastUsedDir = settings.value( u"style/lastStyleDir"_s, QDir::homePath() ).toString();
62
63 const QString fileName = QFileDialog::getOpenFileName( this, tr( "Load Layer Metadata" ), lastUsedDir, tr( "QGIS Layer Metadata File" ) + " (*.qmd)" );
64 if ( fileName.isNull() )
65 {
66 return;
67 }
68
69 bool defaultLoadedFlag = false;
70 const QString message = mLayer->loadNamedMetadata( fileName, defaultLoadedFlag );
71
72 //reset if the default style was loaded OK only
73 if ( defaultLoadedFlag )
74 {
75 mMetadataWidget->setMetadata( &mLayer->metadata() );
76 }
77 else
78 {
79 //let the user know what went wrong
80 QMessageBox::warning( this, tr( "Load Metadata" ), message );
81 }
82
83 settings.setValue( u"style/lastStyleDir"_s, QFileInfo( fileName ).path() );
84
86}
87
89{
90 if ( !mLayer || !mMetadataWidget )
91 return;
92
93 QgsSettings settings; // where we keep last used filter in persistent state
94 const QString lastUsedDir = settings.value( u"style/lastStyleDir"_s, QDir::homePath() ).toString();
95
96 QString outputFileName = QFileDialog::getSaveFileName( this, tr( "Save Layer Metadata as QMD" ), lastUsedDir, tr( "QMD File" ) + " (*.qmd)" );
97 // return dialog focus on Mac
98 activateWindow();
99 raise();
100 if ( outputFileName.isEmpty() )
101 {
102 return;
103 }
104
105 mMetadataWidget->acceptMetadata();
106
107 //ensure the user never omitted the extension from the file name
108 if ( !outputFileName.endsWith( QgsMapLayer::extensionPropertyType( QgsMapLayer::Metadata ), Qt::CaseInsensitive ) )
109 {
111 }
112
113 bool defaultLoadedFlag = false;
114 const QString message = mLayer->saveNamedMetadata( outputFileName, defaultLoadedFlag );
115 if ( defaultLoadedFlag )
116 settings.setValue( u"style/lastStyleDir"_s, QFileInfo( outputFileName ).absolutePath() );
117 else
118 QMessageBox::information( this, tr( "Save Metadata" ), message );
119
121}
122
124{
125 if ( !mLayer || !mMetadataWidget )
126 return;
127
128 mMetadataWidget->acceptMetadata();
129
130 bool defaultSavedFlag = false;
131 const QString infoWindowTitle = QObject::tr( "Save Default Metadata" );
132 const QString errorMsg = mLayer->saveDefaultMetadata( defaultSavedFlag );
133 if ( !defaultSavedFlag )
134 {
135 QMessageBox::warning( this, infoWindowTitle, errorMsg );
137 }
138 else
139 {
140 QMessageBox::information( this, infoWindowTitle, tr( "Metadata saved." ) );
141 }
142}
143
145{
146 if ( !mLayer || !mMetadataWidget )
147 return;
148
149 bool defaultLoadedFlag = false;
150 const QString message = mLayer->loadNamedMetadata( mLayer->metadataUri(), defaultLoadedFlag );
151 //reset if the default metadata was loaded OK only
152 if ( defaultLoadedFlag )
153 {
154 mMetadataWidget->setMetadata( &mLayer->metadata() );
155 }
156 else
157 {
158 QMessageBox::information( this, tr( "Default Metadata" ), message );
160 }
161}
162
164{
165 if ( !mLayer )
166 return;
167
168 QgsSettings settings;
169 const QString lastUsedDir = settings.value( u"style/lastStyleDir"_s, QDir::homePath() ).toString();
170
171 QString fileName = QFileDialog::getOpenFileName( this, tr( "Load layer properties from style file" ), lastUsedDir, tr( "QGIS Layer Style File" ) + " (*.qml)" );
172 if ( fileName.isEmpty() )
173 return;
174
175 // ensure the user never omits the extension from the file name
176 if ( !fileName.endsWith( ".qml"_L1, Qt::CaseInsensitive ) )
177 fileName += ".qml"_L1;
178
180
181 bool defaultLoadedFlag = false;
182 const QString message = mLayer->loadNamedStyle( fileName, defaultLoadedFlag );
183 if ( defaultLoadedFlag )
184 {
185 settings.setValue( u"style/lastStyleDir"_s, QFileInfo( fileName ).absolutePath() );
186 syncToLayer();
187 }
188 else
189 {
190 QMessageBox::information( this, tr( "Load Style" ), message );
192 }
193}
194
196{
197 if ( !mLayer )
198 return;
199
200 QgsSettings settings;
201 const QString lastUsedDir = settings.value( u"style/lastStyleDir"_s, QDir::homePath() ).toString();
202
203 QString outputFileName = QFileDialog::getSaveFileName( this, tr( "Save layer properties as style file" ), lastUsedDir, tr( "QGIS Layer Style File" ) + " (*.qml)" );
204 // return dialog focus on Mac
205 activateWindow();
206 raise();
207 if ( outputFileName.isEmpty() )
208 return;
209
210 // ensure the user never omits the extension from the file name
211 outputFileName = QgsFileUtils::ensureFileNameHasExtension( outputFileName, QStringList() << u"qml"_s );
212
213 apply(); // make sure the style to save is up-to-date
214
215 // then export style
216 bool defaultLoadedFlag = false;
217 const QString message = mLayer->saveNamedStyle( outputFileName, defaultLoadedFlag );
218
219 if ( defaultLoadedFlag )
220 {
221 settings.setValue( u"style/lastStyleDir"_s, QFileInfo( outputFileName ).absolutePath() );
222 }
223 else
224 {
225 QMessageBox::information( this, tr( "Save Style" ), message );
227 }
228}
229
231{
232 if ( !mLayer )
233 return;
234
235 apply(); // make sure the style to save is up-to-date
236
237 // a flag passed by reference
238 bool defaultSavedFlag = false;
239 // TODO Once the deprecated `saveDefaultStyle()` method is gone, just
240 // remove the NOWARN_DEPRECATED tags
242 // after calling this the above flag will be set true for success
243 // or false if the save operation failed
244 const QString message = mLayer->saveDefaultStyle( defaultSavedFlag );
246 if ( !defaultSavedFlag )
247 {
248 // let the user know what went wrong
249 QMessageBox::information( this, tr( "Default Style" ), message );
251 }
252}
253
255{
256 restoreOptionsBaseUi( generateDialogTitle() );
257}
258
260{
261 activateWindow(); // set focus back to properties dialog
262}
263
265{
266 if ( !factory->supportsLayer( mLayer ) || !factory->supportLayerPropertiesDialog() )
267 {
268 return;
269 }
270
271 QgsMapLayerConfigWidget *page = factory->createWidget( mLayer, mCanvas, false, this );
272 mConfigWidgets << page;
273
274 const QString beforePage = factory->layerPropertiesPagePositionHint();
275 if ( beforePage.isEmpty() )
276 addPage( factory->title(), factory->title(), factory->icon(), page );
277 else
278 insertPage( factory->title(), factory->title(), factory->icon(), page, beforePage );
279
280 page->syncToLayer( mLayer );
281}
282
284{
285 QString msg;
286 bool defaultLoadedFlag = false;
287
288 const QgsDataProvider *provider = mLayer->dataProvider();
289 if ( !provider )
290 return;
292 {
293 QMessageBox askToUser;
294 askToUser.setText( tr( "Load default style from: " ) );
295 askToUser.setIcon( QMessageBox::Question );
296 askToUser.addButton( tr( "Cancel" ), QMessageBox::RejectRole );
297 askToUser.addButton( tr( "Local Database" ), QMessageBox::NoRole );
298 askToUser.addButton( tr( "Datasource Database" ), QMessageBox::YesRole );
299
300 switch ( askToUser.exec() )
301 {
302 case 0:
303 return;
304 case 2:
305 msg = mLayer->loadNamedStyle( mLayer->styleURI(), defaultLoadedFlag, false );
306 if ( !defaultLoadedFlag )
307 {
308 //something went wrong - let them know why
309 QMessageBox::information( this, tr( "Default Style" ), msg );
310 }
311 if ( msg.compare( tr( "Loaded from Provider" ) ) )
312 {
313 QMessageBox::information( this, tr( "Default Style" ), tr( "No default style was found for this layer." ) );
314 }
315 else
316 {
317 syncToLayer();
318 apply();
319 }
320
321 return;
322 default:
323 break;
324 }
325 }
326
327 QString myMessage = mLayer->loadNamedStyle( mLayer->styleURI(), defaultLoadedFlag, true );
328 // QString myMessage = layer->loadDefaultStyle( defaultLoadedFlag );
329 //reset if the default style was loaded OK only
330 if ( defaultLoadedFlag )
331 {
332 // all worked OK so no need to inform user
333 syncToLayer();
334 apply();
335 }
336 else
337 {
338 //something went wrong - let them know why
339 QMessageBox::information( this, tr( "Default Style" ), myMessage );
340 }
341}
342
344{
345 QString errorMsg;
346 const QgsDataProvider *provider = mLayer->dataProvider();
347 if ( !provider )
348 return;
350 {
351 QMessageBox askToUser;
352 askToUser.setText( tr( "Save default style to: " ) );
353 askToUser.setIcon( QMessageBox::Question );
354 askToUser.addButton( tr( "Cancel" ), QMessageBox::RejectRole );
355 askToUser.addButton( tr( "Local Database" ), QMessageBox::NoRole );
356 askToUser.addButton( tr( "Datasource Database" ), QMessageBox::YesRole );
357
358 switch ( askToUser.exec() )
359 {
360 case 0:
361 return;
362 case 2:
363 {
364 apply();
365 QString errorMessage;
366 if ( QgsProviderRegistry::instance()->styleExists( mLayer->providerType(), mLayer->source(), QString(), errorMessage ) )
367 {
368 if ( QMessageBox::
369 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 )
370 == QMessageBox::No )
371 {
372 return;
373 }
374 }
375 else if ( !errorMessage.isEmpty() )
376 {
377 QMessageBox::warning( nullptr, QObject::tr( "Save style in database" ), errorMessage );
378 return;
379 }
380
381 mLayer->saveStyleToDatabaseV2( QString(), QString(), true, QString(), errorMsg );
382 if ( errorMsg.isNull() )
383 {
384 return;
385 }
386 break;
387 }
388 default:
389 break;
390 }
391 }
392
394}
395
397{
398 if ( !mLayer->dataProvider() )
399 return;
400 QgsMapLayerSaveStyleDialog dlg( mLayer );
401
402 if ( dlg.exec() )
403 {
404 apply();
405
406 bool defaultLoadedFlag = false;
407 QString errorMessage;
408
409 StyleType type = dlg.currentStyleType();
410 switch ( type )
411 {
412 case QML:
413 case SLD:
414 {
415 QString filePath = dlg.outputFilePath();
416 if ( type == QML )
417 errorMessage = mLayer->saveNamedStyle( filePath, defaultLoadedFlag, dlg.styleCategories() );
418 else
419 {
421 errorMessage = mLayer->saveSldStyleV2( defaultLoadedFlag, sldContext );
422 }
423
424 //reset if the default style was loaded OK only
425 if ( defaultLoadedFlag )
426 {
427 syncToLayer();
428 }
429 else
430 {
431 //let the user know what went wrong
432 QMessageBox::information( this, tr( "Save Style" ), errorMessage );
433 }
434
435 break;
436 }
438 {
439 QString infoWindowTitle = QObject::tr( "Save style to DB (%1)" ).arg( mLayer->providerType() );
440
442
443 if ( QgsProviderRegistry::instance()->styleExists( mLayer->providerType(), mLayer->source(), dbSettings.name, errorMessage ) )
444 {
445 if ( QMessageBox::
446 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 )
447 == QMessageBox::No )
448 {
449 return;
450 }
451 }
452 else if ( !errorMessage.isEmpty() )
453 {
454 QMessageBox::warning( this, infoWindowTitle, errorMessage );
455 return;
456 }
457
458 mLayer->saveStyleToDatabaseV2( dbSettings.name, dbSettings.description, dbSettings.isDefault, dbSettings.uiFileContent, errorMessage, dlg.styleCategories() );
459
460 if ( !errorMessage.isNull() )
461 {
462 QMessageBox::warning( this, infoWindowTitle, errorMessage );
463 }
464 else
465 {
466 QMessageBox::information( this, infoWindowTitle, tr( "Style saved" ) );
467 }
468 break;
469 }
470 case UserDatabase:
471 {
472 QString infoWindowTitle = tr( "Save default style to local database" );
473 errorMessage = mLayer->saveDefaultStyle( defaultLoadedFlag, dlg.styleCategories() );
474 if ( !defaultLoadedFlag )
475 {
476 QMessageBox::warning( this, infoWindowTitle, errorMessage );
477 }
478 else
479 {
480 QMessageBox::information( this, infoWindowTitle, tr( "Style saved" ) );
481 }
482 break;
483 }
484 }
485 }
486}
487
489{
490 QString errorMsg;
491 QStringList ids, names, descriptions;
492
493 //get the list of styles in the db
494 int sectionLimit = mLayer->listStylesInDatabase( ids, names, descriptions, errorMsg );
495 QgsMapLayerLoadStyleDialog dlg( mLayer, this );
496 dlg.initializeLists( ids, names, descriptions, sectionLimit );
497
498 if ( dlg.exec() )
499 {
500 mOldStyle = mLayer->styleManager()->style( mLayer->styleManager()->currentStyle() );
502 StyleType type = dlg.currentStyleType();
503 bool defaultLoadedFlag = false;
504 switch ( type )
505 {
506 case QML:
507 case SLD:
508 {
509 QString filePath = dlg.filePath();
510 if ( type == SLD )
511 {
512 errorMsg = mLayer->loadSldStyle( filePath, defaultLoadedFlag );
513 }
514 else
515 {
516 errorMsg = mLayer->loadNamedStyle( filePath, defaultLoadedFlag, true, categories );
517 }
518 //reset if the default style was loaded OK only
519 if ( defaultLoadedFlag )
520 {
521 syncToLayer();
522 apply();
523 }
524 else
525 {
526 //let the user know what went wrong
527 QMessageBox::warning( this, tr( "Load Style" ), errorMsg );
528 }
529 break;
530 }
532 {
533 QString selectedStyleId = dlg.selectedStyleId();
534
535 QString qmlStyle = mLayer->getStyleFromDatabase( selectedStyleId, errorMsg );
536 if ( !errorMsg.isNull() )
537 {
538 QMessageBox::warning( this, tr( "Load Styles from Database" ), errorMsg );
539 return;
540 }
541
542 QDomDocument myDocument( u"qgis"_s );
543 myDocument.setContent( qmlStyle );
544
545 if ( mLayer->importNamedStyle( myDocument, errorMsg, categories ) )
546 {
547 syncToLayer();
548 apply();
549 }
550 else
551 {
552 QMessageBox::warning( this, tr( "Load Styles from Database" ), tr( "The retrieved style is not a valid named style. Error message: %1" ).arg( errorMsg ) );
553 }
554 break;
555 }
556 case UserDatabase:
557 {
558 errorMsg = mLayer->loadNamedStyle( mLayer->styleURI(), defaultLoadedFlag, true, categories );
559 //reset if the default style was loaded OK only
560 if ( defaultLoadedFlag )
561 {
562 syncToLayer();
563 apply();
564 }
565 else
566 {
567 QMessageBox::warning( this, tr( "Load Default Style" ), errorMsg );
568 }
569 break;
570 }
571 }
572 activateWindow(); // set focus back to properties dialog
573 }
574}
575
577{
578 if ( !mLayer )
579 return;
580
581 mOldStyle = mLayer->styleManager()->style( mLayer->styleManager()->currentStyle() );
582}
583
584QString QgsLayerPropertiesDialog::generateDialogTitle() const
585{
586 QString title = tr( "Layer Properties - %1" ).arg( mLayer->name() );
587
588 if ( !mLayer->styleManager()->isDefault( mLayer->styleManager()->currentStyle() ) )
589 title += u" (%1)"_s.arg( mLayer->styleManager()->currentStyle() );
590
591 return title;
592}
593
595{
596 if ( mOldStyle.xmlData() != mLayer->styleManager()->style( mLayer->styleManager()->currentStyle() ).xmlData() )
597 {
598 // need to reset style to previous - style applied directly to the layer (not in apply())
599 QString message;
600 QDomDocument doc( u"qgis"_s );
601 int errorLine, errorColumn;
602 doc.setContent( mOldStyle.xmlData(), false, &message, &errorLine, &errorColumn );
603 mLayer->importNamedStyle( doc, message );
604 syncToLayer();
605 }
606}
607
609{
611
612 if ( mMetadataPage && mBtnStyle && mBtnMetadata )
613 {
614 const bool isMetadataPanel = ( index == mOptStackedWidget->indexOf( mMetadataPage ) );
615 mBtnStyle->setVisible( !isMetadataPanel );
616 mBtnMetadata->setVisible( isMetadataPanel );
617 }
618}
619
621{
622 QFileInfo file( url.toLocalFile() );
623 if ( file.exists() && !file.isDir() )
624 QgsGui::nativePlatformInterface()->openFileExplorerAndSelectFile( url.toLocalFile() );
625 else
626 QDesktopServices::openUrl( url );
627}
@ NoVendorExtension
No vendor extensions.
Definition qgis.h:738
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:7504
#define Q_NOWARN_DEPRECATED_PUSH
Definition qgis.h:7503