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

tutey tutey at o2.pl
Thu Jan 31 10:43:36 EST 2008

Hi All,

I want to write the plugin I requested at [1] myself. In spite of having read various howtos, guides and experimenting alot I'm still not progressing much (no Python nor QT experience before). I need a hand in my first steps. That would be very appreciated.

What I need to get started:

0. Reproduce, in Python, the interface that "Add PostGIS Table(s)" provides (qgsdbsourceselectbase.ui).

I've been unable to, so far. Is there anyone willing to do it? Even a part of it would be great - the connection selector, working "Connect" and "Edit" buttons. If I had these, I would figure out how to proceed with the rest of the interface and more, including:

1. In this dialog add buttons "New", "Delete", "Modify" next to "Add", for respectively, creating a new layer, deleting a selected layer, modyfing attributes of an existing one. All greyed out until a connection to a database is established and a schema, or a layer in the schema, is selected on the list.

2. On pressing the "New" button, a new dialog pops up. It would be based on the "New Vector Layer" (qgsgeomtypedialogbase.ui). A "SRID" selector would be added, at minimum like in the SPIT plugin (qgsspitbase.ui). It would be better though if the "SRID" dialog would be designed so that the user can select from QGIS database of projections (I'll try). The "geometry column name" would default to "wkb_geometry", and let the user enter another name if needed (alike SPIT).

3. Following geometry types would be possible: multipoint, multilinestring, multipolygon. Their "simple" versions (point, linestring, polygon) are not necessary I guess - multi* types can be used to represent any "simple" features too, while they have their added value (eg. you can't "Add Island" to a PostGIS polygon, only to multipolygon) - how do you think?. Is it worth including geometrycollections too?

4. Following attribute types would be available: boolean; Numeric: all; Character: varchar(n), text; Date: all without the time zone (ie. date, time, timestamp, interval). The menu would be based on qgsaddattrdialogbase.ui.

5. On pressing the "Delete", a confirmation dialog would pop up.

6. "Modify" button - TBD later.

The 0 point a show stopper.

Looking forward to your help. If I succeed the plugin is of course going to be published under GPL.

[1] https://svn.qgis.org/trac/ticket/885


More information about the Qgis-developer mailing list