29 #include <QInputDialog> 30 #include <QMessageBox> 35 #include <QNetworkRequest> 36 #include <QNetworkReply> 39 mConnName( theConnName ),
40 mService( theService )
46 QString key =
"/Qgis/connections-" + mService.toLower() +
"/" +
mConnName;
47 QString credentialsKey =
"/Qgis/" + mService +
"/" +
mConnName;
49 QStringList connStringParts;
52 mUri.
setParam(
"url", settings.value( key +
"/url" ).toString() );
55 QString username = settings.value( credentialsKey +
"/username" ).toString();
56 QString password = settings.value( credentialsKey +
"/password" ).toString();
57 if ( !username.isEmpty() )
60 mUri.
setParam(
"username", username );
61 mUri.
setParam(
"password", password );
64 bool ignoreGetMap = settings.value( key +
"/ignoreGetMapURI",
false ).toBool();
65 bool ignoreGetFeatureInfo = settings.value( key +
"/ignoreGetFeatureInfoURI",
false ).toBool();
66 bool ignoreAxisOrientation = settings.value( key +
"/ignoreAxisOrientation",
false ).toBool();
67 bool invertAxisOrientation = settings.value( key +
"/invertAxisOrientation",
false ).toBool();
70 mUri.
setParam(
"IgnoreGetMapUrl",
"1" );
72 if ( ignoreGetFeatureInfo )
74 mUri.
setParam(
"IgnoreGetFeatureInfoUrl",
"1" );
76 if ( ignoreAxisOrientation )
78 mUri.
setParam(
"IgnoreAxisOrientation",
"1" );
80 if ( invertAxisOrientation )
82 mUri.
setParam(
"InvertAxisOrientation",
"1" );
106 settings.beginGroup(
"/Qgis/connections-" + theService.toLower() );
107 return settings.childGroups();
113 return settings.value(
"/Qgis/connections-" + theService.toLower() +
"/selected" ).toString();
119 settings.setValue(
"/Qgis/connections-" + theService.toLower() +
"/selected", name );
125 settings.remove(
"/Qgis/connections-" + theService.toLower() +
"/" + name );
126 settings.remove(
"/Qgis/" + theService +
"/" + name );
static QString selectedConnection(const QString &theService)
static QStringList connectionList(const QString &theService)
QgsOWSConnection(const QString &theService, const QString &theConnName)
Constructor.
static void setSelectedConnection(const QString &theService, const QString &name)
static void deleteConnection(const QString &theService, const QString &name)
void setParam(const QString &key, const QString &value)
Set generic param (generic mode)
Q_DECL_DEPRECATED QString connectionInfo()
Class for storing the component parts of a PostgreSQL/RDBMS datasource URI.
QByteArray encodedUri() const
return complete encoded uri (generic mode)
~QgsOWSConnection()
Destructor.