QGIS API Documentation 3.30.0-'s-Hertogenbosch (f186b8efe0)
qgsnewhttpconnection.cpp
Go to the documentation of this file.
1/***************************************************************************
2 qgsnewhttpconnection.cpp - selector for a new HTTP server for WMS, etc.
3 -------------------
4 begin : 3 April 2005
5 copyright : (C) 2005 by Brendan Morley
6 email : morb at ozemail dot com dot au
7 ***************************************************************************/
8
9/***************************************************************************
10 * *
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
15 * *
16 ***************************************************************************/
19#include "qgssettings.h"
20#include "qgshelp.h"
21#include "qgsgui.h"
23#include "qgsowsconnection.h"
26
27#include <QMessageBox>
28#include <QUrl>
29#include <QPushButton>
30#include <QRegularExpression>
31#include <QRegularExpressionValidator>
32#include <QUrlQuery>
33
34QgsNewHttpConnection::QgsNewHttpConnection( QWidget *parent, ConnectionTypes types, const QString &serviceName, const QString &connectionName, QgsNewHttpConnection::Flags flags, Qt::WindowFlags fl )
35 : QDialog( parent, fl )
36 , mTypes( types )
37 , mServiceName( serviceName )
38 , mOriginalConnName( connectionName )
39{
40 setupUi( this );
41
42 // compatibility fix with former API (pre 3.26) when serviceName was a setting key instead
43 if ( mServiceName.startsWith( QLatin1String( "qgis/" ) ) )
44 {
45 // It would be obviously much better to use mBaseKey also for credentials,
46 // but for some strange reason a different hardcoded key was used instead.
47 // WFS and WMS credentials were mixed with the same key WMS.
48 // Only WMS and WFS providers are using QgsNewHttpConnection at this moment
49 // using connection-wms and connection-wfs -> parse credential key from it.
50 mServiceName = mServiceName.split( '-' ).last().toUpper();
51 }
52
53 if ( !( flags & FlagShowHttpSettings ) )
54 mHttpHeaders->hide();
55
57
58 connect( buttonBox, &QDialogButtonBox::helpRequested, this, &QgsNewHttpConnection::showHelp );
59
60 QString connectionType = mServiceName;
61 if ( mServiceName == QLatin1String( "WMS" ) )
62 {
63 connectionType = QStringLiteral( "WMS/WMTS" );
64 }
65 setWindowTitle( tr( "Create a New %1 Connection" ).arg( connectionType ) );
66
67 txtName->setValidator( new QRegularExpressionValidator( QRegularExpression( "[^\\/]+" ), txtName ) );
68
69 cmbDpiMode->clear();
70 cmbDpiMode->addItem( tr( "all" ), static_cast<int>( Qgis::DpiMode::All ) );
71 cmbDpiMode->addItem( tr( "off" ), static_cast<int>( Qgis::DpiMode::Off ) );
72 cmbDpiMode->addItem( tr( "QGIS" ), static_cast<int>( Qgis::DpiMode::QGIS ) );
73 cmbDpiMode->addItem( tr( "UMN" ), static_cast<int>( Qgis::DpiMode::UMN ) );
74 cmbDpiMode->addItem( tr( "GeoServer" ), static_cast<int>( Qgis::DpiMode::GeoServer ) );
75
76 cmbTilePixelRatio->clear();
77 cmbTilePixelRatio->addItem( tr( "Undefined (not scaled)" ), static_cast<int>( Qgis::TilePixelRatio::Undefined ) );
78 cmbTilePixelRatio->addItem( tr( "Standard (96 DPI)" ), static_cast<int>( Qgis::TilePixelRatio::StandardDpi ) );
79 cmbTilePixelRatio->addItem( tr( "High (192 DPI)" ), static_cast<int>( Qgis::TilePixelRatio::HighDpi ) );
80
81 cmbVersion->clear();
82 cmbVersion->addItem( tr( "Maximum" ) );
83 cmbVersion->addItem( tr( "1.0" ) );
84 cmbVersion->addItem( tr( "1.1" ) );
85 cmbVersion->addItem( tr( "2.0" ) );
86 cmbVersion->addItem( tr( "OGC API - Features" ) );
87 connect( cmbVersion,
88 static_cast<void ( QComboBox::* )( int )>( &QComboBox::currentIndexChanged ),
89 this, &QgsNewHttpConnection::wfsVersionCurrentIndexChanged );
90
91 connect( cbxWfsFeaturePaging, &QCheckBox::stateChanged,
92 this, &QgsNewHttpConnection::wfsFeaturePagingStateChanged );
93
94 if ( !connectionName.isEmpty() )
95 {
96 // populate the dialog with the information stored for the connection
97 // populate the fields with the stored setting parameters
98
99 txtName->setText( connectionName );
100 txtUrl->setText( QgsOwsConnection::settingsUrl->value( {mServiceName.toLower(), connectionName} ) );
101 mHttpHeaders->setHeaders( QgsHttpHeaders( QgsOwsConnection::settingsHeaders->value( {mServiceName.toLower(), connectionName} ) ) );
102
104
105 // Authentication
106 mAuthSettings->setUsername( QgsOwsConnection::settingsUsername->value( {mServiceName, connectionName} ) );
107 mAuthSettings->setPassword( QgsOwsConnection::settingsPassword->value( {mServiceName, connectionName} ) );
108 mAuthSettings->setConfigId( QgsOwsConnection::settingsAuthCfg->value( {mServiceName, connectionName} ) );
109 }
110 mWfsVersionDetectButton->setDisabled( txtUrl->text().isEmpty() );
111
112 if ( !( mTypes & ConnectionWms ) && !( mTypes & ConnectionWcs ) )
113 {
114 mWmsOptionsGroupBox->setVisible( false );
115 mGroupBox->layout()->removeWidget( mWmsOptionsGroupBox );
116 }
117 if ( !( mTypes & ConnectionWfs ) )
118 {
119 mWfsOptionsGroupBox->setVisible( false );
120 mGroupBox->layout()->removeWidget( mWfsOptionsGroupBox );
121 }
122 else
123 {
124 txtUrl->setToolTip( tr( "HTTP address of the WFS service, or landing page of a OGC API service<br>(an ending slash might be needed for some OGC API servers)" ) );
125 }
126
127 if ( mTypes & ConnectionWcs )
128 {
129 cbxIgnoreGetMapURI->setText( tr( "Ignore GetCoverage URI reported in capabilities" ) );
130 cbxWmsIgnoreAxisOrientation->setText( tr( "Ignore axis orientation" ) );
131 if ( !( mTypes & ConnectionWms ) )
132 {
133 mWmsOptionsGroupBox->setTitle( tr( "WCS Options" ) );
134
135 cbxIgnoreGetFeatureInfoURI->setVisible( false );
136 mGroupBox->layout()->removeWidget( cbxIgnoreGetFeatureInfoURI );
137
138 cmbDpiMode->setVisible( false );
139 mGroupBox->layout()->removeWidget( cmbDpiMode );
140 lblDpiMode->setVisible( false );
141 mGroupBox->layout()->removeWidget( lblDpiMode );
142 cmbTilePixelRatio->setVisible( false );
143 mGroupBox->layout()->removeWidget( cmbTilePixelRatio );
144 lblTilePixelRatio->setVisible( false );
145 mGroupBox->layout()->removeWidget( lblTilePixelRatio );
146 }
147 }
148
149 if ( !( flags & FlagShowTestConnection ) )
150 {
151 mTestConnectionButton->hide();
152 mGroupBox->layout()->removeWidget( mTestConnectionButton );
153 }
154
155 if ( flags & FlagHideAuthenticationGroup )
156 {
157 mAuthGroupBox->hide();
158 mGroupBox->layout()->removeWidget( mAuthGroupBox );
159 }
160 // Adjust height
161 const int w = width();
162 adjustSize();
163 resize( w, height() );
164
165 connect( txtName, &QLineEdit::textChanged, this, &QgsNewHttpConnection::nameChanged );
166 connect( txtUrl, &QLineEdit::textChanged, this, &QgsNewHttpConnection::urlChanged );
167
168 buttonBox->button( QDialogButtonBox::Ok )->setDisabled( true );
169 connect( txtName, &QLineEdit::textChanged, this, &QgsNewHttpConnection::updateOkButtonState );
170 connect( txtUrl, &QLineEdit::textChanged, this, &QgsNewHttpConnection::updateOkButtonState );
171
172 nameChanged( connectionName );
173}
174
175void QgsNewHttpConnection::wfsVersionCurrentIndexChanged( int index )
176{
177 // For now 2019-06-06, leave paging checkable for some WFS version 1.1 servers with support
178 cbxWfsFeaturePaging->setEnabled( index == WFS_VERSION_MAX || index >= WFS_VERSION_2_0 );
179 lblPageSize->setEnabled( cbxWfsFeaturePaging->isChecked() && ( index == WFS_VERSION_MAX || index >= WFS_VERSION_1_1 ) );
180 txtPageSize->setEnabled( cbxWfsFeaturePaging->isChecked() && ( index == WFS_VERSION_MAX || index >= WFS_VERSION_1_1 ) );
181 cbxWfsIgnoreAxisOrientation->setEnabled( index != WFS_VERSION_1_0 && index != WFS_VERSION_API_FEATURES_1_0 );
182 cbxWfsInvertAxisOrientation->setEnabled( index != WFS_VERSION_API_FEATURES_1_0 );
183 wfsUseGml2EncodingForTransactions()->setEnabled( index == WFS_VERSION_1_1 );
184}
185
186void QgsNewHttpConnection::wfsFeaturePagingStateChanged( int state )
187{
188 lblPageSize->setEnabled( state == Qt::Checked );
189 txtPageSize->setEnabled( state == Qt::Checked );
190}
191
193{
194 return txtName->text();
195}
196
198{
199 return txtUrl->text();
200}
201
202void QgsNewHttpConnection::nameChanged( const QString &text )
203{
204 Q_UNUSED( text )
205 buttonBox->button( QDialogButtonBox::Ok )->setDisabled( txtName->text().isEmpty() || txtUrl->text().isEmpty() );
206}
207
208void QgsNewHttpConnection::urlChanged( const QString &text )
209{
210 Q_UNUSED( text )
211 buttonBox->button( QDialogButtonBox::Ok )->setDisabled( txtName->text().isEmpty() || txtUrl->text().isEmpty() );
212 mWfsVersionDetectButton->setDisabled( txtUrl->text().isEmpty() );
213}
214
215void QgsNewHttpConnection::updateOkButtonState()
216{
217 const bool enabled = !txtName->text().isEmpty() && !txtUrl->text().isEmpty();
218 buttonBox->button( QDialogButtonBox::Ok )->setEnabled( enabled );
219}
220
222{
223 const QString newConnectionName = txtName->text();
224
225 bool urlExists = QgsOwsConnection::settingsUrl->exists( {mServiceName.toLower(), newConnectionName} );
226
227 // warn if entry was renamed to an existing connection
228 if ( ( mOriginalConnName.isNull() || mOriginalConnName.compare( newConnectionName, Qt::CaseInsensitive ) != 0 ) &&
229 urlExists &&
230 QMessageBox::question( this,
231 tr( "Save Connection" ),
232 tr( "Should the existing connection %1 be overwritten?" ).arg( txtName->text() ),
233 QMessageBox::Ok | QMessageBox::Cancel ) == QMessageBox::Cancel )
234 {
235 return false;
236 }
237
238 if ( ! mAuthSettings->password().isEmpty() &&
239 QMessageBox::question( this,
240 tr( "Saving Passwords" ),
241 tr( "WARNING: You have entered a password. It will be stored in unsecured plain text in your project files and your home directory (Unix-like OS) or user profile (Windows). If you want to avoid this, press Cancel and either:\n\na) Don't provide a password in the connection settings — it will be requested interactively when needed;\nb) Use the Configuration tab to add your credentials in an HTTP Basic Authentication method and store them in an encrypted database." ),
242 QMessageBox::Ok | QMessageBox::Cancel ) == QMessageBox::Cancel )
243 {
244 return false;
245 }
246
247 return true;
248}
249
251{
252 return mTestConnectionButton;
253}
254
256{
257 return mAuthSettings;
258}
259
261{
262 return mWfsVersionDetectButton;
263}
264
266{
267 return cmbVersion;
268}
269
271{
272 return cbxWfsFeaturePaging;
273}
274
276{
277 return cbxWfsUseGml2EncodingForTransactions;
278}
279
281{
282 return txtPageSize;
283}
284
285QString QgsNewHttpConnection::wfsSettingsKey( const QString &base, const QString &connectionName ) const
286{
287 return base + connectionName;
288}
289
290QString QgsNewHttpConnection::wmsSettingsKey( const QString &base, const QString &connectionName ) const
291{
292 return base + connectionName;
293}
294
296{
297 QStringList detailsParameters = { mServiceName.toLower(), mOriginalConnName };
298
299 cbxIgnoreGetMapURI->setChecked( QgsOwsConnection::settingsIgnoreGetMapURI->value( detailsParameters ) );
300 cbxWmsIgnoreReportedLayerExtents->setChecked( QgsOwsConnection::settingsReportedLayerExtents->value( detailsParameters ) );
301 cbxWfsIgnoreAxisOrientation->setChecked( QgsOwsConnection::settingsIgnoreAxisOrientation->value( detailsParameters ) );
302 cbxWfsInvertAxisOrientation->setChecked( QgsOwsConnection::settingsInvertAxisOrientation->value( detailsParameters ) );
303 cbxWfsUseGml2EncodingForTransactions->setChecked( QgsOwsConnection::settingsPreferCoordinatesForWfsT11->value( detailsParameters ) );
304
305 cbxWmsIgnoreAxisOrientation->setChecked( QgsOwsConnection::settingsIgnoreAxisOrientation->value( detailsParameters ) );
306 cbxWmsInvertAxisOrientation->setChecked( QgsOwsConnection::settingsInvertAxisOrientation->value( detailsParameters ) );
307 cbxIgnoreGetFeatureInfoURI->setChecked( QgsOwsConnection::settingsIgnoreGetFeatureInfoURI->value( detailsParameters ) );
308 cbxSmoothPixmapTransform->setChecked( QgsOwsConnection::settingsSmoothPixmapTransform->value( detailsParameters ) );
309
310 Qgis::DpiMode dpiMode = QgsOwsConnection::settingsDpiMode->value( detailsParameters );
311 cmbDpiMode->setCurrentIndex( cmbDpiMode->findData( static_cast<int>( dpiMode ) ) );
312 Qgis::TilePixelRatio tilePixelRatio = QgsOwsConnection::settingsTilePixelRatio->value( detailsParameters );
313 cmbTilePixelRatio->setCurrentIndex( cmbTilePixelRatio->findData( static_cast<int>( tilePixelRatio ) ) );
314
315 const QString version = QgsOwsConnection::settingsVersion->value( detailsParameters );
316 int versionIdx = WFS_VERSION_MAX; // AUTO
317 if ( version == QLatin1String( "1.0.0" ) )
318 versionIdx = WFS_VERSION_1_0;
319 else if ( version == QLatin1String( "1.1.0" ) )
320 versionIdx = WFS_VERSION_1_1;
321 else if ( version == QLatin1String( "2.0.0" ) )
322 versionIdx = WFS_VERSION_2_0;
323 else if ( version == QLatin1String( "OGC_API_FEATURES" ) )
324 versionIdx = WFS_VERSION_API_FEATURES_1_0;
325 cmbVersion->setCurrentIndex( versionIdx );
326
327 // Enable/disable these items per WFS versions
328 wfsVersionCurrentIndexChanged( versionIdx );
329
330 mHttpHeaders->setHeaders( QgsHttpHeaders( QgsOwsConnection::settingsHeaders->value( {mServiceName.toLower(), mOriginalConnName} ) ) );
331
332 txtMaxNumFeatures->setText( QgsOwsConnection::settingsMaxNumFeatures->value( detailsParameters ) );
333
334 // Only default to paging enabled if WFS 2.0.0 or higher
335 const bool pagingEnabled = QgsOwsConnection::settingsPagingEnabled->valueWithDefaultOverride( versionIdx == WFS_VERSION_MAX || versionIdx >= WFS_VERSION_2_0, detailsParameters );
336 txtPageSize->setText( QgsOwsConnection::settingsPagesize->value( detailsParameters ) );
337 cbxWfsFeaturePaging->setChecked( pagingEnabled );
338}
339
341{
342 QUrl url( txtUrl->text().trimmed() );
343 QUrlQuery query( url );
344 const QList<QPair<QString, QString> > items = query.queryItems( QUrl::FullyEncoded );
345 QHash< QString, QPair<QString, QString> > params;
346 for ( const QPair<QString, QString> &it : items )
347 {
348 params.insert( it.first.toUpper(), it );
349 }
350
351 if ( params[QStringLiteral( "SERVICE" )].second.toUpper() == "WMS" ||
352 params[QStringLiteral( "SERVICE" )].second.toUpper() == "WFS" ||
353 params[QStringLiteral( "SERVICE" )].second.toUpper() == "WCS" )
354 {
355 query.removeQueryItem( params.value( QStringLiteral( "SERVICE" ) ).first );
356 query.removeQueryItem( params.value( QStringLiteral( "REQUEST" ) ).first );
357 query.removeQueryItem( params.value( QStringLiteral( "FORMAT" ) ).first );
358 }
359
360 url.setQuery( query );
361
362 if ( url.path( QUrl::FullyEncoded ).isEmpty() )
363 {
364 url.setPath( fromEncodedComponent_helper( "/" ) );
365 }
366 return url;
367}
368
370{
371 const QString newConnectionName = txtName->text();
372
373 if ( !validate() )
374 return;
375
376 QgsSettings settings;
377
378 // on rename delete original entry first
379 if ( !mOriginalConnName.isNull() && mOriginalConnName != newConnectionName )
380 {
381 QgsOwsConnection::sTreeOwsConnections->deleteItem( mOriginalConnName, {mServiceName.toLower()} );
382 settings.sync();
383 }
384
385 QStringList detailsParameters = {mServiceName.toLower(), newConnectionName};
386
387 const QUrl url( urlTrimmed() );
388 QgsOwsConnection::settingsUrl->setValue( url.toString(), detailsParameters );
389
390 if ( mTypes & ConnectionWfs )
391 {
392 QgsOwsConnection::settingsIgnoreAxisOrientation->setValue( cbxWfsIgnoreAxisOrientation->isChecked(), detailsParameters );
393 QgsOwsConnection::settingsInvertAxisOrientation->setValue( cbxWfsInvertAxisOrientation->isChecked(), detailsParameters );
394 QgsOwsConnection::settingsPreferCoordinatesForWfsT11->setValue( cbxWfsUseGml2EncodingForTransactions->isChecked(), detailsParameters );
395 }
396 if ( mTypes & ConnectionWms || mTypes & ConnectionWcs )
397 {
398 QgsOwsConnection::settingsIgnoreAxisOrientation->setValue( cbxWmsIgnoreAxisOrientation->isChecked(), detailsParameters );
399 QgsOwsConnection::settingsInvertAxisOrientation->setValue( cbxWmsInvertAxisOrientation->isChecked(), detailsParameters );
400
401 QgsOwsConnection::settingsReportedLayerExtents->setValue( cbxWmsIgnoreReportedLayerExtents->isChecked(), detailsParameters );
402 QgsOwsConnection::settingsIgnoreGetMapURI->setValue( cbxIgnoreGetMapURI->isChecked(), detailsParameters );
403 QgsOwsConnection::settingsSmoothPixmapTransform->setValue( cbxSmoothPixmapTransform->isChecked(), detailsParameters );
404
405 Qgis::DpiMode dpiMode = cmbDpiMode->currentData().value<Qgis::DpiMode>();
406 QgsOwsConnection::settingsDpiMode->setValue( dpiMode, detailsParameters );
407 Qgis::TilePixelRatio tilePixelRatio = cmbTilePixelRatio->currentData().value<Qgis::TilePixelRatio>();
408 QgsOwsConnection::settingsTilePixelRatio->setValue( tilePixelRatio, detailsParameters );
409
410 QgsOwsConnection::settingsHeaders->setValue( mHttpHeaders->httpHeaders().headers(), detailsParameters );
411 }
412 if ( mTypes & ConnectionWms )
413 {
414 QgsOwsConnection::settingsIgnoreGetFeatureInfoURI->setValue( cbxIgnoreGetFeatureInfoURI->isChecked(), detailsParameters );
415 }
416 if ( mTypes & ConnectionWfs )
417 {
418 QString version = QStringLiteral( "auto" );
419 switch ( cmbVersion->currentIndex() )
420 {
421 case WFS_VERSION_MAX:
422 version = QStringLiteral( "auto" );
423 break;
424 case WFS_VERSION_1_0:
425 version = QStringLiteral( "1.0.0" );
426 break;
427 case WFS_VERSION_1_1:
428 version = QStringLiteral( "1.1.0" );
429 break;
430 case WFS_VERSION_2_0:
431 version = QStringLiteral( "2.0.0" );
432 break;
434 version = QStringLiteral( "OGC_API_FEATURES" );
435 break;
436 }
437 QgsOwsConnection::settingsVersion->setValue( version, detailsParameters );
438 QgsOwsConnection::settingsMaxNumFeatures->setValue( txtMaxNumFeatures->text(), detailsParameters );
439 QgsOwsConnection::settingsPagesize->setValue( txtPageSize->text(), detailsParameters );
440 QgsOwsConnection::settingsPagingEnabled->setValue( cbxWfsFeaturePaging->isChecked(), detailsParameters );
441 }
442
443 QStringList credentialsParameters = {mServiceName, newConnectionName};
444 QgsOwsConnection::settingsUsername->setValue( mAuthSettings->username(), credentialsParameters );
445 QgsOwsConnection::settingsPassword->setValue( mAuthSettings->password(), credentialsParameters );
446 QgsOwsConnection::settingsAuthCfg->setValue( mAuthSettings->configId(), credentialsParameters );
447
448 if ( mHttpHeaders->isVisible() )
449 QgsOwsConnection::settingsHeaders->setValue( mHttpHeaders->httpHeaders().headers(), credentialsParameters );
450
451 QgsOwsConnection::sTreeOwsConnections->setSelectedItem( newConnectionName, {mServiceName.toLower()} );
452
453 QDialog::accept();
454}
455
456void QgsNewHttpConnection::showHelp()
457{
458 QgsHelp::openHelp( QStringLiteral( "working_with_ogc/index.html" ) );
459}
TilePixelRatio
DpiMode enum.
Definition: qgis.h:2133
@ Undefined
Undefined (not scale)
@ HighDpi
High (192 DPI)
@ StandardDpi
Standard (96 DPI)
DpiMode
DpiMode enum.
Definition: qgis.h:2119
@ GeoServer
GeoServer.
Widget for entering authentication credentials both in the form username/password and by using QGIS A...
static void enableAutoGeometryRestore(QWidget *widget, const QString &key=QString())
Register the widget to allow its position to be automatically saved and restored when open and closed...
Definition: qgsgui.cpp:178
static void openHelp(const QString &key)
Opens help topic for the given help key using default system web browser.
Definition: qgshelp.cpp:38
This class implements simple http header management.
QPushButton * testConnectButton()
Returns the "test connection" button.
QgsAuthSettingsWidget * authSettingsWidget()
Returns the current authentication settings widget.
QCheckBox * wfsPagingEnabledCheckBox()
Returns the "WFS paging enabled" checkbox.
virtual bool validate()
Returns true if dialog settings are valid, or false if current settings are not valid and the dialog ...
QString name() const
Returns the current connection name.
@ FlagShowHttpSettings
Display the 'http' group.
@ FlagHideAuthenticationGroup
Hide the Authentication group.
@ FlagShowTestConnection
Display the 'test connection' button.
QCheckBox * wfsUseGml2EncodingForTransactions()
Returns the "Use GML2 encoding for transactions" checkbox.
QComboBox * wfsVersionComboBox()
Returns the "WFS version" combobox.
virtual QString wmsSettingsKey(const QString &base, const QString &connectionName) const
Returns the QSettings key for WMS related settings for the connection.
virtual QString wfsSettingsKey(const QString &base, const QString &connectionName) const
Returns the QSettings key for WFS related settings for the connection.
QString url() const
Returns the current connection url.
QPushButton * wfsVersionDetectButton()
Returns the "WFS version detect" button.
QUrl urlTrimmed() const
Returns the url.
QgsNewHttpConnection(QWidget *parent=nullptr, QgsNewHttpConnection::ConnectionTypes types=ConnectionWms, const QString &serviceName SIP_PYARGRENAME(settingsKey)="WMS", const QString &connectionName=QString(), QgsNewHttpConnection::Flags flags=QgsNewHttpConnection::Flags(), Qt::WindowFlags fl=QgsGuiUtils::ModalDialogFlags)
Constructor for QgsNewHttpConnection.
QLineEdit * wfsPageSizeLineEdit()
Returns the "WFS page size" edit.
void updateServiceSpecificSettings()
Triggers a resync of the GUI widgets for the service specific settings (i.e.
@ ConnectionWms
WMS connection.
@ ConnectionWfs
WFS connection.
@ ConnectionWcs
WCS connection.
static const QgsSettingsEntryBool * settingsPreferCoordinatesForWfsT11
static const QgsSettingsEntryBool * settingsPagingEnabled
static const QgsSettingsEntryString * settingsMaxNumFeatures
static QgsSettingsTreeNamedListNode * sTreeOwsConnections
static const QgsSettingsEntryBool * settingsIgnoreGetFeatureInfoURI
static const QgsSettingsEntryString * settingsPassword
static const QgsSettingsEntryBool * settingsReportedLayerExtents
static const QgsSettingsEntryEnumFlag< Qgis::DpiMode > * settingsDpiMode
static const QgsSettingsEntryBool * settingsIgnoreAxisOrientation
static const QgsSettingsEntryBool * settingsInvertAxisOrientation
static const QgsSettingsEntryString * settingsVersion
static const QgsSettingsEntryString * settingsPagesize
static const QgsSettingsEntryString * settingsAuthCfg
static const QgsSettingsEntryEnumFlag< Qgis::TilePixelRatio > * settingsTilePixelRatio
static const QgsSettingsEntryVariantMap * settingsHeaders
static const QgsSettingsEntryString * settingsUsername
static const QgsSettingsEntryBool * settingsSmoothPixmapTransform
static const QgsSettingsEntryString * settingsUrl
static const QgsSettingsEntryBool * settingsIgnoreGetMapURI
bool exists(const QString &dynamicKeyPart=QString()) const
Returns true if the settings is contained in the underlying QSettings.
bool setValue(const T &value, const QString &dynamicKeyPart=QString()) const
Set settings value.
T value(const QString &dynamicKeyPart=QString()) const
Returns settings value.
T valueWithDefaultOverride(T defaultValueOverride, const QString &dynamicKeyPart=QString()) const
Returns the settings value with a defaultValueOverride and with an optional dynamicKeyPart.
bool setValue(T value, const QString &dynamicKeyPart=QString()) const
Set settings value.
T value(const QString &dynamicKeyPart=QString()) const
Returns settings value.
void deleteItem(const QString &item, const QStringList &parentsNamedItems=QStringList()) SIP_THROW(QgsSettingsException)
Deletes a named item from the named list node.
void setSelectedItem(const QString &item, const QStringList &parentsNamedItems=QStringList()) SIP_THROW(QgsSettingsException)
Sets the selected named item from the named list node.
This class is a composition of two QSettings instances:
Definition: qgssettings.h:63
void sync()
Writes any unsaved changes to permanent storage, and reloads any settings that have been changed in t...
QString fromEncodedComponent_helper(const QByteArray &ba)