<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
> From: tim@linfiniti.com<BR>> To: frdcn@hotmail.com<BR>> Subject: Re: [Qgis-developer] Open vector dialog<BR>> Date: Fri, 13 Feb 2009 11:04:33 +0200<BR>> CC: qgis-developer@lists.osgeo.org; warmerdam@pobox.com<BR>> ><BR>> > Is there any other way to access provider in execution time other than<BR>> > providerregistry methods? this question is because I want to delegate the<BR>> > connection string creation to ogrprovider but I don't want to add other<BR>> > method to qgsproviderregistry.<BR>> ><BR>> <BR>> Can you explain better what call you need to add to the provider?<BR>> <BR><BR>
The ogr provider has two methods named <SPAN lang=ES-MODERN>fileVectorFilters() one inside the class</SPAN><BR>
<SPAN lang=ES-MODERN>and one as QGISEXTERN.</SPAN><BR>
<SPAN lang=ES-MODERN></SPAN> <BR>
<SPAN lang=ES-MODERN>I added some more functions:</SPAN><BR>
<SPAN lang=ES-MODERN></SPAN> <BR>
<SPAN lang=ES-MODERN>QString databaseDrivers();</SPAN><BR><SPAN lang=ES-MODERN>
<SPAN lang=ES-MODERN>QString directoryDrivers();</SPAN><BR>
<SPAN lang=ES-MODERN>QString protocolDrivers();</SPAN><BR>
<SPAN lang=ES-MODERN></SPAN> <BR>
<SPAN lang=ES-MODERN></SPAN> <BR>
<SPAN lang=ES-MODERN>Reviewing the code I found that fileVectorFilters is called through QgsProviderRegistry my question</SPAN><BR>
<SPAN lang=ES-MODERN>is if it ok to add all these functions to ogrprovider and their equivalents in QgsProviderRegistry.</SPAN><BR>
<SPAN lang=ES-MODERN></SPAN> <BR>
<SPAN lang=ES-MODERN>Also I would like to add a method to ogrprovider to create an ogr uri given its connection parameters</SPAN><BR>
<SPAN lang=ES-MODERN>and type</SPAN><SPAN lang=ES-MODERN>, this method needs to be called before an instance of qgsvectorlayer is created</SPAN><BR>
<SPAN lang=ES-MODERN>but I didn't found a way to call this method without adding compile time dependencies.</SPAN><BR>
<SPAN lang=ES-MODERN></SPAN> <BR>
<SPAN lang=ES-MODERN>I implemented the method directly in qgsopenvectordialog but with new drivers will</SPAN><BR>
<SPAN lang=ES-MODERN>be needed to update both ogrprovider and qgsopenvectorlayerdialog.</SPAN><BR>
<SPAN lang=ES-MODERN></SPAN> <BR>
<SPAN lang=ES-MODERN>Regards</SPAN><BR>
<SPAN lang=ES-MODERN>Godofredo Contreras</SPAN><BR></SPAN><br /><hr />Want to do more with Windows Live? Learn “10 hidden secrets” from Jamie. <a href='http://windowslive.com/connect/post/jamiethomson.spaces.live.com-Blog-cns!550F681DAD532637!5295.entry?ocid=TXT_TAGLM_WL_domore_092008' target='_new'>Learn Now</a></body>
</html>