QGIS API Documentation  3.26.3-Buenos Aires (65e4edfdad)
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  ***************************************************************************/
17 #include "qgsnewhttpconnection.h"
18 #include "qgsauthsettingswidget.h"
19 #include "qgssettings.h"
20 #include "qgshelp.h"
21 #include "qgsgui.h"
23 #include "qgsowsconnection.h"
24 
25 #include <QMessageBox>
26 #include <QUrl>
27 #include <QPushButton>
28 #include <QRegularExpression>
29 #include <QRegularExpressionValidator>
30 #include <QUrlQuery>
31 
32 QgsNewHttpConnection::QgsNewHttpConnection( QWidget *parent, ConnectionTypes types, const QString &serviceName, const QString &connectionName, QgsNewHttpConnection::Flags flags, Qt::WindowFlags fl )
33  : QDialog( parent, fl )
34  , mTypes( types )
35  , mServiceName( serviceName )
36  , mOriginalConnName( connectionName )
37 {
38  setupUi( this );
39 
40  // compatibility fix with former API (pre 3.26) when serviceName was a setting key instead
41  if ( mServiceName.startsWith( QLatin1String( "qgis/" ) ) )
42  {
43  // It would be obviously much better to use mBaseKey also for credentials,
44  // but for some strange reason a different hardcoded key was used instead.
45  // WFS and WMS credentials were mixed with the same key WMS.
46  // Only WMS and WFS providers are using QgsNewHttpConnection at this moment
47  // using connection-wms and connection-wfs -> parse credential key from it.
48  mServiceName = mServiceName.split( '-' ).last().toUpper();
49  }
50 
51  if ( !( flags & FlagShowHttpSettings ) )
52  mHttpHeaders->hide();
53 
55 
56  connect( buttonBox, &QDialogButtonBox::helpRequested, this, &QgsNewHttpConnection::showHelp );
57 
58  QString connectionType = mServiceName;
59  if ( mServiceName == QLatin1String( "WMS" ) )
60  {
61  connectionType = QStringLiteral( "WMS/WMTS" );
62  }
63  setWindowTitle( tr( "Create a New %1 Connection" ).arg( connectionType ) );
64 
65  txtName->setValidator( new QRegularExpressionValidator( QRegularExpression( "[^\\/]+" ), txtName ) );
66 
67  cmbDpiMode->clear();
68 
69  cmbDpiMode->addItem( tr( "all" ), static_cast<int>( Qgis::DpiMode::All ) );
70  cmbDpiMode->addItem( tr( "off" ), static_cast<int>( Qgis::DpiMode::Off ) );
71  cmbDpiMode->addItem( tr( "QGIS" ), static_cast<int>( Qgis::DpiMode::QGIS ) );
72  cmbDpiMode->addItem( tr( "UMN" ), static_cast<int>( Qgis::DpiMode::UMN ) );
73  cmbDpiMode->addItem( tr( "GeoServer" ), static_cast<int>( Qgis::DpiMode::GeoServer ) );
74 
75  cmbVersion->clear();
76  cmbVersion->addItem( tr( "Maximum" ) );
77  cmbVersion->addItem( tr( "1.0" ) );
78  cmbVersion->addItem( tr( "1.1" ) );
79  cmbVersion->addItem( tr( "2.0" ) );
80  cmbVersion->addItem( tr( "OGC API - Features" ) );
81  connect( cmbVersion,
82  static_cast<void ( QComboBox::* )( int )>( &QComboBox::currentIndexChanged ),
83  this, &QgsNewHttpConnection::wfsVersionCurrentIndexChanged );
84 
85  connect( cbxWfsFeaturePaging, &QCheckBox::stateChanged,
86  this, &QgsNewHttpConnection::wfsFeaturePagingStateChanged );
87 
88  if ( !connectionName.isEmpty() )
89  {
90  // populate the dialog with the information stored for the connection
91  // populate the fields with the stored setting parameters
92 
93  const QgsSettings settings;
94 
95  txtName->setText( connectionName );
96  txtUrl->setText( QgsOwsConnection::settingsConnectionUrl.value( {mServiceName.toLower(), connectionName} ) );
97  mHttpHeaders->setFromSettings( settings, QStringLiteral( "qgis/connections-%1/%2" ).arg( mServiceName.toLower(), connectionName ) );
98 
100 
101  // Authentication
102  mAuthSettings->setUsername( QgsOwsConnection::settingsConnectionUsername.value( {mServiceName, connectionName} ) );
103  mAuthSettings->setPassword( QgsOwsConnection::settingsConnectionPassword.value( {mServiceName, connectionName} ) );
104  mAuthSettings->setConfigId( QgsOwsConnection::settingsConnectionAuthCfg.value( {mServiceName, connectionName} ) );
105  }
106  mWfsVersionDetectButton->setDisabled( txtUrl->text().isEmpty() );
107 
108  if ( !( mTypes & ConnectionWms ) && !( mTypes & ConnectionWcs ) )
109  {
110  mWmsOptionsGroupBox->setVisible( false );
111  mGroupBox->layout()->removeWidget( mWmsOptionsGroupBox );
112  }
113  if ( !( mTypes & ConnectionWfs ) )
114  {
115  mWfsOptionsGroupBox->setVisible( false );
116  mGroupBox->layout()->removeWidget( mWfsOptionsGroupBox );
117  }
118  else
119  {
120  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)" ) );
121  }
122 
123  if ( mTypes & ConnectionWcs )
124  {
125  cbxIgnoreGetMapURI->setText( tr( "Ignore GetCoverage URI reported in capabilities" ) );
126  cbxWmsIgnoreAxisOrientation->setText( tr( "Ignore axis orientation" ) );
127  if ( !( mTypes & ConnectionWms ) )
128  {
129  mWmsOptionsGroupBox->setTitle( tr( "WCS Options" ) );
130 
131  cbxIgnoreGetFeatureInfoURI->setVisible( false );
132  mGroupBox->layout()->removeWidget( cbxIgnoreGetFeatureInfoURI );
133 
134  cmbDpiMode->setVisible( false );
135  mGroupBox->layout()->removeWidget( cmbDpiMode );
136  lblDpiMode->setVisible( false );
137  mGroupBox->layout()->removeWidget( lblDpiMode );
138  }
139  }
140 
141  if ( !( flags & FlagShowTestConnection ) )
142  {
143  mTestConnectionButton->hide();
144  mGroupBox->layout()->removeWidget( mTestConnectionButton );
145  }
146 
147  if ( flags & FlagHideAuthenticationGroup )
148  {
149  mAuthGroupBox->hide();
150  mGroupBox->layout()->removeWidget( mAuthGroupBox );
151  }
152  // Adjust height
153  const int w = width();
154  adjustSize();
155  resize( w, height() );
156 
157  connect( txtName, &QLineEdit::textChanged, this, &QgsNewHttpConnection::nameChanged );
158  connect( txtUrl, &QLineEdit::textChanged, this, &QgsNewHttpConnection::urlChanged );
159 
160  buttonBox->button( QDialogButtonBox::Ok )->setDisabled( true );
161  connect( txtName, &QLineEdit::textChanged, this, &QgsNewHttpConnection::updateOkButtonState );
162  connect( txtUrl, &QLineEdit::textChanged, this, &QgsNewHttpConnection::updateOkButtonState );
163 
164  nameChanged( connectionName );
165 }
166 
167 void QgsNewHttpConnection::wfsVersionCurrentIndexChanged( int index )
168 {
169  // For now 2019-06-06, leave paging checkable for some WFS version 1.1 servers with support
170  cbxWfsFeaturePaging->setEnabled( index == WFS_VERSION_MAX || index >= WFS_VERSION_2_0 );
171  lblPageSize->setEnabled( cbxWfsFeaturePaging->isChecked() && ( index == WFS_VERSION_MAX || index >= WFS_VERSION_1_1 ) );
172  txtPageSize->setEnabled( cbxWfsFeaturePaging->isChecked() && ( index == WFS_VERSION_MAX || index >= WFS_VERSION_1_1 ) );
173  cbxWfsIgnoreAxisOrientation->setEnabled( index != WFS_VERSION_1_0 && index != WFS_VERSION_API_FEATURES_1_0 );
174  cbxWfsInvertAxisOrientation->setEnabled( index != WFS_VERSION_API_FEATURES_1_0 );
175  wfsUseGml2EncodingForTransactions()->setEnabled( index == WFS_VERSION_1_1 );
176 }
177 
178 void QgsNewHttpConnection::wfsFeaturePagingStateChanged( int state )
179 {
180  lblPageSize->setEnabled( state == Qt::Checked );
181  txtPageSize->setEnabled( state == Qt::Checked );
182 }
183 
185 {
186  return txtName->text();
187 }
188 
190 {
191  return txtUrl->text();
192 }
193 
194 void QgsNewHttpConnection::nameChanged( const QString &text )
195 {
196  Q_UNUSED( text )
197  buttonBox->button( QDialogButtonBox::Ok )->setDisabled( txtName->text().isEmpty() || txtUrl->text().isEmpty() );
198 }
199 
200 void QgsNewHttpConnection::urlChanged( const QString &text )
201 {
202  Q_UNUSED( text )
203  buttonBox->button( QDialogButtonBox::Ok )->setDisabled( txtName->text().isEmpty() || txtUrl->text().isEmpty() );
204  mWfsVersionDetectButton->setDisabled( txtUrl->text().isEmpty() );
205 }
206 
207 void QgsNewHttpConnection::updateOkButtonState()
208 {
209  const bool enabled = !txtName->text().isEmpty() && !txtUrl->text().isEmpty();
210  buttonBox->button( QDialogButtonBox::Ok )->setEnabled( enabled );
211 }
212 
214 {
215  const QString newConnectionName = txtName->text();
216 
217  bool urlExists = QgsOwsConnection::settingsConnectionUrl.exists( {mServiceName.toLower(), newConnectionName} );
218 
219  // warn if entry was renamed to an existing connection
220  if ( ( mOriginalConnName.isNull() || mOriginalConnName.compare( newConnectionName, Qt::CaseInsensitive ) != 0 ) &&
221  urlExists &&
222  QMessageBox::question( this,
223  tr( "Save Connection" ),
224  tr( "Should the existing connection %1 be overwritten?" ).arg( txtName->text() ),
225  QMessageBox::Ok | QMessageBox::Cancel ) == QMessageBox::Cancel )
226  {
227  return false;
228  }
229 
230  if ( ! mAuthSettings->password().isEmpty() &&
231  QMessageBox::question( this,
232  tr( "Saving Passwords" ),
233  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." ),
234  QMessageBox::Ok | QMessageBox::Cancel ) == QMessageBox::Cancel )
235  {
236  return false;
237  }
238 
239  return true;
240 }
241 
243 {
244  return mTestConnectionButton;
245 }
246 
248 {
249  return mAuthSettings;
250 }
251 
253 {
254  return mWfsVersionDetectButton;
255 }
256 
258 {
259  return cmbVersion;
260 }
261 
263 {
264  return cbxWfsFeaturePaging;
265 }
266 
268 {
269  return cbxWfsUseGml2EncodingForTransactions;
270 }
271 
273 {
274  return txtPageSize;
275 }
276 
277 QString QgsNewHttpConnection::wfsSettingsKey( const QString &base, const QString &connectionName ) const
278 {
279  return base + connectionName;
280 }
281 
282 QString QgsNewHttpConnection::wmsSettingsKey( const QString &base, const QString &connectionName ) const
283 {
284  return base + connectionName;
285 }
286 
288 {
289  QStringList detailsParameters = {mServiceName.toLower(), mOriginalConnName};
290 
291  cbxIgnoreGetMapURI->setChecked( QgsOwsConnection::settingsConnectionIgnoreGetMapURI.value( detailsParameters ) );
292  cbxWmsIgnoreReportedLayerExtents->setChecked( QgsOwsConnection::settingsConnectionReportedLayerExtents.value( detailsParameters ) );
293  cbxWfsIgnoreAxisOrientation->setChecked( QgsOwsConnection::settingsConnectionIgnoreAxisOrientation.value( detailsParameters ) );
294  cbxWfsInvertAxisOrientation->setChecked( QgsOwsConnection::settingsConnectionInvertAxisOrientation.value( detailsParameters ) );
295  cbxWfsUseGml2EncodingForTransactions->setChecked( QgsOwsConnection::settingsConnectionPreferCoordinatesForWfsT11.value( detailsParameters ) );
296 
297  cbxWmsIgnoreAxisOrientation->setChecked( QgsOwsConnection::settingsConnectionIgnoreAxisOrientation.value( detailsParameters ) );
298  cbxWmsInvertAxisOrientation->setChecked( QgsOwsConnection::settingsConnectionInvertAxisOrientation.value( detailsParameters ) );
299  cbxIgnoreGetFeatureInfoURI->setChecked( QgsOwsConnection::settingsConnectionIgnoreGetFeatureInfoURI.value( detailsParameters ) );
300  cbxSmoothPixmapTransform->setChecked( QgsOwsConnection::settingsConnectionSmoothPixmapTransform.value( detailsParameters ) );
301 
302  Qgis::DpiMode dpiMode = QgsOwsConnection::settingsConnectionDpiMode.value( detailsParameters );
303  cmbDpiMode->setCurrentIndex( cmbDpiMode->findData( static_cast<int>( dpiMode ) ) );
304 
305  const QString version = QgsOwsConnection::settingsConnectionVersion.value( detailsParameters );
306  int versionIdx = WFS_VERSION_MAX; // AUTO
307  if ( version == QLatin1String( "1.0.0" ) )
308  versionIdx = WFS_VERSION_1_0;
309  else if ( version == QLatin1String( "1.1.0" ) )
310  versionIdx = WFS_VERSION_1_1;
311  else if ( version == QLatin1String( "2.0.0" ) )
312  versionIdx = WFS_VERSION_2_0;
313  else if ( version == QLatin1String( "OGC_API_FEATURES" ) )
314  versionIdx = WFS_VERSION_API_FEATURES_1_0;
315  cmbVersion->setCurrentIndex( versionIdx );
316 
317  // Enable/disable these items per WFS versions
318  wfsVersionCurrentIndexChanged( versionIdx );
319 
320  mHttpHeaders->setFromSettings( QgsSettings(), QStringLiteral( "qgis/connections-%1/%2" ).arg( mServiceName.toLower(), mOriginalConnName ) );
321 
322  txtMaxNumFeatures->setText( QgsOwsConnection::settingsConnectionMaxNumFeatures.value( detailsParameters ) );
323 
324  // Only default to paging enabled if WFS 2.0.0 or higher
325  const bool pagingEnabled = QgsOwsConnection::settingsConnectionPagingEnabled.valueWithDefaultOverride( versionIdx == WFS_VERSION_MAX || versionIdx >= WFS_VERSION_2_0, detailsParameters );
326  txtPageSize->setText( QgsOwsConnection::settingsConnectionPagesize.value( detailsParameters ) );
327  cbxWfsFeaturePaging->setChecked( pagingEnabled );
328 }
329 
331 {
332  QUrl url( txtUrl->text().trimmed() );
333  QUrlQuery query( url );
334  const QList<QPair<QString, QString> > items = query.queryItems( QUrl::FullyEncoded );
335  QHash< QString, QPair<QString, QString> > params;
336  for ( const QPair<QString, QString> &it : items )
337  {
338  params.insert( it.first.toUpper(), it );
339  }
340 
341  if ( params[QStringLiteral( "SERVICE" )].second.toUpper() == "WMS" ||
342  params[QStringLiteral( "SERVICE" )].second.toUpper() == "WFS" ||
343  params[QStringLiteral( "SERVICE" )].second.toUpper() == "WCS" )
344  {
345  query.removeQueryItem( params.value( QStringLiteral( "SERVICE" ) ).first );
346  query.removeQueryItem( params.value( QStringLiteral( "REQUEST" ) ).first );
347  query.removeQueryItem( params.value( QStringLiteral( "FORMAT" ) ).first );
348  }
349 
350  url.setQuery( query );
351 
352  if ( url.path( QUrl::FullyEncoded ).isEmpty() )
353  {
354  url.setPath( fromEncodedComponent_helper( "/" ) );
355  }
356  return url;
357 }
358 
360 {
361  const QString newConnectionName = txtName->text();
362 
363  if ( !validate() )
364  return;
365 
366  QgsSettings settings;
367 
368  // on rename delete original entry first
369  if ( !mOriginalConnName.isNull() && mOriginalConnName != newConnectionName )
370  {
371  QgsOwsConnection::settingsServiceConnectionDetailsGroup.removeAllChildrenSettings( {mServiceName.toLower(), mOriginalConnName} );
373  settings.sync();
374  }
375 
376  QStringList detailsParameters = {mServiceName.toLower(), newConnectionName};
377 
378  const QUrl url( urlTrimmed() );
379  QgsOwsConnection::settingsConnectionUrl.setValue( url.toString(), detailsParameters );
380 
381  if ( mTypes & ConnectionWfs )
382  {
383  QgsOwsConnection::settingsConnectionIgnoreAxisOrientation.setValue( cbxWfsIgnoreAxisOrientation->isChecked(), detailsParameters );
384  QgsOwsConnection::settingsConnectionInvertAxisOrientation.setValue( cbxWfsInvertAxisOrientation->isChecked(), detailsParameters );
385  QgsOwsConnection::settingsConnectionPreferCoordinatesForWfsT11.setValue( cbxWfsUseGml2EncodingForTransactions->isChecked(), detailsParameters );
386  }
387  if ( mTypes & ConnectionWms || mTypes & ConnectionWcs )
388  {
389  QgsOwsConnection::settingsConnectionIgnoreAxisOrientation.setValue( cbxWmsIgnoreAxisOrientation->isChecked(), detailsParameters );
390  QgsOwsConnection::settingsConnectionInvertAxisOrientation.setValue( cbxWmsInvertAxisOrientation->isChecked(), detailsParameters );
391 
392  QgsOwsConnection::settingsConnectionReportedLayerExtents.setValue( cbxWmsIgnoreReportedLayerExtents->isChecked(), detailsParameters );
393  QgsOwsConnection::settingsConnectionIgnoreGetMapURI.setValue( cbxIgnoreGetMapURI->isChecked(), detailsParameters );
394  QgsOwsConnection::settingsConnectionSmoothPixmapTransform.setValue( cbxSmoothPixmapTransform->isChecked(), detailsParameters );
395 
396  Qgis::DpiMode dpiMode = cmbDpiMode->currentData().value<Qgis::DpiMode>();
397  QgsOwsConnection::settingsConnectionDpiMode.setValue( dpiMode, detailsParameters );
398 
399  mHttpHeaders->updateSettings( settings, QStringLiteral( "qgis/connections-%1/%2" ).arg( mServiceName.toLower(), newConnectionName ) );
400  }
401  if ( mTypes & ConnectionWms )
402  {
403  QgsOwsConnection::settingsConnectionIgnoreGetFeatureInfoURI.setValue( cbxIgnoreGetFeatureInfoURI->isChecked(), detailsParameters );
404  }
405  if ( mTypes & ConnectionWfs )
406  {
407  QString version = QStringLiteral( "auto" );
408  switch ( cmbVersion->currentIndex() )
409  {
410  case WFS_VERSION_MAX:
411  version = QStringLiteral( "auto" );
412  break;
413  case WFS_VERSION_1_0:
414  version = QStringLiteral( "1.0.0" );
415  break;
416  case WFS_VERSION_1_1:
417  version = QStringLiteral( "1.1.0" );
418  break;
419  case WFS_VERSION_2_0:
420  version = QStringLiteral( "2.0.0" );
421  break;
423  version = QStringLiteral( "OGC_API_FEATURES" );
424  break;
425  }
426  QgsOwsConnection::settingsConnectionVersion.setValue( version, detailsParameters );
427  QgsOwsConnection::settingsConnectionMaxNumFeatures.setValue( txtMaxNumFeatures->text(), detailsParameters );
428  QgsOwsConnection::settingsConnectionPagesize.setValue( txtPageSize->text(), detailsParameters );
429  QgsOwsConnection::settingsConnectionPagingEnabled.setValue( cbxWfsFeaturePaging->isChecked(), detailsParameters );
430  }
431 
432  QStringList credentialsParameters = {mServiceName, newConnectionName};
433  QgsOwsConnection::settingsConnectionUsername.setValue( mAuthSettings->username(), credentialsParameters );
434  QgsOwsConnection::settingsConnectionPassword.setValue( mAuthSettings->password(), credentialsParameters );
435  QgsOwsConnection::settingsConnectionAuthCfg.setValue( mAuthSettings->configId(), credentialsParameters );
436 
437  if ( mHttpHeaders->isVisible() )
438  mHttpHeaders->updateSettings( settings, QStringLiteral( "qgis/connections-%1/%2" ).arg( mServiceName.toLower(), newConnectionName ) ); // why is it done twice (see just above)?
439 
440  QgsOwsConnection::settingsConnectionSelected.setValue( newConnectionName, mServiceName );
441 
442  QDialog::accept();
443 }
444 
445 void QgsNewHttpConnection::showHelp()
446 {
447  QgsHelp::openHelp( QStringLiteral( "working_with_ogc/index.html" ) );
448 }
Qgis::DpiMode::All
@ All
All.
QgsOwsConnection::settingsConnectionIgnoreGetFeatureInfoURI
static const QgsSettingsEntryBool settingsConnectionIgnoreGetFeatureInfoURI
Definition: qgsowsconnection.h:66
QgsOwsConnection::settingsConnectionVersion
static const QgsSettingsEntryString settingsConnectionVersion
Definition: qgsowsconnection.h:64
QgsOwsConnection::settingsServiceConnectionDetailsGroup
static const QgsSettingsEntryGroup settingsServiceConnectionDetailsGroup
Definition: qgsowsconnection.h:81
QgsNewHttpConnection::wfsUseGml2EncodingForTransactions
QCheckBox * wfsUseGml2EncodingForTransactions()
Returns the "Use GML2 encoding for transactions" checkbox.
Definition: qgsnewhttpconnection.cpp:267
qgsauthsettingswidget.h
QgsNewHttpConnection::FlagShowTestConnection
@ FlagShowTestConnection
Display the 'test connection' button.
Definition: qgsnewhttpconnection.h:58
QgsOwsConnection::settingsConnectionUsername
static const QgsSettingsEntryString settingsConnectionUsername
Definition: qgsowsconnection.h:77
QgsNewHttpConnection::validate
virtual bool validate()
Returns true if dialog settings are valid, or false if current settings are not valid and the dialog ...
Definition: qgsnewhttpconnection.cpp:213
qgsgui.h
QgsSettingsEntryGroup::removeAllChildrenSettings
void removeAllChildrenSettings(const QString &dynamicKeyPart=QString()) const
Removes all the settings from this group The dynamicKeyPart argument specifies the dynamic part of th...
Definition: qgssettingsentry.cpp:91
QgsNewHttpConnection::ConnectionWfs
@ ConnectionWfs
WFS connection.
Definition: qgsnewhttpconnection.h:45
QgsAuthSettingsWidget
Widget for entering authentication credentials both in the form username/password and by using QGIS A...
Definition: qgsauthsettingswidget.h:36
QgsOwsConnection::settingsConnectionAuthCfg
static const QgsSettingsEntryString settingsConnectionAuthCfg
Definition: qgsowsconnection.h:79
QgsOwsConnection::settingsConnectionUrl
static const QgsSettingsEntryString settingsConnectionUrl
Definition: qgsowsconnection.h:62
Qgis::DpiMode::Off
@ Off
Off.
qgsowsconnection.h
QgsSettings
This class is a composition of two QSettings instances:
Definition: qgssettings.h:61
QgsOwsConnection::settingsConnectionInvertAxisOrientation
static const QgsSettingsEntryBool settingsConnectionInvertAxisOrientation
Definition: qgsowsconnection.h:75
QgsNewHttpConnection::WFS_VERSION_API_FEATURES_1_0
@ WFS_VERSION_API_FEATURES_1_0
Definition: qgsnewhttpconnection.h:113
fromEncodedComponent_helper
QString fromEncodedComponent_helper(const QByteArray &ba)
Definition: fromencodedcomponenthelper.cpp:57
QgsNewHttpConnection::wfsVersionDetectButton
QPushButton * wfsVersionDetectButton()
Returns the "WFS version detect" button.
Definition: qgsnewhttpconnection.cpp:252
QgsNewHttpConnection::url
QString url() const
Returns the current connection url.
Definition: qgsnewhttpconnection.cpp:189
QgsSettingsEntryBase::exists
bool exists(const QString &dynamicKeyPart=QString()) const
Returns true if the settings is contained in the underlying QSettings.
Definition: qgssettingsentry.cpp:173
QgsOwsConnection::settingsConnectionPagesize
static const QgsSettingsEntryString settingsConnectionPagesize
Definition: qgsowsconnection.h:71
QgsOwsConnection::settingsConnectionIgnoreAxisOrientation
static const QgsSettingsEntryBool settingsConnectionIgnoreAxisOrientation
Definition: qgsowsconnection.h:74
Qgis::DpiMode::UMN
@ UMN
UMN.
QgsNewHttpConnection::accept
void accept() override
Definition: qgsnewhttpconnection.cpp:359
QgsNewHttpConnection::WFS_VERSION_MAX
@ WFS_VERSION_MAX
Definition: qgsnewhttpconnection.h:109
QgsOwsConnection::settingsConnectionMaxNumFeatures
static const QgsSettingsEntryString settingsConnectionMaxNumFeatures
Definition: qgsowsconnection.h:70
QgsNewHttpConnection::FlagHideAuthenticationGroup
@ FlagHideAuthenticationGroup
Hide the Authentication group.
Definition: qgsnewhttpconnection.h:59
QgsGui::enableAutoGeometryRestore
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:180
QgsNewHttpConnection::ConnectionWcs
@ ConnectionWcs
WCS connection.
Definition: qgsnewhttpconnection.h:47
QgsSettings::sync
void sync()
Writes any unsaved changes to permanent storage, and reloads any settings that have been changed in t...
Definition: qgssettings.cpp:187
QgsNewHttpConnection::QgsNewHttpConnection
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.
Definition: qgsnewhttpconnection.cpp:32
QgsNewHttpConnection::WFS_VERSION_2_0
@ WFS_VERSION_2_0
Definition: qgsnewhttpconnection.h:112
QgsOwsConnection::settingsConnectionPreferCoordinatesForWfsT11
static const QgsSettingsEntryBool settingsConnectionPreferCoordinatesForWfsT11
Definition: qgsowsconnection.h:73
QgsSettingsEntryByValue::setValue
bool setValue(T value, const QString &dynamicKeyPart=QString()) const
Set settings value.
Definition: qgssettingsentry.h:565
fromencodedcomponenthelper.h
Qgis::DpiMode::QGIS
@ QGIS
QGIS.
QgsOwsConnection::settingsConnectionDpiMode
static const QgsSettingsEntryEnumFlag< Qgis::DpiMode > settingsConnectionDpiMode
Definition: qgsowsconnection.h:69
QgsNewHttpConnection::wfsVersionComboBox
QComboBox * wfsVersionComboBox()
Returns the "WFS version" combobox.
Definition: qgsnewhttpconnection.cpp:257
QgsNewHttpConnection::WFS_VERSION_1_1
@ WFS_VERSION_1_1
Definition: qgsnewhttpconnection.h:111
QgsSettingsEntryByValue::valueWithDefaultOverride
T valueWithDefaultOverride(T defaultValueOverride, const QString &dynamicKeyPart=QString()) const
Returns the settings value with a defaultValueOverride and with an optional dynamicKeyPart.
Definition: qgssettingsentry.h:531
Qgis::DpiMode
DpiMode
DpiMode enum.
Definition: qgis.h:1572
QgsNewHttpConnection::wmsSettingsKey
virtual QString wmsSettingsKey(const QString &base, const QString &connectionName) const
Returns the QSettings key for WMS related settings for the connection.
Definition: qgsnewhttpconnection.cpp:282
QgsNewHttpConnection::ConnectionWms
@ ConnectionWms
WMS connection.
Definition: qgsnewhttpconnection.h:46
QgsNewHttpConnection::updateServiceSpecificSettings
void updateServiceSpecificSettings()
Triggers a resync of the GUI widgets for the service specific settings (i.e.
Definition: qgsnewhttpconnection.cpp:287
QgsOwsConnection::settingsConnectionPagingEnabled
static const QgsSettingsEntryBool settingsConnectionPagingEnabled
Definition: qgsowsconnection.h:72
QgsNewHttpConnection::wfsPageSizeLineEdit
QLineEdit * wfsPageSizeLineEdit()
Returns the "WFS page size" edit.
Definition: qgsnewhttpconnection.cpp:272
QgsOwsConnection::settingsConnectionPassword
static const QgsSettingsEntryString settingsConnectionPassword
Definition: qgsowsconnection.h:78
QgsNewHttpConnection::urlTrimmed
QUrl urlTrimmed() const
Returns the url.
Definition: qgsnewhttpconnection.cpp:330
QgsNewHttpConnection::authSettingsWidget
QgsAuthSettingsWidget * authSettingsWidget()
Returns the current authentication settings widget.
Definition: qgsnewhttpconnection.cpp:247
QgsOwsConnection::settingsServiceConnectionCredentialsGroup
static const QgsSettingsEntryGroup settingsServiceConnectionCredentialsGroup
Definition: qgsowsconnection.h:82
qgsnewhttpconnection.h
QgsNewHttpConnection::WFS_VERSION_1_0
@ WFS_VERSION_1_0
Definition: qgsnewhttpconnection.h:110
QgsNewHttpConnection::name
QString name() const
Returns the current connection name.
Definition: qgsnewhttpconnection.cpp:184
QgsSettingsEntryByReference::value
T value(const QString &dynamicKeyPart=QString()) const
Returns settings value.
Definition: qgssettingsentry.h:379
QgsHelp::openHelp
static void openHelp(const QString &key)
Opens help topic for the given help key using default system web browser.
Definition: qgshelp.cpp:36
QgsOwsConnection::settingsConnectionIgnoreGetMapURI
static const QgsSettingsEntryBool settingsConnectionIgnoreGetMapURI
Definition: qgsowsconnection.h:65
QgsNewHttpConnection::testConnectButton
QPushButton * testConnectButton()
Returns the "test connection" button.
Definition: qgsnewhttpconnection.cpp:242
Qgis::DpiMode::GeoServer
@ GeoServer
GeoServer.
qgssettings.h
QgsOwsConnection::settingsConnectionSmoothPixmapTransform
static const QgsSettingsEntryBool settingsConnectionSmoothPixmapTransform
Definition: qgsowsconnection.h:67
QgsSettingsEntryByReference::setValue
bool setValue(const T &value, const QString &dynamicKeyPart=QString()) const
Set settings value.
Definition: qgssettingsentry.h:424
QgsNewHttpConnection::wfsSettingsKey
virtual QString wfsSettingsKey(const QString &base, const QString &connectionName) const
Returns the QSettings key for WFS related settings for the connection.
Definition: qgsnewhttpconnection.cpp:277
QgsOwsConnection::settingsConnectionReportedLayerExtents
static const QgsSettingsEntryBool settingsConnectionReportedLayerExtents
Definition: qgsowsconnection.h:68
QgsOwsConnection::settingsConnectionSelected
static const QgsSettingsEntryString settingsConnectionSelected
Definition: qgsowsconnection.h:60
qgshelp.h
QgsNewHttpConnection::wfsPagingEnabledCheckBox
QCheckBox * wfsPagingEnabledCheckBox()
Returns the "WFS paging enabled" checkbox.
Definition: qgsnewhttpconnection.cpp:262
QgsNewHttpConnection::FlagShowHttpSettings
@ FlagShowHttpSettings
Display the 'http' group.
Definition: qgsnewhttpconnection.h:60
QgsSettingsEntryByValue::value
T value(const QString &dynamicKeyPart=QString()) const
Returns settings value.
Definition: qgssettingsentry.h:520