35 , mFileName( fileName )
37 , mConnectionType( type )
42 QPushButton *pb =
nullptr;
43 pb =
new QPushButton( tr(
"Select All" ) );
44 buttonBox->addButton( pb, QDialogButtonBox::ActionRole );
47 pb =
new QPushButton( tr(
"Clear Selection" ) );
48 buttonBox->addButton( pb, QDialogButtonBox::ActionRole );
51 if ( mDialogMode ==
Import )
53 label->setText( tr(
"Select connections to import" ) );
54 buttonBox->button( QDialogButtonBox::Ok )->setText( tr(
"Import" ) );
55 buttonBox->button( QDialogButtonBox::Ok )->setEnabled(
false );
60 buttonBox->button( QDialogButtonBox::Ok )->setText( tr(
"Export" ) );
61 buttonBox->button( QDialogButtonBox::Ok )->setEnabled(
false );
64 if ( !populateConnections() )
66 QApplication::postEvent(
this,
new QCloseEvent() );
70 disconnect( buttonBox, &QDialogButtonBox::accepted,
this, &QDialog::accept );
78 buttonBox->button( QDialogButtonBox::Ok )->setEnabled( !listConnections->selectedItems().isEmpty() );
83 const QList<QListWidgetItem *> selection = listConnections->selectedItems();
84 if ( selection.isEmpty() )
86 QMessageBox::warning(
this, tr(
"Export/Import Error" ),
87 tr(
"You should select at least one connection from list." ) );
92 items.reserve( selection.size() );
93 for (
int i = 0; i < selection.size(); ++i )
95 items.append( selection.at( i )->text() );
98 if ( mDialogMode ==
Export )
100 QString fileName = QFileDialog::getSaveFileName(
this, tr(
"Save Connections" ), QDir::homePath(),
101 tr(
"XML files (*.xml *.XML)" ) );
102 if ( fileName.isEmpty() )
108 if ( !fileName.endsWith( QLatin1String(
".xml" ), Qt::CaseInsensitive ) )
110 fileName += QLatin1String(
".xml" );
113 mFileName = fileName;
116 switch ( mConnectionType )
119 doc = saveOWSConnections( items, QStringLiteral(
"WMS" ) );
122 doc = saveWfsConnections( items );
125 doc = savePgConnections( items );
128 doc = saveMssqlConnections( items );
131 doc = saveOWSConnections( items, QStringLiteral(
"WCS" ) );
134 doc = saveOracleConnections( items );
137 doc = saveHanaConnections( items );
140 doc = saveXyzTilesConnections( items );
144 doc = saveArcgisConnections( items );
147 doc = saveVectorTileConnections( items );
151 QFile file( mFileName );
152 if ( !file.open( QIODevice::WriteOnly | QIODevice::Text | QIODevice::Truncate ) )
154 QMessageBox::warning(
this, tr(
"Saving Connections" ),
155 tr(
"Cannot write file %1:\n%2." )
157 file.errorString() ) );
161 QTextStream out( &file );
166 QFile file( mFileName );
167 if ( !file.open( QIODevice::ReadOnly | QIODevice::Text ) )
169 QMessageBox::warning(
this, tr(
"Loading Connections" ),
170 tr(
"Cannot read file %1:\n%2." )
172 file.errorString() ) );
181 if ( !doc.setContent( &file,
true, &errorStr, &errorLine, &errorColumn ) )
183 QMessageBox::warning(
this, tr(
"Loading Connections" ),
184 tr(
"Parse error at line %1, column %2:\n%3" )
191 switch ( mConnectionType )
194 loadOWSConnections( doc, items, QStringLiteral(
"WMS" ) );
197 loadWfsConnections( doc, items );
200 loadPgConnections( doc, items );
203 loadMssqlConnections( doc, items );
206 loadOWSConnections( doc, items, QStringLiteral(
"WCS" ) );
209 loadOracleConnections( doc, items );
212 loadHanaConnections( doc, items );
215 loadXyzTilesConnections( doc, items );
218 loadArcgisConnections( doc, items, QStringLiteral(
"ARCGISMAPSERVER" ) );
221 loadArcgisConnections( doc, items, QStringLiteral(
"ARCGISFEATURESERVER" ) );
224 loadVectorTileConnections( doc, items );
228 listConnections->clear();
235bool QgsManageConnectionsDialog::populateConnections()
238 if ( mDialogMode ==
Export )
240 QStringList connections;
242 switch ( mConnectionType )
254 settings.
beginGroup( QStringLiteral(
"/PostgreSQL/connections" ) );
258 settings.
beginGroup( QStringLiteral(
"/MSSQL/connections" ) );
262 settings.
beginGroup( QStringLiteral(
"/Oracle/connections" ) );
266 settings.
beginGroup( QStringLiteral(
"/HANA/connections" ) );
277 connections = QgsVectorTileProviderConnection::sTreeConnectionVectorTile->items();
280 for (
const QString &connection : std::as_const( connections ) )
282 QListWidgetItem *item =
new QListWidgetItem();
283 item->setText( connection );
284 listConnections->addItem( item );
290 QFile file( mFileName );
291 if ( !file.open( QIODevice::ReadOnly | QIODevice::Text ) )
293 QMessageBox::warning(
this, tr(
"Loading Connections" ),
294 tr(
"Cannot read file %1:\n%2." )
296 file.errorString() ) );
305 if ( !doc.setContent( &file,
true, &errorStr, &errorLine, &errorColumn ) )
307 QMessageBox::warning(
this, tr(
"Loading Connections" ),
308 tr(
"Parse error at line %1, column %2:\n%3" )
315 const QDomElement root = doc.documentElement();
316 switch ( mConnectionType )
319 if ( root.tagName() != QLatin1String(
"qgsWMSConnections" ) )
321 QMessageBox::information(
this, tr(
"Loading Connections" ),
322 tr(
"The file is not a WMS connections exchange file." ) );
328 if ( root.tagName() != QLatin1String(
"qgsWFSConnections" ) )
330 QMessageBox::information(
this, tr(
"Loading Connections" ),
331 tr(
"The file is not a WFS connections exchange file." ) );
337 if ( root.tagName() != QLatin1String(
"qgsWCSConnections" ) )
339 QMessageBox::information(
this, tr(
"Loading Connections" ),
340 tr(
"The file is not a WCS connections exchange file." ) );
346 if ( root.tagName() != QLatin1String(
"qgsPgConnections" ) )
348 QMessageBox::information(
this, tr(
"Loading Connections" ),
349 tr(
"The file is not a PostGIS connections exchange file." ) );
355 if ( root.tagName() != QLatin1String(
"qgsMssqlConnections" ) )
357 QMessageBox::information(
this, tr(
"Loading Connections" ),
358 tr(
"The file is not a MS SQL Server connections exchange file." ) );
363 if ( root.tagName() != QLatin1String(
"qgsOracleConnections" ) )
365 QMessageBox::information(
this, tr(
"Loading Connections" ),
366 tr(
"The file is not an Oracle connections exchange file." ) );
371 if ( root.tagName() != QLatin1String(
"qgsHanaConnections" ) )
373 QMessageBox::warning(
this, tr(
"Loading Connections" ),
374 tr(
"The file is not a HANA connections exchange file." ) );
379 if ( root.tagName() != QLatin1String(
"qgsXYZTilesConnections" ) )
381 QMessageBox::information(
this, tr(
"Loading Connections" ),
382 tr(
"The file is not a XYZ Tiles connections exchange file." ) );
387 if ( root.tagName() != QLatin1String(
"qgsARCGISMAPSERVERConnections" ) )
389 QMessageBox::information(
this, tr(
"Loading Connections" ),
390 tr(
"The file is not a ArcGIS Map Service connections exchange file." ) );
395 if ( root.tagName() != QLatin1String(
"qgsARCGISFEATURESERVERConnections" ) )
397 QMessageBox::information(
this, tr(
"Loading Connections" ),
398 tr(
"The file is not a ArcGIS Feature Service connections exchange file." ) );
403 if ( root.tagName() != QLatin1String(
"qgsVectorTileConnections" ) )
405 QMessageBox::information(
this, tr(
"Loading Connections" ),
406 tr(
"The file is not a Vector Tile connections exchange file." ) );
412 QDomElement child = root.firstChildElement();
413 while ( !child.isNull() )
415 QListWidgetItem *item =
new QListWidgetItem();
416 item->setText( child.attribute( QStringLiteral(
"name" ) ) );
417 listConnections->addItem( item );
418 child = child.nextSiblingElement();
424QDomDocument QgsManageConnectionsDialog::saveOWSConnections(
const QStringList &connections,
const QString &service )
426 QDomDocument doc( QStringLiteral(
"connections" ) );
427 QDomElement root = doc.createElement(
"qgs" + service.toUpper() +
"Connections" );
428 root.setAttribute( QStringLiteral(
"version" ), QStringLiteral(
"1.0" ) );
429 doc.appendChild( root );
431 for (
int i = 0; i < connections.count(); ++i )
433 QDomElement el = doc.createElement( service.toLower() );
434 el.setAttribute( QStringLiteral(
"name" ), connections[ i ] );
437 if ( service == QLatin1String(
"WMS" ) )
447 httpHeader.updateDomElement( el );
452 root.appendChild( el );
458QDomDocument QgsManageConnectionsDialog::saveWfsConnections(
const QStringList &connections )
460 QDomDocument doc( QStringLiteral(
"connections" ) );
461 QDomElement root = doc.createElement( QStringLiteral(
"qgsWFSConnections" ) );
462 root.setAttribute( QStringLiteral(
"version" ), QStringLiteral(
"1.1" ) );
463 doc.appendChild( root );
465 for (
int i = 0; i < connections.count(); ++i )
467 QDomElement el = doc.createElement( QStringLiteral(
"wfs" ) );
468 el.setAttribute( QStringLiteral(
"name" ), connections[ i ] );
479 root.appendChild( el );
485QDomDocument QgsManageConnectionsDialog::savePgConnections(
const QStringList &connections )
487 QDomDocument doc( QStringLiteral(
"connections" ) );
488 QDomElement root = doc.createElement( QStringLiteral(
"qgsPgConnections" ) );
489 root.setAttribute( QStringLiteral(
"version" ), QStringLiteral(
"1.0" ) );
490 doc.appendChild( root );
494 for (
int i = 0; i < connections.count(); ++i )
496 path =
"/PostgreSQL/connections/" + connections[ i ];
497 QDomElement el = doc.createElement( QStringLiteral(
"postgis" ) );
498 el.setAttribute( QStringLiteral(
"name" ), connections[ i ] );
499 el.setAttribute( QStringLiteral(
"host" ), settings.
value( path +
"/host" ).toString() );
500 el.setAttribute( QStringLiteral(
"port" ), settings.
value( path +
"/port" ).toString() );
501 el.setAttribute( QStringLiteral(
"database" ), settings.
value( path +
"/database" ).toString() );
502 el.setAttribute( QStringLiteral(
"service" ), settings.
value( path +
"/service" ).toString() );
503 el.setAttribute( QStringLiteral(
"sslmode" ), settings.
value( path +
"/sslmode",
"1" ).toString() );
504 el.setAttribute( QStringLiteral(
"estimatedMetadata" ), settings.
value( path +
"/estimatedMetadata",
"0" ).toString() );
505 el.setAttribute( QStringLiteral(
"projectsInDatabase" ), settings.
value( path +
"/projectsInDatabase",
"0" ).toString() );
506 el.setAttribute( QStringLiteral(
"dontResolveType" ), settings.
value( path +
"/dontResolveType",
"0" ).toString() );
507 el.setAttribute( QStringLiteral(
"allowGeometrylessTables" ), settings.
value( path +
"/allowGeometrylessTables",
"0" ).toString() );
508 el.setAttribute( QStringLiteral(
"geometryColumnsOnly" ), settings.
value( path +
"/geometryColumnsOnly",
"0" ).toString() );
509 el.setAttribute( QStringLiteral(
"publicOnly" ), settings.
value( path +
"/publicOnly",
"0" ).toString() );
511 el.setAttribute( QStringLiteral(
"saveUsername" ), settings.
value( path +
"/saveUsername",
"false" ).toString() );
513 if ( settings.
value( path +
"/saveUsername",
"false" ).toString() == QLatin1String(
"true" ) )
515 el.setAttribute( QStringLiteral(
"username" ), settings.
value( path +
"/username" ).toString() );
518 el.setAttribute( QStringLiteral(
"savePassword" ), settings.
value( path +
"/savePassword",
"false" ).toString() );
520 if ( settings.
value( path +
"/savePassword",
"false" ).toString() == QLatin1String(
"true" ) )
522 el.setAttribute( QStringLiteral(
"password" ), settings.
value( path +
"/password" ).toString() );
525 root.appendChild( el );
531QDomDocument QgsManageConnectionsDialog::saveMssqlConnections(
const QStringList &connections )
533 QDomDocument doc( QStringLiteral(
"connections" ) );
534 QDomElement root = doc.createElement( QStringLiteral(
"qgsMssqlConnections" ) );
535 root.setAttribute( QStringLiteral(
"version" ), QStringLiteral(
"1.0" ) );
536 doc.appendChild( root );
540 for (
int i = 0; i < connections.count(); ++i )
542 path =
"/MSSQL/connections/" + connections[ i ];
543 QDomElement el = doc.createElement( QStringLiteral(
"mssql" ) );
544 el.setAttribute( QStringLiteral(
"name" ), connections[ i ] );
545 el.setAttribute( QStringLiteral(
"host" ), settings.
value( path +
"/host" ).toString() );
546 el.setAttribute( QStringLiteral(
"port" ), settings.
value( path +
"/port" ).toString() );
547 el.setAttribute( QStringLiteral(
"database" ), settings.
value( path +
"/database" ).toString() );
548 el.setAttribute( QStringLiteral(
"service" ), settings.
value( path +
"/service" ).toString() );
549 el.setAttribute( QStringLiteral(
"sslmode" ), settings.
value( path +
"/sslmode",
"1" ).toString() );
550 el.setAttribute( QStringLiteral(
"estimatedMetadata" ), settings.
value( path +
"/estimatedMetadata",
"0" ).toString() );
552 el.setAttribute( QStringLiteral(
"saveUsername" ), settings.
value( path +
"/saveUsername",
"false" ).toString() );
554 if ( settings.
value( path +
"/saveUsername",
"false" ).toString() == QLatin1String(
"true" ) )
556 el.setAttribute( QStringLiteral(
"username" ), settings.
value( path +
"/username" ).toString() );
559 el.setAttribute( QStringLiteral(
"savePassword" ), settings.
value( path +
"/savePassword",
"false" ).toString() );
561 if ( settings.
value( path +
"/savePassword",
"false" ).toString() == QLatin1String(
"true" ) )
563 el.setAttribute( QStringLiteral(
"password" ), settings.
value( path +
"/password" ).toString() );
566 root.appendChild( el );
572QDomDocument QgsManageConnectionsDialog::saveOracleConnections(
const QStringList &connections )
574 QDomDocument doc( QStringLiteral(
"connections" ) );
575 QDomElement root = doc.createElement( QStringLiteral(
"qgsOracleConnections" ) );
576 root.setAttribute( QStringLiteral(
"version" ), QStringLiteral(
"1.0" ) );
577 doc.appendChild( root );
581 for (
int i = 0; i < connections.count(); ++i )
583 path =
"/Oracle/connections/" + connections[ i ];
584 QDomElement el = doc.createElement( QStringLiteral(
"oracle" ) );
585 el.setAttribute( QStringLiteral(
"name" ), connections[ i ] );
586 el.setAttribute( QStringLiteral(
"host" ), settings.
value( path +
"/host" ).toString() );
587 el.setAttribute( QStringLiteral(
"port" ), settings.
value( path +
"/port" ).toString() );
588 el.setAttribute( QStringLiteral(
"database" ), settings.
value( path +
"/database" ).toString() );
589 el.setAttribute( QStringLiteral(
"dboptions" ), settings.
value( path +
"/dboptions" ).toString() );
590 el.setAttribute( QStringLiteral(
"dbworkspace" ), settings.
value( path +
"/dbworkspace" ).toString() );
591 el.setAttribute( QStringLiteral(
"schema" ), settings.
value( path +
"/schema" ).toString() );
592 el.setAttribute( QStringLiteral(
"estimatedMetadata" ), settings.
value( path +
"/estimatedMetadata",
"0" ).toString() );
593 el.setAttribute( QStringLiteral(
"userTablesOnly" ), settings.
value( path +
"/userTablesOnly",
"0" ).toString() );
594 el.setAttribute( QStringLiteral(
"geometryColumnsOnly" ), settings.
value( path +
"/geometryColumnsOnly",
"0" ).toString() );
595 el.setAttribute( QStringLiteral(
"allowGeometrylessTables" ), settings.
value( path +
"/allowGeometrylessTables",
"0" ).toString() );
597 el.setAttribute( QStringLiteral(
"saveUsername" ), settings.
value( path +
"/saveUsername",
"false" ).toString() );
599 if ( settings.
value( path +
"/saveUsername",
"false" ).toString() == QLatin1String(
"true" ) )
601 el.setAttribute( QStringLiteral(
"username" ), settings.
value( path +
"/username" ).toString() );
604 el.setAttribute( QStringLiteral(
"savePassword" ), settings.
value( path +
"/savePassword",
"false" ).toString() );
606 if ( settings.
value( path +
"/savePassword",
"false" ).toString() == QLatin1String(
"true" ) )
608 el.setAttribute( QStringLiteral(
"password" ), settings.
value( path +
"/password" ).toString() );
611 root.appendChild( el );
617QDomDocument QgsManageConnectionsDialog::saveHanaConnections(
const QStringList &connections )
619 QDomDocument doc( QStringLiteral(
"connections" ) );
620 QDomElement root = doc.createElement( QStringLiteral(
"qgsHanaConnections" ) );
621 root.setAttribute( QStringLiteral(
"version" ), QStringLiteral(
"1.0" ) );
622 doc.appendChild( root );
626 for (
int i = 0; i < connections.count(); ++i )
628 path =
"/HANA/connections/" + connections[i];
629 QDomElement el = doc.createElement( QStringLiteral(
"hana" ) );
630 el.setAttribute( QStringLiteral(
"name" ), connections[i] );
631 el.setAttribute( QStringLiteral(
"driver" ), settings.
value( path +
"/driver", QString() ).toString() );
632 el.setAttribute( QStringLiteral(
"host" ), settings.
value( path +
"/host", QString() ).toString() );
633 el.setAttribute( QStringLiteral(
"identifierType" ), settings.
value( path +
"/identifierType", QString() ).toString() );
634 el.setAttribute( QStringLiteral(
"identifier" ), settings.
value( path +
"/identifier", QString() ).toString() );
635 el.setAttribute( QStringLiteral(
"multitenant" ), settings.
value( path +
"/multitenant", QString() ).toString() );
636 el.setAttribute( QStringLiteral(
"database" ), settings.
value( path +
"/database", QString() ).toString() );
637 el.setAttribute( QStringLiteral(
"schema" ), settings.
value( path +
"/schema", QString() ).toString() );
638 el.setAttribute( QStringLiteral(
"userTablesOnly" ), settings.
value( path +
"/userTablesOnly", QStringLiteral(
"0" ) ).toString() );
639 el.setAttribute( QStringLiteral(
"allowGeometrylessTables" ), settings.
value( path +
"/allowGeometrylessTables", QStringLiteral(
"0" ) ).toString() );
641 el.setAttribute( QStringLiteral(
"saveUsername" ), settings.
value( path +
"/saveUsername", QStringLiteral(
"false" ) ).toString() );
642 if ( settings.
value( path +
"/saveUsername",
"false" ).toString() == QLatin1String(
"true" ) )
644 el.setAttribute( QStringLiteral(
"username" ), settings.
value( path +
"/username", QString() ).toString() );
647 el.setAttribute( QStringLiteral(
"savePassword" ), settings.
value( path +
"/savePassword", QStringLiteral(
"false" ) ).toString() );
648 if ( settings.
value( path +
"/savePassword",
"false" ).toString() == QLatin1String(
"true" ) )
650 el.setAttribute( QStringLiteral(
"password" ), settings.
value( path +
"/password", QString() ).toString() );
653 el.setAttribute( QStringLiteral(
"sslEnabled" ), settings.
value( path +
"/sslEnabled", QStringLiteral(
"false" ) ).toString() );
654 el.setAttribute( QStringLiteral(
"sslCryptoProvider" ), settings.
value( path +
"/sslCryptoProvider", QStringLiteral(
"openssl" ) ).toString() );
655 el.setAttribute( QStringLiteral(
"sslKeyStore" ), settings.
value( path +
"/sslKeyStore", QString() ).toString() );
656 el.setAttribute( QStringLiteral(
"sslTrustStore" ), settings.
value( path +
"/sslTrustStore", QString() ).toString() );
657 el.setAttribute( QStringLiteral(
"sslValidateCertificate" ), settings.
value( path +
"/sslValidateCertificate", QStringLiteral(
"false" ) ).toString() );
658 el.setAttribute( QStringLiteral(
"sslHostNameInCertificate" ), settings.
value( path +
"/sslHostNameInCertificate", QString() ).toString() );
660 root.appendChild( el );
666QDomDocument QgsManageConnectionsDialog::saveXyzTilesConnections(
const QStringList &connections )
668 QDomDocument doc( QStringLiteral(
"connections" ) );
669 QDomElement root = doc.createElement( QStringLiteral(
"qgsXYZTilesConnections" ) );
670 root.setAttribute( QStringLiteral(
"version" ), QStringLiteral(
"1.0" ) );
671 doc.appendChild( root );
673 for (
int i = 0; i < connections.count(); ++i )
676 QDomElement el = doc.createElement( QStringLiteral(
"xyztiles" ) );
678 el.setAttribute( QStringLiteral(
"name" ), connections[ i ] );
688 httpHeader.updateDomElement( el );
690 root.appendChild( el );
696QDomDocument QgsManageConnectionsDialog::saveArcgisConnections(
const QStringList &connections )
698 QDomDocument doc( QStringLiteral(
"connections" ) );
699 QDomElement root = doc.createElement(
"qgsARCGISFEATURESERVERConnections" );
700 root.setAttribute( QStringLiteral(
"version" ), QStringLiteral(
"1.0" ) );
701 doc.appendChild( root );
703 for (
const QString &connection : connections )
705 QDomElement el = doc.createElement( QStringLiteral(
"arcgisfeatureserver" ) );
706 el.setAttribute( QStringLiteral(
"name" ), connection );
710 httpHeader.updateDomElement( el );
716 root.appendChild( el );
722QDomDocument QgsManageConnectionsDialog::saveVectorTileConnections(
const QStringList &connections )
724 QDomDocument doc( QStringLiteral(
"connections" ) );
725 QDomElement root = doc.createElement( QStringLiteral(
"qgsVectorTileConnections" ) );
726 root.setAttribute( QStringLiteral(
"version" ), QStringLiteral(
"1.0" ) );
727 doc.appendChild( root );
729 for (
int i = 0; i < connections.count(); ++i )
731 QDomElement el = doc.createElement( QStringLiteral(
"vectortile" ) );
733 el.setAttribute( QStringLiteral(
"name" ), connections[ i ] );
734 el.setAttribute( QStringLiteral(
"url" ), QgsVectorTileProviderConnection::settingsUrl->value( connections[ i ] ) );
735 el.setAttribute( QStringLiteral(
"zmin" ), QgsVectorTileProviderConnection::settingsZmin->value( connections[ i ] ) );
736 el.setAttribute( QStringLiteral(
"zmax" ), QgsVectorTileProviderConnection::settingsZmax->value( connections[ i ] ) );
737 el.setAttribute( QStringLiteral(
"serviceType" ), QgsVectorTileProviderConnection::settingsServiceType->value( connections[ i ] ) );
738 el.setAttribute( QStringLiteral(
"authcfg" ), QgsVectorTileProviderConnection::settingsAuthcfg->value( connections[ i ] ) );
739 el.setAttribute( QStringLiteral(
"username" ), QgsVectorTileProviderConnection::settingsUsername->value( connections[ i ] ) );
740 el.setAttribute( QStringLiteral(
"password" ), QgsVectorTileProviderConnection::settingsPassword->value( connections[ i ] ) );
741 el.setAttribute( QStringLiteral(
"styleUrl" ), QgsVectorTileProviderConnection::settingsStyleUrl->value( connections[ i ] ) );
743 QgsHttpHeaders httpHeader( QgsVectorTileProviderConnection::settingsHeaders->value( connections[ i ] ) );
744 httpHeader.updateDomElement( el );
746 root.appendChild( el );
752void QgsManageConnectionsDialog::loadOWSConnections(
const QDomDocument &doc,
const QStringList &items,
const QString &service )
754 const QDomElement root = doc.documentElement();
755 if ( root.tagName() !=
"qgs" + service.toUpper() +
"Connections" )
757 QMessageBox::information(
this, tr(
"Loading Connections" ),
758 tr(
"The file is not a %1 connections exchange file." ).arg( service ) );
762 QString connectionName;
764 QDomElement child = root.firstChildElement();
766 bool overwrite =
true;
768 while ( !child.isNull() )
770 connectionName = child.attribute( QStringLiteral(
"name" ) );
771 if ( !items.contains( connectionName ) )
773 child = child.nextSiblingElement();
780 const int res = QMessageBox::warning(
this,
781 tr(
"Loading Connections" ),
782 tr(
"Connection with name '%1' already exists. Overwrite?" )
783 .arg( connectionName ),
784 QMessageBox::Yes | QMessageBox::YesToAll | QMessageBox::No | QMessageBox::NoToAll | QMessageBox::Cancel );
788 case QMessageBox::Cancel:
790 case QMessageBox::No:
791 child = child.nextSiblingElement();
793 case QMessageBox::Yes:
796 case QMessageBox::YesToAll:
800 case QMessageBox::NoToAll:
809 child = child.nextSiblingElement();
825 if ( !child.attribute( QStringLiteral(
"username" ) ).isEmpty() )
830 child = child.nextSiblingElement();
834void QgsManageConnectionsDialog::loadWfsConnections(
const QDomDocument &doc,
const QStringList &items )
836 const QDomElement root = doc.documentElement();
837 if ( root.tagName() != QLatin1String(
"qgsWFSConnections" ) )
839 QMessageBox::information(
this, tr(
"Loading Connections" ),
840 tr(
"The file is not a WFS connections exchange file." ) );
844 QString connectionName;
847 QDomElement child = root.firstChildElement();
849 bool overwrite =
true;
851 while ( !child.isNull() )
853 connectionName = child.attribute( QStringLiteral(
"name" ) );
854 if ( !items.contains( connectionName ) )
856 child = child.nextSiblingElement();
861 if ( keys.contains( connectionName ) && prompt )
863 const int res = QMessageBox::warning(
this,
864 tr(
"Loading Connections" ),
865 tr(
"Connection with name '%1' already exists. Overwrite?" )
866 .arg( connectionName ),
867 QMessageBox::Yes | QMessageBox::YesToAll | QMessageBox::No | QMessageBox::NoToAll | QMessageBox::Cancel );
871 case QMessageBox::Cancel:
873 case QMessageBox::No:
874 child = child.nextSiblingElement();
876 case QMessageBox::Yes:
879 case QMessageBox::YesToAll:
883 case QMessageBox::NoToAll:
890 if ( keys.contains( connectionName ) )
894 child = child.nextSiblingElement();
900 keys << connectionName;
913 if ( !child.attribute( QStringLiteral(
"username" ) ).isEmpty() )
918 child = child.nextSiblingElement();
922void QgsManageConnectionsDialog::loadPgConnections(
const QDomDocument &doc,
const QStringList &items )
924 const QDomElement root = doc.documentElement();
925 if ( root.tagName() != QLatin1String(
"qgsPgConnections" ) )
927 QMessageBox::information(
this,
928 tr(
"Loading Connections" ),
929 tr(
"The file is not a PostGIS connections exchange file." ) );
933 QString connectionName;
935 settings.
beginGroup( QStringLiteral(
"/PostgreSQL/connections" ) );
938 QDomElement child = root.firstChildElement();
940 bool overwrite =
true;
942 while ( !child.isNull() )
944 connectionName = child.attribute( QStringLiteral(
"name" ) );
945 if ( !items.contains( connectionName ) )
947 child = child.nextSiblingElement();
952 if ( keys.contains( connectionName ) && prompt )
954 const int res = QMessageBox::warning(
this,
955 tr(
"Loading Connections" ),
956 tr(
"Connection with name '%1' already exists. Overwrite?" )
957 .arg( connectionName ),
958 QMessageBox::Yes | QMessageBox::YesToAll | QMessageBox::No | QMessageBox::NoToAll | QMessageBox::Cancel );
961 case QMessageBox::Cancel:
963 case QMessageBox::No:
964 child = child.nextSiblingElement();
966 case QMessageBox::Yes:
969 case QMessageBox::YesToAll:
973 case QMessageBox::NoToAll:
980 if ( keys.contains( connectionName ) )
984 child = child.nextSiblingElement();
990 keys << connectionName;
994 settings.
beginGroup(
"/PostgreSQL/connections/" + connectionName );
996 settings.
setValue( QStringLiteral(
"/host" ), child.attribute( QStringLiteral(
"host" ) ) );
997 settings.
setValue( QStringLiteral(
"/port" ), child.attribute( QStringLiteral(
"port" ) ) );
998 settings.
setValue( QStringLiteral(
"/database" ), child.attribute( QStringLiteral(
"database" ) ) );
999 if ( child.hasAttribute( QStringLiteral(
"service" ) ) )
1001 settings.
setValue( QStringLiteral(
"/service" ), child.attribute( QStringLiteral(
"service" ) ) );
1005 settings.
setValue( QStringLiteral(
"/service" ),
"" );
1007 settings.
setValue( QStringLiteral(
"/sslmode" ), child.attribute( QStringLiteral(
"sslmode" ) ) );
1008 settings.
setValue( QStringLiteral(
"/estimatedMetadata" ), child.attribute( QStringLiteral(
"estimatedMetadata" ) ) );
1009 settings.
setValue( QStringLiteral(
"/projectsInDatabase" ), child.attribute( QStringLiteral(
"projectsInDatabase" ), 0 ) );
1010 settings.
setValue( QStringLiteral(
"/dontResolveType" ), child.attribute( QStringLiteral(
"dontResolveType" ), 0 ) );
1011 settings.
setValue( QStringLiteral(
"/allowGeometrylessTables" ), child.attribute( QStringLiteral(
"allowGeometrylessTables" ), 0 ) );
1012 settings.
setValue( QStringLiteral(
"/geometryColumnsOnly" ), child.attribute( QStringLiteral(
"geometryColumnsOnly" ), 0 ) );
1013 settings.
setValue( QStringLiteral(
"/publicOnly" ), child.attribute( QStringLiteral(
"publicOnly" ), 0 ) );
1014 settings.
setValue( QStringLiteral(
"/saveUsername" ), child.attribute( QStringLiteral(
"saveUsername" ) ) );
1015 settings.
setValue( QStringLiteral(
"/username" ), child.attribute( QStringLiteral(
"username" ) ) );
1016 settings.
setValue( QStringLiteral(
"/savePassword" ), child.attribute( QStringLiteral(
"savePassword" ) ) );
1017 settings.
setValue( QStringLiteral(
"/password" ), child.attribute( QStringLiteral(
"password" ) ) );
1020 child = child.nextSiblingElement();
1024void QgsManageConnectionsDialog::loadMssqlConnections(
const QDomDocument &doc,
const QStringList &items )
1026 const QDomElement root = doc.documentElement();
1027 if ( root.tagName() != QLatin1String(
"qgsMssqlConnections" ) )
1029 QMessageBox::information(
this,
1030 tr(
"Loading Connections" ),
1031 tr(
"The file is not a MS SQL Server connections exchange file." ) );
1035 QString connectionName;
1037 settings.
beginGroup( QStringLiteral(
"/MSSQL/connections" ) );
1040 QDomElement child = root.firstChildElement();
1042 bool overwrite =
true;
1044 while ( !child.isNull() )
1046 connectionName = child.attribute( QStringLiteral(
"name" ) );
1047 if ( !items.contains( connectionName ) )
1049 child = child.nextSiblingElement();
1054 if ( keys.contains( connectionName ) && prompt )
1056 const int res = QMessageBox::warning(
this,
1057 tr(
"Loading Connections" ),
1058 tr(
"Connection with name '%1' already exists. Overwrite?" )
1059 .arg( connectionName ),
1060 QMessageBox::Yes | QMessageBox::YesToAll | QMessageBox::No | QMessageBox::NoToAll | QMessageBox::Cancel );
1063 case QMessageBox::Cancel:
1065 case QMessageBox::No:
1066 child = child.nextSiblingElement();
1068 case QMessageBox::Yes:
1071 case QMessageBox::YesToAll:
1075 case QMessageBox::NoToAll:
1082 if ( keys.contains( connectionName ) )
1086 child = child.nextSiblingElement();
1092 keys << connectionName;
1096 settings.
beginGroup(
"/MSSQL/connections/" + connectionName );
1098 settings.
setValue( QStringLiteral(
"/host" ), child.attribute( QStringLiteral(
"host" ) ) );
1099 settings.
setValue( QStringLiteral(
"/port" ), child.attribute( QStringLiteral(
"port" ) ) );
1100 settings.
setValue( QStringLiteral(
"/database" ), child.attribute( QStringLiteral(
"database" ) ) );
1101 if ( child.hasAttribute( QStringLiteral(
"service" ) ) )
1103 settings.
setValue( QStringLiteral(
"/service" ), child.attribute( QStringLiteral(
"service" ) ) );
1107 settings.
setValue( QStringLiteral(
"/service" ),
"" );
1109 settings.
setValue( QStringLiteral(
"/sslmode" ), child.attribute( QStringLiteral(
"sslmode" ) ) );
1110 settings.
setValue( QStringLiteral(
"/estimatedMetadata" ), child.attribute( QStringLiteral(
"estimatedMetadata" ) ) );
1111 settings.
setValue( QStringLiteral(
"/saveUsername" ), child.attribute( QStringLiteral(
"saveUsername" ) ) );
1112 settings.
setValue( QStringLiteral(
"/username" ), child.attribute( QStringLiteral(
"username" ) ) );
1113 settings.
setValue( QStringLiteral(
"/savePassword" ), child.attribute( QStringLiteral(
"savePassword" ) ) );
1114 settings.
setValue( QStringLiteral(
"/password" ), child.attribute( QStringLiteral(
"password" ) ) );
1117 child = child.nextSiblingElement();
1121void QgsManageConnectionsDialog::loadOracleConnections(
const QDomDocument &doc,
const QStringList &items )
1123 const QDomElement root = doc.documentElement();
1124 if ( root.tagName() != QLatin1String(
"qgsOracleConnections" ) )
1126 QMessageBox::information(
this,
1127 tr(
"Loading Connections" ),
1128 tr(
"The file is not an Oracle connections exchange file." ) );
1132 QString connectionName;
1134 settings.
beginGroup( QStringLiteral(
"/Oracle/connections" ) );
1137 QDomElement child = root.firstChildElement();
1139 bool overwrite =
true;
1141 while ( !child.isNull() )
1143 connectionName = child.attribute( QStringLiteral(
"name" ) );
1144 if ( !items.contains( connectionName ) )
1146 child = child.nextSiblingElement();
1151 if ( keys.contains( connectionName ) && prompt )
1153 const int res = QMessageBox::warning(
this,
1154 tr(
"Loading Connections" ),
1155 tr(
"Connection with name '%1' already exists. Overwrite?" )
1156 .arg( connectionName ),
1157 QMessageBox::Yes | QMessageBox::YesToAll | QMessageBox::No | QMessageBox::NoToAll | QMessageBox::Cancel );
1160 case QMessageBox::Cancel:
1162 case QMessageBox::No:
1163 child = child.nextSiblingElement();
1165 case QMessageBox::Yes:
1168 case QMessageBox::YesToAll:
1172 case QMessageBox::NoToAll:
1179 if ( keys.contains( connectionName ) )
1183 child = child.nextSiblingElement();
1189 keys << connectionName;
1193 settings.
beginGroup(
"/Oracle/connections/" + connectionName );
1195 settings.
setValue( QStringLiteral(
"/host" ), child.attribute( QStringLiteral(
"host" ) ) );
1196 settings.
setValue( QStringLiteral(
"/port" ), child.attribute( QStringLiteral(
"port" ) ) );
1197 settings.
setValue( QStringLiteral(
"/database" ), child.attribute( QStringLiteral(
"database" ) ) );
1198 settings.
setValue( QStringLiteral(
"/dboptions" ), child.attribute( QStringLiteral(
"dboptions" ) ) );
1199 settings.
setValue( QStringLiteral(
"/dbworkspace" ), child.attribute( QStringLiteral(
"dbworkspace" ) ) );
1200 settings.
setValue( QStringLiteral(
"/schema" ), child.attribute( QStringLiteral(
"schema" ) ) );
1201 settings.
setValue( QStringLiteral(
"/estimatedMetadata" ), child.attribute( QStringLiteral(
"estimatedMetadata" ) ) );
1202 settings.
setValue( QStringLiteral(
"/userTablesOnly" ), child.attribute( QStringLiteral(
"userTablesOnly" ) ) );
1203 settings.
setValue( QStringLiteral(
"/geometryColumnsOnly" ), child.attribute( QStringLiteral(
"geometryColumnsOnly" ) ) );
1204 settings.
setValue( QStringLiteral(
"/allowGeometrylessTables" ), child.attribute( QStringLiteral(
"allowGeometrylessTables" ) ) );
1205 settings.
setValue( QStringLiteral(
"/saveUsername" ), child.attribute( QStringLiteral(
"saveUsername" ) ) );
1206 settings.
setValue( QStringLiteral(
"/username" ), child.attribute( QStringLiteral(
"username" ) ) );
1207 settings.
setValue( QStringLiteral(
"/savePassword" ), child.attribute( QStringLiteral(
"savePassword" ) ) );
1208 settings.
setValue( QStringLiteral(
"/password" ), child.attribute( QStringLiteral(
"password" ) ) );
1211 child = child.nextSiblingElement();
1215void QgsManageConnectionsDialog::loadHanaConnections(
const QDomDocument &doc,
const QStringList &items )
1217 QDomElement root = doc.documentElement();
1218 if ( root.tagName() != QLatin1String(
"qgsHanaConnections" ) )
1220 QMessageBox::warning(
this,
1221 tr(
"Loading Connections" ),
1222 tr(
"The file is not a HANA connections exchange file." ) );
1226 const QDomAttr version = root.attributeNode(
"version" );
1227 if ( version.value() != QLatin1String(
"1.0" ) )
1229 QMessageBox::warning(
this,
1230 tr(
"Loading Connections" ),
1231 tr(
"The HANA connections exchange file version '%1' is not supported." ).arg( version.value() ) );
1236 settings.
beginGroup( QStringLiteral(
"/HANA/connections" ) );
1239 QDomElement child = root.firstChildElement();
1241 bool overwrite =
true;
1243 while ( !child.isNull() )
1245 const QString connectionName = child.attribute( QStringLiteral(
"name" ) );
1246 if ( !items.contains( connectionName ) )
1248 child = child.nextSiblingElement();
1253 if ( keys.contains( connectionName ) && prompt )
1255 const int res = QMessageBox::warning(
this,
1256 tr(
"Loading Connections" ),
1257 tr(
"Connection with name '%1' already exists. Overwrite?" )
1258 .arg( connectionName ),
1259 QMessageBox::Yes | QMessageBox::YesToAll | QMessageBox::No | QMessageBox::NoToAll | QMessageBox::Cancel );
1262 case QMessageBox::Cancel:
1264 case QMessageBox::No:
1265 child = child.nextSiblingElement();
1267 case QMessageBox::Yes:
1270 case QMessageBox::YesToAll:
1274 case QMessageBox::NoToAll:
1281 if ( keys.contains( connectionName ) )
1285 child = child.nextSiblingElement();
1291 keys << connectionName;
1295 settings.
beginGroup(
"/HANA/connections/" + connectionName );
1297 for (
const QString param :
1298 {
"driver",
"host",
"database",
"identifierType",
"identifier",
"multitenant",
"schema",
"userTablesOnly",
1299 "allowGeometrylessTables",
"saveUsername",
"username",
"savePassword",
"password",
"sslEnabled",
1300 "sslCryptoProvider",
"sslKeyStore",
"sslTrustStore",
"sslValidateCertificate",
"sslHostNameInCertificate"
1302 settings.
setValue( QStringLiteral(
"/" ) + param, child.attribute( param ) );
1306 child = child.nextSiblingElement();
1310void QgsManageConnectionsDialog::loadXyzTilesConnections(
const QDomDocument &doc,
const QStringList &items )
1312 const QDomElement root = doc.documentElement();
1313 if ( root.tagName() != QLatin1String(
"qgsXYZTilesConnections" ) )
1315 QMessageBox::information(
this, tr(
"Loading Connections" ),
1316 tr(
"The file is not a XYZ Tiles connections exchange file." ) );
1320 QString connectionName;
1322 QDomElement child = root.firstChildElement();
1324 bool overwrite =
true;
1326 while ( !child.isNull() )
1328 connectionName = child.attribute( QStringLiteral(
"name" ) );
1329 if ( !items.contains( connectionName ) )
1331 child = child.nextSiblingElement();
1336 if ( keys.contains( connectionName ) && prompt )
1338 const int res = QMessageBox::warning(
this,
1339 tr(
"Loading Connections" ),
1340 tr(
"Connection with name '%1' already exists. Overwrite?" )
1341 .arg( connectionName ),
1342 QMessageBox::Yes | QMessageBox::YesToAll | QMessageBox::No | QMessageBox::NoToAll | QMessageBox::Cancel );
1346 case QMessageBox::Cancel:
1348 case QMessageBox::No:
1349 child = child.nextSiblingElement();
1351 case QMessageBox::Yes:
1354 case QMessageBox::YesToAll:
1358 case QMessageBox::NoToAll:
1365 if ( keys.contains( connectionName ) )
1369 child = child.nextSiblingElement();
1375 keys << connectionName;
1390 child = child.nextSiblingElement();
1394void QgsManageConnectionsDialog::loadArcgisConnections(
const QDomDocument &doc,
const QStringList &items,
const QString &service )
1396 const QDomElement root = doc.documentElement();
1397 if ( root.tagName() !=
"qgs" + service.toUpper() +
"Connections" )
1399 QMessageBox::information(
this, tr(
"Loading Connections" ),
1400 tr(
"The file is not a %1 connections exchange file." ).arg( service ) );
1404 QString connectionName;
1406 QDomElement child = root.firstChildElement();
1408 bool overwrite =
true;
1410 while ( !child.isNull() )
1412 connectionName = child.attribute( QStringLiteral(
"name" ) );
1413 if ( !items.contains( connectionName ) )
1415 child = child.nextSiblingElement();
1420 if ( keys.contains( connectionName ) && prompt )
1422 const int res = QMessageBox::warning(
this,
1423 tr(
"Loading Connections" ),
1424 tr(
"Connection with name '%1' already exists. Overwrite?" )
1425 .arg( connectionName ),
1426 QMessageBox::Yes | QMessageBox::YesToAll | QMessageBox::No | QMessageBox::NoToAll | QMessageBox::Cancel );
1430 case QMessageBox::Cancel:
1432 case QMessageBox::No:
1433 child = child.nextSiblingElement();
1435 case QMessageBox::Yes:
1438 case QMessageBox::YesToAll:
1442 case QMessageBox::NoToAll:
1449 if ( keys.contains( connectionName ) )
1453 child = child.nextSiblingElement();
1459 keys << connectionName;
1472 child = child.nextSiblingElement();
1476void QgsManageConnectionsDialog::loadVectorTileConnections(
const QDomDocument &doc,
const QStringList &items )
1478 const QDomElement root = doc.documentElement();
1479 if ( root.tagName() != QLatin1String(
"qgsVectorTileConnections" ) )
1481 QMessageBox::information(
this, tr(
"Loading Connections" ),
1482 tr(
"The file is not a Vector Tile connections exchange file." ) );
1486 QString connectionName;
1488 settings.
beginGroup( QStringLiteral(
"/qgis/connections-vector-tile" ) );
1491 QDomElement child = root.firstChildElement();
1493 bool overwrite =
true;
1495 while ( !child.isNull() )
1497 connectionName = child.attribute( QStringLiteral(
"name" ) );
1498 if ( !items.contains( connectionName ) )
1500 child = child.nextSiblingElement();
1505 if ( keys.contains( connectionName ) && prompt )
1507 const int res = QMessageBox::warning(
this,
1508 tr(
"Loading Connections" ),
1509 tr(
"Connection with name '%1' already exists. Overwrite?" )
1510 .arg( connectionName ),
1511 QMessageBox::Yes | QMessageBox::YesToAll | QMessageBox::No | QMessageBox::NoToAll | QMessageBox::Cancel );
1515 case QMessageBox::Cancel:
1517 case QMessageBox::No:
1518 child = child.nextSiblingElement();
1520 case QMessageBox::Yes:
1523 case QMessageBox::YesToAll:
1527 case QMessageBox::NoToAll:
1534 if ( keys.contains( connectionName ) )
1538 child = child.nextSiblingElement();
1544 keys << connectionName;
1547 QgsVectorTileProviderConnection::settingsUrl->setValue( child.attribute( QStringLiteral(
"url" ) ), connectionName );
1548 QgsVectorTileProviderConnection::settingsZmin->setValue( child.attribute( QStringLiteral(
"zmin" ) ).toInt(), connectionName );
1549 QgsVectorTileProviderConnection::settingsZmax->setValue( child.attribute( QStringLiteral(
"zmax" ) ).toInt(), connectionName );
1550 QgsVectorTileProviderConnection::settingsServiceType->setValue( child.attribute( QStringLiteral(
"serviceType" ) ), connectionName );
1551 QgsVectorTileProviderConnection::settingsAuthcfg->setValue( child.attribute( QStringLiteral(
"authcfg" ) ), connectionName );
1552 QgsVectorTileProviderConnection::settingsUsername->setValue( child.attribute( QStringLiteral(
"username" ) ), connectionName );
1553 QgsVectorTileProviderConnection::settingsPassword->setValue( child.attribute( QStringLiteral(
"password" ) ), connectionName );
1554 QgsVectorTileProviderConnection::settingsStyleUrl->setValue( child.attribute( QStringLiteral(
"styleUrl" ) ), connectionName );
1557 QgsVectorTileProviderConnection::settingsHeaders->setValue( httpHeader.headers(), connectionName );
1559 child = child.nextSiblingElement();
1565 listConnections->selectAll();
1566 buttonBox->button( QDialogButtonBox::Ok )->setEnabled( !listConnections->selectedItems().isEmpty() );
1571 listConnections->clearSelection();
1572 buttonBox->button( QDialogButtonBox::Ok )->setEnabled(
false );
static const QgsSettingsEntryString * settingsUsername
static const QgsSettingsEntryString * settingsUrl
static const QgsSettingsEntryString * settingsPassword
static const QgsSettingsEntryVariantMap * settingsHeaders
static QgsSettingsTreeNamedListNode * sTreeConnectionArcgis
static const QgsSettingsEntryString * settingsAuthcfg
QgsManageConnectionsDialog(QWidget *parent=nullptr, Mode mode=Export, Type type=WMS, const QString &fileName=QString())
Constructor for QgsManageConnectionsDialog.
static const QgsSettingsEntryBool * settingsPagingEnabled
static const QgsSettingsEntryString * settingsMaxNumFeatures
static QgsSettingsTreeNamedListNode * sTreeOwsConnections
static const QgsSettingsEntryBool * settingsIgnoreGetFeatureInfoURI
static const QgsSettingsEntryString * settingsPassword
static const QgsSettingsEntryEnumFlag< Qgis::DpiMode > * settingsDpiMode
static const QgsSettingsEntryBool * settingsIgnoreAxisOrientation
static const QgsSettingsEntryBool * settingsInvertAxisOrientation
static const QgsSettingsEntryString * settingsVersion
static const QgsSettingsEntryString * settingsPagesize
static const QgsSettingsEntryVariantMap * settingsHeaders
static const QgsSettingsEntryString * settingsUsername
static const QgsSettingsEntryBool * settingsSmoothPixmapTransform
static const QgsSettingsEntryString * settingsUrl
static const QgsSettingsEntryBool * settingsIgnoreGetMapURI
T value(const QString &dynamicKeyPart=QString()) const
Returns settings value.
bool setValue(const T &value, const QString &dynamicKeyPart=QString()) const
Set settings value.
QStringList items(const QStringList &parentsNamedItems=QStringList()) const SIP_THROW(QgsSettingsException)
Returns the list of items.
This class is a composition of two QSettings instances:
QStringList childGroups(Qgis::SettingsOrigin origin=Qgis::SettingsOrigin::Any) const
Returns a list of all key top-level groups that contain keys that can be read using the QSettings obj...
void endGroup()
Resets the group to what it was before the corresponding beginGroup() call.
QVariant value(const QString &key, const QVariant &defaultValue=QVariant(), Section section=NoSection) const
Returns the value for setting key.
void beginGroup(const QString &prefix, QgsSettings::Section section=QgsSettings::NoSection)
Appends prefix to the current group.
void setValue(const QString &key, const QVariant &value, QgsSettings::Section section=QgsSettings::NoSection)
Sets the value of setting key to value.
static QgsSettingsTreeNamedListNode * sTreeXyzConnections
static const QgsSettingsEntryString * settingsPassword
static const QgsSettingsEntryDouble * settingsTilePixelRatio
static const QgsSettingsEntryString * settingsUsername
static const QgsSettingsEntryString * settingsAuthcfg
static const QgsSettingsEntryInteger * settingsZmin
static const QgsSettingsEntryInteger * settingsZmax
static const QgsSettingsEntryString * settingsUrl
static const QgsSettingsEntryVariantMap * settingsHeaders