[Qgis-developer] extensions to postgis dialog

Marco Hugentobler marco.hugentobler at karto.baug.ethz.ch
Sat Dec 29 10:43:16 EST 2007


Hi all,

Here is the patch that adds a tree view and options for table search to the 
postgis dialog. Please test it and report bugs and/or comments.

There are two new classes derived from Qt model in this patch. One is the base 
model and the second one a proxy model that adds the capability of filtering 
according to wildcard or regexp. 

cheers,
Marco

Am Freitag 14 Dezember 2007 13:44:12 schrieb Marco Hugentobler:
> Hi Godofredo and Tim,
>
> Thanks for your feedback. So I'll make a patch for svn head with the
> proposed extensions.
>
> > Could I suggest using Qt model/view for this - whever list become lone
> > I think the model / view approach will always be more efficient. It
> > also has QSortFilterProxModel by which you can easily add sorting and
> > filtering.
>
> This is a good idea. QSortFilterProxModel will certainly help me with
> filtering.
> Reading through the Qt documentation, the model/view concept seems to be a
> very flexible way of accessing and displaying data. In a way, the qgis
> vector data provider is also a model.
>
> > I was going to suggest also that we create src/models and src/views
> > for any custom models and views we create.
>
> As models are always non-gui related and views are dialogs, would it make
> sense to have src/core/models and src/app/views?
>
> >I think is a good idea, but how could we deal with databases that don´t
> > use schemas
> >like mysql? maybe in this case we could place all tables into public
> > schema.
>
> Also possible would be to introduce a schema name "" (empty string)
> or "default". I suppose you just ignore the schema name when accessing
> mysql databases?
>
> Regards,
> Marco
>
> On Thursday 13 December 2007 17:03:20 Tim Sutton wrote:
> > Hi
> >
> > Could I suggest using Qt model/view for this - whever list become lone
> > I think the model / view approach will always be more efficient. It
> > also has QSortFilterProxModel by which you can easily add sorting and
> > filtering.
> >
> > http://doc.trolltech.com/4.3/qsortfilterproxymodel.html#details
> >
> > I was going to suggest also that we create src/models and src/views
> > for any custom models and views we create.
> >
> > Regards
> >
> > Tim
> >
> > 2007/12/13, Hugentobler  Marco <marco.hugentobler at karto.baug.ethz.ch>:
> > > Hi,
> > >
> > > The list of tables in the postgis connection dialog may become quite
> > > long for users that have a lot of tables and views. I therefore would
> > > like the following extensions:
> > >
> > > -Convert the table widget to a tree widget. For every schema, there
> > > would an item that can be expanded/collapsed and contains the
> > > tables/views of the schema. Like this, there will be much better
> > > overview in situations with many schemas/tables/views.
> > >
> > > -Add a line edit that takes regular expressions and, if not empty,
> > > displays only the entries where the table name matches the regular
> > > expression.
> > >
> > > Are there any objections or suggestions to this?
> > > Godofredo, does this fit together with the work you are doing in the
> > > ogr-plugin-branch and shall I code the dialog extensions also into this
> > > branch?
> > >
> > > Regards,
> > > Marco
> > >
> > >
> > > _______________________________________________
> > > Qgis-developer mailing list
> > > Qgis-developer at lists.qgis.org
> > > http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-developer



-- 
Dr. Marco Hugentobler
Institute of Cartography
ETH Zurich
Technical Advisor QGIS Project Steering Committee
-------------- next part --------------
A non-text attachment was scrubbed...
Name: qgis_postgisdialog_071229.diff
Type: text/x-diff
Size: 51420 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/qgis-developer/attachments/20071229/4c5bb276/qgis_postgisdialog_071229.bin


More information about the Qgis-developer mailing list