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 );