<div dir="ltr"><div class="gmail_quote"><div dir="ltr"><div>Hi Nathan, <br><br>you can have a look to a the new version of changeDataSource plugin I was releasing: <a href="https://github.com/enricofer/changeDataSource" target="_blank">https://github.com/enricofer/changeDataSource</a><br></div><div>Once installed, clicking on toolbutton <img alt="Immagine incorporata 3" src="cid:ii_15167dfd4e83b9f8" height="32" width="32"> is possible to change the datasources of loaded layers<br></div><div>Expressions are used to massively replace datasources strings using a dummy memory layer build up on the fly (called layerTable) that contains loaded layers parameters.<br></div><div>This layer appears in legend when dialog is shown to allow expression performing, because if layerTable layer is not charged in Registry its fields are not listed in Expression Dialog under "Fields and Values"</div><div><br><img alt="Immagine incorporata 4" src="cid:ii_15167e2df20b677d" height="274" width="562"><br><br></div><div>Expression is evaluated at row 541 in changeDataSource.py<br><br></div><div>Thanks.<br></div><div><br></div></div><div class=""><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">2015-12-03 13:16 GMT+01:00 Nathan Woodrow <span dir="ltr"><<a href="mailto:madmanwoo@gmail.com" target="_blank">madmanwoo@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><p dir="ltr">Hi,</p>
<p dir="ltr">Can you paste and example?<br>
</p>
<br><div class="gmail_quote"><div><div><div dir="ltr">On Thu, 3 Dec 2015 10:10 pmĀ Enrico Ferreguti <<a href="mailto:enricofer@gmail.com" target="_blank">enricofer@gmail.com</a>> wrote:<br></div></div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div><div dir="ltr"><div><div>Hi, I noticed that QgsExpression class can't evaluate layers that are not loaded in QgsMapLayerRegistry.<br>This is a bit annoying because expressions could be evaluated against a temporary datasource or external data without necessary show it to the user. (an alternative question could be: Is it possible to hide a legend item?)<br></div>Should I submit a feature request for this?<br><br></div><div>Regards<br></div><div>Enrico Ferreguti.<br></div></div></div></div>
_______________________________________________<br>
Qgis-developer mailing list<br>
<a href="mailto:Qgis-developer@lists.osgeo.org" target="_blank">Qgis-developer@lists.osgeo.org</a><br>
List info: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
Unsubscribe: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a></blockquote></div>
</blockquote></div><br></div>
</div></div></div><br></div>