[Qgis-developer] please help me write a QGIS-PostGIS GUI in Python

Maciej Sieczka tutey at o2.pl
Sat Feb 2 17:26:30 EST 2008


Alessandro Pasotti pisze:

> Did you take a look to my code?

Yes. It helps. Thanks a lot!

We have slightly different approaches I see. You don't seem to be 
allowing for schemas other than default "public". Thus your GUI does not 
have a way to select a schema. I think it is important to not to assume 
everyone uses public schema always. Thus I think trying to follow the 
"add postgis layers" QGIS GUI, which supports different schemas, is a 
more robust approach.

I have progressed a bit. Code attached. I've got the Postgres 
connections selector working, know how to connect actions to buttons, 
parse connection parameters and pass them to psycopg.

My current problem is how to get the TreeView, which provides schemas 
and tables list, to work from python. It's the 'self.mTablesTreeView' 
bit from ui_plugingui.py. C++ implementation is in 
src/app/qgsdbsourceselect.cpp.

The aim is to fetch schemas and tables list according to psycopg command 
and populate the plugin's window with them, letting the user to select 
schemas and tables for further actions. If you or anybody could help me 
with this it'd be great.

Maciek
-------------- next part --------------
A non-text attachment was scrubbed...
Name: qgis_postgis_gui_v3.tar.bz2
Type: application/x-bzip
Size: 6854 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/qgis-developer/attachments/20080202/b907a571/qgis_postgis_gui_v3.tar.bin


More information about the Qgis-developer mailing list