29 #include <QInputDialog>
30 #include <QMessageBox>
35 #include <QNetworkRequest>
36 #include <QNetworkReply>
39 mConnName( theConnName ),
40 mService( theService )
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 if ( password.isEmpty() )
62 password = QInputDialog::getText( 0,
tr(
"WMS Password for %1" ).arg( mConnName ),
tr(
"Password" ), QLineEdit::Password );
69 bool ignoreGetMap = settings.value( key +
"/ignoreGetMapURI",
false ).toBool();
70 bool ignoreGetFeatureInfo = settings.value( key +
"/ignoreGetFeatureInfoURI",
false ).toBool();
71 bool ignoreAxisOrientation = settings.value( key +
"/ignoreAxisOrientation",
false ).toBool();
72 bool invertAxisOrientation = settings.value( key +
"/invertAxisOrientation",
false ).toBool();
77 if ( ignoreGetFeatureInfo )
81 if ( ignoreAxisOrientation )
85 if ( invertAxisOrientation )
129 settings.beginGroup(
"/Qgis/connections-" + theService.toLower() );
130 return settings.childGroups();
136 return settings.value(
"/Qgis/connections-" + theService.toLower() +
"/selected" ).toString();
142 settings.setValue(
"/Qgis/connections-" + theService.toLower() +
"/selected", name );
148 settings.remove(
"/Qgis/connections-" + theService.toLower() +
"/" + name );
149 settings.remove(
"/Qgis/" + theService +
"/" + name );
static QgsProviderRegistry * instance(QString pluginPath=QString::null)
means of accessing canonical single instance
static QString selectedConnection(const QString &theService)
static QStringList connectionList(const QString &theService)
Abstract base class for spatial data provider implementations.
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)
QgsDataProvider * provider(const QString &providerKey, const QString &dataSource)
Create an instance of the provider.
void setParam(const QString &key, const QString &value)
Set generic param (generic mode)
Class for storing the component parts of a PostgreSQL/RDBMS datasource URI.
A registry / canonical manager of data providers.
QByteArray encodedUri() const
return complete encoded uri (generic mode)
~QgsOWSConnection()
Destructor.