[Qgis-developer] Save dialog for plugin development

Rob Nickerson rob.j.nickerson at gmail.com
Thu Jul 5 12:30:09 PDT 2012


Hi List,

Just wondering if anyone has had any thoughts re my earlier question. To
recap I am trying to edit the fTools plugin so that you can save to any ogr
format. I have found QgsEncodingFileDialog().selectedNameFilter() which
returns the file name format however this is not compatible with the way
QgsVectorFileWriter() works. The file writer requires the "driver name" as
a format (e.g. ESRI Shapefile) whereas selectedNameFilter() returns the
hard coded name in the save dialogues drop down box (e.g. ESRI Shapefiles
[OGR] (*.shp *.SHP) ).

My question was: Is there an easy way to get just the driver name. I noted
that gdal tools have a hard coded look up table. If this is the only way
then can i suggest we bring such a table into the core so that all plugins
can make use of it. Alternatively we switch to write to a memory layer -
however I do not know how to do this...

On an related note: Sextante includes ftools - is this by link or has the
ftools code been moved into part of sextante? How does this effect
development of ftools?

Thanks,
Rob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20120705/c6a87d03/attachment.html>


More information about the Qgis-developer mailing list