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

Tim Sutton tim at linfiniti.com
Fri Feb 1 19:27:32 EST 2008


The postres ui stuff is part of app which is not part of the python
bindings. It would make more sense to me if we turned the postgres db
selector ui into a widget and stuck it into libqgis_gui that could
then be used by python apps.....no time to do that at the moment
myself though...

Regards

Tim

2008/2/1, Maciej Sieczka <tutey at o2.pl>:
> Gary Sherman pisze:
>
> Thanks for the tips. Some "thoughts" below.
>
> > I think you could approach this project differently. For one, you can
> > use the connections stored in the user preferences and offer them up
> > in your own dialog.
>
> Hmm, still I'd need to write my own schema and table selector. While
> it's already there in C++, only I can't use it (I'm lazy, ain't I).
>
> > If you need to create a new connection, you could instruct the user
> > to use the other PostGIS dialog,
>
> That would do.
>
> > or you could implement your own using the .ui file for the add new
> > connection dialog. Creating a new connection amounts to collecting
> > the required parameters, optionally testing to see if you can
> > connect, and storing them in the user's preferences.
> >
> > You can save and restore settings using the QSettings object with
> > Python. The "Zoom to Point" plugin does this---see it for an example.
> >
> >
> > By now you've realized you have to write your own code to manipulate
> >  dialogs and fetch/process user input. I'm working on a tutorial for
> > writing a plugin but don't expect it to be done for a while.
>
> Are SIP wrappers for QGIS C++ PostGIS functionality not present for a
> reason? If they were there, could I call PostGIS-related methods easily
> like this:
>
>
> from qgis.core import QgsContextHelp
>
>    def on_pbnHelp_clicked(self):
>      QgsContextHelp.run(32338213)
>
> ?
>
> Cheers,
> Maciek
>
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.qgis.org
> http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-developer
>


-- 
Tim Sutton
QGIS Project Steering Committee Member - Release  Manager
Visit http://qgis.org for a great open source GIS
openModeller Desktop Developer
Visit http://openModeller.sf.net for a great open source ecological
niche modelling tool
Home Page: http://tim.linfiniti.com
Skype: timlinux
Irc: timlinux on #qgis at freenode.net



More information about the Qgis-developer mailing list