QGIS API Documentation 3.34.0-Prizren (ffbdd678812)
Loading...
Searching...
No Matches
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 const QStringList detailParameters { mServiceName.toLower(), connectionName };
101 txtUrl->setText( QgsOwsConnection::settingsUrl->value( detailParameters ) );
102 mHttpHeaders->setHeaders( QgsHttpHeaders( QgsOwsConnection::settingsHeaders->value( detailParameters ) ) );
103
105
106 // Authentication
107 mAuthSettings->setUsername( QgsOwsConnection::settingsUsername->value( detailParameters ) );
108 mAuthSettings->setPassword( QgsOwsConnection::settingsPassword->value( detailParameters ) );
109 mAuthSettings->setConfigId( QgsOwsConnection::settingsAuthCfg->value( detailParameters ) );
110 }
111 mWfsVersionDetectButton->setDisabled( txtUrl->text().isEmpty() );
112
113 if ( !( mTypes & ConnectionWms ) && !( mTypes & ConnectionWcs ) )
114 {
115 mWmsOptionsGroupBox->setVisible( false );
116 mGroupBox->layout()->removeWidget( mWmsOptionsGroupBox );
117 }
118 if ( !( mTypes & ConnectionWfs ) )
119 {
120 mWfsOptionsGroupBox->setVisible( false );
121 mGroupBox->layout()->removeWidget( mWfsOptionsGroupBox );
122 }
123 else
124 {
125 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)" ) );
126 }
127
128 if ( mTypes & ConnectionWcs )
129 {
130 cbxIgnoreGetMapURI->setText( tr( "Ignore GetCoverage URI reported in capabilities" ) );
131 cbxWmsIgnoreAxisOrientation->setText( tr( "Ignore axis orientation" ) );
132 if ( !( mTypes & ConnectionWms ) )
133 {
134 mWmsOptionsGroupBox->setTitle( tr( "WCS Options" ) );
135
136 cbxIgnoreGetFeatureInfoURI->setVisible( false );
137 mGroupBox->layout()->removeWidget( cbxIgnoreGetFeatureInfoURI );
138
139 cmbDpiMode->setVisible( false );
140 mGroupBox->layout()->removeWidget( cmbDpiMode );
141 lblDpiMode->setVisible( false );
142 mGroupBox->layout()->removeWidget( lblDpiMode );
143 cmbTilePixelRatio->setVisible( false );
144 mGroupBox->layout()->removeWidget( cmbTilePixelRatio );
145 lblTilePixelRatio->setVisible( false );
146 mGroupBox->layout()->removeWidget( lblTilePixelRatio );
147 }
148 }
149
150 if ( !( flags & FlagShowTestConnection ) )
151 {
152 mTestConnectionButton->hide();
153 mGroupBox->layout()->removeWidget( mTestConnectionButton );
154 }
155
156 if ( flags & FlagHideAuthenticationGroup )
157 {
158 mAuthGroupBox->hide();
159 mGroupBox->layout()->removeWidget( mAuthGroupBox );
160 }
161 // Adjust height
162 const int w = width();
163 adjustSize();
164 resize( w, height() );
165
166 connect( txtName, &QLineEdit::textChanged, this, &QgsNewHttpConnection::nameChanged );
167 connect( txtUrl, &QLineEdit::textChanged, this, &QgsNewHttpConnection::urlChanged );
168
169 buttonBox->button( QDialogButtonBox::Ok )->setDisabled( true );
170 connect( txtName, &QLineEdit::textChanged, this, &QgsNewHttpConnection::updateOkButtonState );
171 connect( txtUrl, &QLineEdit::textChanged, this, &QgsNewHttpConnection::updateOkButtonState );
172
173 nameChanged( connectionName );
174}
175
176void QgsNewHttpConnection::wfsVersionCurrentIndexChanged( int index )
177{
178 // For now 2019-06-06, leave paging checkable for some WFS version 1.1 servers with support
179 cbxWfsFeaturePaging->setEnabled( index == WFS_VERSION_MAX || index >= WFS_VERSION_2_0 );
180 lblPageSize->setEnabled( cbxWfsFeaturePaging->isChecked() && ( index == WFS_VERSION_MAX || index >= WFS_VERSION_1_1 ) );
181 txtPageSize->setEnabled( cbxWfsFeaturePaging->isChecked() && ( index == WFS_VERSION_MAX || index >= WFS_VERSION_1_1 ) );
182 cbxWfsIgnoreAxisOrientation->setEnabled( index != WFS_VERSION_1_0 && index != WFS_VERSION_API_FEATURES_1_0 );
183 cbxWfsInvertAxisOrientation->setEnabled( index != WFS_VERSION_API_FEATURES_1_0 );
184 wfsUseGml2EncodingForTransactions()->setEnabled( index == WFS_VERSION_1_1 );
185}
186
187void QgsNewHttpConnection::wfsFeaturePagingStateChanged( int state )
188{
189 lblPageSize->setEnabled( state == Qt::Checked );
190 txtPageSize->setEnabled( state == Qt::Checked );
191}
192
194{
195 return txtName->text();
196}
197
199{
200 return txtUrl->text();
201}
202
203void QgsNewHttpConnection::nameChanged( const QString &text )
204{
205 Q_UNUSED( text )
206 buttonBox->button( QDialogButtonBox::Ok )->setDisabled( txtName->text().isEmpty() || txtUrl->text().isEmpty() );
207}
208
209void QgsNewHttpConnection::urlChanged( const QString &text )
210{
211 Q_UNUSED( text )
212 buttonBox->button( QDialogButtonBox::Ok )->setDisabled( txtName->text().isEmpty() || txtUrl->text().isEmpty() );
213 mWfsVersionDetectButton->setDisabled( txtUrl->text().isEmpty() );
214}
215
216void QgsNewHttpConnection::updateOkButtonState()
217{
218 const bool enabled = !txtName->text().isEmpty() && !txtUrl->text().isEmpty();
219 buttonBox->button( QDialogButtonBox::Ok )->setEnabled( enabled );
220}
221
223{
224 const QString newConnectionName = txtName->text();
225
226 bool urlExists = QgsOwsConnection::settingsUrl->exists( {mServiceName.toLower(), newConnectionName} );
227
228 // warn if entry was renamed to an existing connection
229 if ( ( mOriginalConnName.isNull() || mOriginalConnName.compare( newConnectionName, Qt::CaseInsensitive ) != 0 ) &&
230 urlExists &&
231 QMessageBox::question( this,
232 tr( "Save Connection" ),
233 tr( "Should the existing connection %1 be overwritten?" ).arg( txtName->text() ),
234 QMessageBox::Ok | QMessageBox::Cancel ) == QMessageBox::Cancel )
235 {
236 return false;
237 }
238
239 if ( ! mAuthSettings->password().isEmpty() &&
240 QMessageBox::question( this,
241 tr( "Saving Passwords" ),
242 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." ),
243 QMessageBox::Ok | QMessageBox::Cancel ) == QMessageBox::Cancel )
244 {
245 return false;
246 }
247
248 return true;
249}
250
252{
253 return mTestConnectionButton;
254}
255
260
262{
263 return mWfsVersionDetectButton;
264}
265
267{
268 return cmbVersion;
269}
270
272{
273 return cbxWfsFeaturePaging;
274}
275
277{
278 return cbxWfsUseGml2EncodingForTransactions;
279}
280
282{
283 return txtPageSize;
284}
285
286QString QgsNewHttpConnection::wfsSettingsKey( const QString &base, const QString &connectionName ) const
287{
288 return base + connectionName;
289}
290
291QString QgsNewHttpConnection::wmsSettingsKey( const QString &base, const QString &connectionName ) const
292{
293 return base + connectionName;
294}
295
297{
298 QStringList detailsParameters = { mServiceName.toLower(), mOriginalConnName };
299
300 cbxIgnoreGetMapURI->setChecked( QgsOwsConnection::settingsIgnoreGetMapURI->value( detailsParameters ) );
301 cbxWmsIgnoreReportedLayerExtents->setChecked( QgsOwsConnection::settingsReportedLayerExtents->value( detailsParameters ) );
302 cbxWfsIgnoreAxisOrientation->setChecked( QgsOwsConnection::settingsIgnoreAxisOrientation->value( detailsParameters ) );
303 cbxWfsInvertAxisOrientation->setChecked( QgsOwsConnection::settingsInvertAxisOrientation->value( detailsParameters ) );
304 cbxWfsUseGml2EncodingForTransactions->setChecked( QgsOwsConnection::settingsPreferCoordinatesForWfsT11->value( detailsParameters ) );
305
306 cbxWmsIgnoreAxisOrientation->setChecked( QgsOwsConnection::settingsIgnoreAxisOrientation->value( detailsParameters ) );
307 cbxWmsInvertAxisOrientation->setChecked( QgsOwsConnection::settingsInvertAxisOrientation->value( detailsParameters ) );
308 cbxIgnoreGetFeatureInfoURI->setChecked( QgsOwsConnection::settingsIgnoreGetFeatureInfoURI->value( detailsParameters ) );
309 cbxSmoothPixmapTransform->setChecked( QgsOwsConnection::settingsSmoothPixmapTransform->value( detailsParameters ) );
310
311 Qgis::DpiMode dpiMode = QgsOwsConnection::settingsDpiMode->value( detailsParameters );
312 cmbDpiMode->setCurrentIndex( cmbDpiMode->findData( static_cast<int>( dpiMode ) ) );
313 Qgis::TilePixelRatio tilePixelRatio = QgsOwsConnection::settingsTilePixelRatio->value( detailsParameters );
314 cmbTilePixelRatio->setCurrentIndex( cmbTilePixelRatio->findData( static_cast<int>( tilePixelRatio ) ) );
315
316 const QString version = QgsOwsConnection::settingsVersion->value( detailsParameters );
317 int versionIdx = WFS_VERSION_MAX; // AUTO
318 if ( version == QLatin1String( "1.0.0" ) )
319 versionIdx = WFS_VERSION_1_0;
320 else if ( version == QLatin1String( "1.1.0" ) )
321 versionIdx = WFS_VERSION_1_1;
322 else if ( version == QLatin1String( "2.0.0" ) )
323 versionIdx = WFS_VERSION_2_0;
324 else if ( version == QLatin1String( "OGC_API_FEATURES" ) )
325 versionIdx = WFS_VERSION_API_FEATURES_1_0;
326 cmbVersion->setCurrentIndex( versionIdx );
327
328 // Enable/disable these items per WFS versions
329 wfsVersionCurrentIndexChanged( versionIdx );
330
331 mHttpHeaders->setHeaders( QgsHttpHeaders( QgsOwsConnection::settingsHeaders->value( {mServiceName.toLower(), mOriginalConnName} ) ) );
332
333 txtMaxNumFeatures->setText( QgsOwsConnection::settingsMaxNumFeatures->value( detailsParameters ) );
334
335 // Only default to paging enabled if WFS 2.0.0 or higher
336 const bool pagingEnabled = QgsOwsConnection::settingsPagingEnabled->valueWithDefaultOverride( versionIdx == WFS_VERSION_MAX || versionIdx >= WFS_VERSION_2_0, detailsParameters );
337 txtPageSize->setText( QgsOwsConnection::settingsPagesize->value( detailsParameters ) );
338 cbxWfsFeaturePaging->setChecked( pagingEnabled );
339}
340
342{
343 QUrl url( txtUrl->text().trimmed() );
344 QUrlQuery query( url );
345 const QList<QPair<QString, QString> > items = query.queryItems( QUrl::FullyEncoded );
346 QHash< QString, QPair<QString, QString> > params;
347 for ( const QPair<QString, QString> &it : items )
348 {
349 params.insert( it.first.toUpper(), it );
350 }
351
352 if ( params[QStringLiteral( "SERVICE" )].second.toUpper() == "WMS" ||
353 params[QStringLiteral( "SERVICE" )].second.toUpper() == "WFS" ||
354 params[QStringLiteral( "SERVICE" )].second.toUpper() == "WCS" )
355 {
356 query.removeQueryItem( params.value( QStringLiteral( "SERVICE" ) ).first );
357 query.removeQueryItem( params.value( QStringLiteral( "REQUEST" ) ).first );
358 query.removeQueryItem( params.value( QStringLiteral( "FORMAT" ) ).first );
359 }
360
361 url.setQuery( query );
362
363 if ( url.path( QUrl::FullyEncoded ).isEmpty() )
364 {
365 url.setPath( fromEncodedComponent_helper( "/" ) );
366 }
367 return url;
368}
369
371{
372 const QString newConnectionName = txtName->text();
373
374 if ( !validate() )
375 return;
376
377 QgsSettings settings;
378
379 // on rename delete original entry first
380 if ( !mOriginalConnName.isNull() && mOriginalConnName != newConnectionName )
381 {
382 QgsOwsConnection::sTreeOwsConnections->deleteItem( mOriginalConnName, {mServiceName.toLower()} );
383 settings.sync();
384 }
385
386 QStringList detailsParameters = {mServiceName.toLower(), newConnectionName};
387
388 const QUrl url( urlTrimmed() );
389 QgsOwsConnection::settingsUrl->setValue( url.toString(), detailsParameters );
390
391 if ( mTypes & ConnectionWfs )
392 {
393 QgsOwsConnection::settingsIgnoreAxisOrientation->setValue( cbxWfsIgnoreAxisOrientation->isChecked(), detailsParameters );
394 QgsOwsConnection::settingsInvertAxisOrientation->setValue( cbxWfsInvertAxisOrientation->isChecked(), detailsParameters );
395 QgsOwsConnection::settingsPreferCoordinatesForWfsT11->setValue( cbxWfsUseGml2EncodingForTransactions->isChecked(), detailsParameters );
396 }
397 if ( mTypes & ConnectionWms || mTypes & ConnectionWcs )
398 {
399 QgsOwsConnection::settingsIgnoreAxisOrientation->setValue( cbxWmsIgnoreAxisOrientation->isChecked(), detailsParameters );
400 QgsOwsConnection::settingsInvertAxisOrientation->setValue( cbxWmsInvertAxisOrientation->isChecked(), detailsParameters );
401
402 QgsOwsConnection::settingsReportedLayerExtents->setValue( cbxWmsIgnoreReportedLayerExtents->isChecked(), detailsParameters );
403 QgsOwsConnection::settingsIgnoreGetMapURI->setValue( cbxIgnoreGetMapURI->isChecked(), detailsParameters );
404 QgsOwsConnection::settingsSmoothPixmapTransform->setValue( cbxSmoothPixmapTransform->isChecked(), detailsParameters );
405
406 Qgis::DpiMode dpiMode = cmbDpiMode->currentData().value<Qgis::DpiMode>();
407 QgsOwsConnection::settingsDpiMode->setValue( dpiMode, detailsParameters );
408 Qgis::TilePixelRatio tilePixelRatio = cmbTilePixelRatio->currentData().value<Qgis::TilePixelRatio>();
409 QgsOwsConnection::settingsTilePixelRatio->setValue( tilePixelRatio, detailsParameters );
410
411 QgsOwsConnection::settingsHeaders->setValue( mHttpHeaders->httpHeaders().headers(), detailsParameters );
412 }
413 if ( mTypes & ConnectionWms )
414 {
415 QgsOwsConnection::settingsIgnoreGetFeatureInfoURI->setValue( cbxIgnoreGetFeatureInfoURI->isChecked(), detailsParameters );
416 }
417 if ( mTypes & ConnectionWfs )
418 {
419 QString version = QStringLiteral( "auto" );
420 switch ( cmbVersion->currentIndex() )
421 {
422 case WFS_VERSION_MAX:
423 version = QStringLiteral( "auto" );
424 break;
425 case WFS_VERSION_1_0:
426 version = QStringLiteral( "1.0.0" );
427 break;
428 case WFS_VERSION_1_1:
429 version = QStringLiteral( "1.1.0" );
430 break;
431 case WFS_VERSION_2_0:
432 version = QStringLiteral( "2.0.0" );
433 break;
435 version = QStringLiteral( "OGC_API_FEATURES" );
436 break;
437 }
438 QgsOwsConnection::settingsVersion->setValue( version, detailsParameters );
439 QgsOwsConnection::settingsMaxNumFeatures->setValue( txtMaxNumFeatures->text(), detailsParameters );
440 QgsOwsConnection::settingsPagesize->setValue( txtPageSize->text(), detailsParameters );
441 QgsOwsConnection::settingsPagingEnabled->setValue( cbxWfsFeaturePaging->isChecked(), detailsParameters );
442 }
443
444 QStringList credentialsParameters = {mServiceName.toLower(), newConnectionName};
445 QgsOwsConnection::settingsUsername->setValue( mAuthSettings->username(), credentialsParameters );
446 QgsOwsConnection::settingsPassword->setValue( mAuthSettings->password(), credentialsParameters );
447 QgsOwsConnection::settingsAuthCfg->setValue( mAuthSettings->configId(), credentialsParameters );
448
449 if ( mHttpHeaders->isVisible() )
450 QgsOwsConnection::settingsHeaders->setValue( mHttpHeaders->httpHeaders().headers(), credentialsParameters );
451
452 QgsOwsConnection::sTreeOwsConnections->setSelectedItem( newConnectionName, {mServiceName.toLower()} );
453
454 QDialog::accept();
455}
456
457void QgsNewHttpConnection::showHelp()
458{
459 QgsHelp::openHelp( QStringLiteral( "working_with_ogc/index.html" ) );
460}
TilePixelRatio
DpiMode enum.
Definition qgis.h:2476
@ Undefined
Undefined (not scale)
@ HighDpi
High (192 DPI)
@ StandardDpi
Standard (96 DPI)
DpiMode
DpiMode enum.
Definition qgis.h:2462
@ 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:194
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 ...
QgsNewHttpConnection(QWidget *parent=nullptr, QgsNewHttpConnection::ConnectionTypes types=ConnectionWms, const QString &serviceName="WMS", const QString &connectionName=QString(), QgsNewHttpConnection::Flags flags=QgsNewHttpConnection::Flags(), Qt::WindowFlags fl=QgsGuiUtils::ModalDialogFlags)
Constructor for QgsNewHttpConnection.
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.
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
T valueWithDefaultOverride(const T &defaultValueOverride, const QString &dynamicKeyPart=QString()) const
Returns the settings value with a defaultValueOverride and with an optional dynamicKeyPart.
T value(const QString &dynamicKeyPart=QString()) const
Returns settings value.
bool setValue(const T &value, const QString &dynamicKeyPart=QString()) const
Set settings value.
bool exists(const QString &dynamicKeyPart=QString()) const
Returns true if the settings is contained in the underlying QSettings.
void deleteItem(const QString &item, const QStringList &parentsNamedItems=QStringList())
Deletes a named item from the named list node.
void setSelectedItem(const QString &item, const QStringList &parentsNamedItems=QStringList())
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)