[Qgis-developer] extensions to postgis dialog

Hugentobler Marco marco.hugentobler at karto.baug.ethz.ch
Wed Jan 9 17:48:26 EST 2008


Hi Gavin,

Thanks for looking into this and for the suggestions.

>When there are just a few spatial tables, but in more than one schema, the current implementation has the tree un-expanded. Perhaps if there >are less than, say, 20 tables, the tree should be automatically expanded.

I like this idea and plan to implement it tomorrow. Users with only a few tables will not like to click on the schema nodes each time they load a table.

>I couldn't get the search facility to work - there is no 'do the search' button, and pressing enter just activated the 'close' button.

Oh, that means the search facility did not work for you at all. The search should be performed each time a new character is typed into the line edit. So when a user types in a keyword, he gets a closer subset of tables that match the wildcard/regexp (similar to index -> search in qt assistant). Is this feature working for you?
And I plan to deactivate the enter button for this dialog. 

>From memory my suggestions were that the new column for 'schema' was unnecessary as it always just contained the schema name (and which was >also given in the node of each branch). I would suggest removing the schema column. 

Hm, but if someone has e.g. 100 tables in one schema and the schema branch is expanded, it may not be very convenient to scroll upwards just to look what the schema name was. Maybe when it is in trunk we get more opinions from users and if people don't like it, I will remove the schema column.   

Regards,
Marco

-----Ursprüngliche Nachricht-----
Von: Gavin Macaulay [mailto:gavin at macaulay.co.nz]
Gesendet: Mi 09.01.2008 21:27
An: Hugentobler  Marco
Cc: qgis-developer at qgis.org
Betreff: Re: [Qgis-developer] extensions to postgis dialog
 
Marco,

It probably went only to your email address. Unfortunately I didn't keep a copy. 

>From memory my suggestions were that the new column for 'schema' was unnecessary as it always just contained the schema name (and which was also given in the node of each branch). I would suggest removing the schema column.

When there are just a few spatial tables, but in more than one schema, the current implementation has the tree un-expanded. Perhaps if there are less than, say, 20 tables, the tree should be automatically expanded.

I couldn't get the search facility to work - there is no 'do the search' button, and pressing enter just activated the 'close' button.

Otherwise I think it looks good and works well.

Regards

Gavin

---- Original message ----
>Date: Wed, 9 Jan 2008 08:48:18 +0100
>From: Marco Hugentobler <marco.hugentobler at karto.baug.ethz.ch>  
>Subject: Re: [Qgis-developer] extensions to postgis dialog  
>To: gavin at macaulay.co.nz
>Cc: qgis-developer at qgis.org
>
>Hi Gavin,
>
>I cannot find this mail in my mailbox or in the developer list archives. I 
>somehow must have overlooked it in the tons of mails over new years days. 
>Sorry for that, could you resend the mail?
>
>Regards,
>Marco
>
>Am Dienstag 08 Januar 2008 22:53:34 schrieb Gavin Macaulay:
>> I had a look at and sent off a reply. Did you see it? It had some comments
>> and suggestions.
>>
>> Gavin
>>
>> >Best regards,
>> >Marco
>> >
>> >
>> >-----Ursprüngliche Nachricht-----
>> >Von: godofredo contreras [mailto:frdcn at hotmail.com]
>> >Gesendet: Di 08.01.2008 20:58
>> >An: Hugentobler  Marco
>> >Cc: qgis-developer at lists.qgis.org
>> >Betreff: RE: [Qgis-developer] extensions to postgis dialog
>> >
>> >
>> >Hi Marco:
>> >
>> >I was looking into your patch for postgis dialog and I noticed that in
>> > qgsdbsourceselectbase.ui the encoding combobox is missing. It wont be
>> > used anymore?
>> >
>> >Regards
>> >Godofredo Contreras
>> >
>> >> From: marco.hugentobler at karto.baug.ethz.ch
>> >> To: qgis-developer at lists.qgis.org
>> >> Date: Sat, 29 Dec 2007 16:43:16 +0100
>> >> Subject: Re: [Qgis-developer] extensions to postgis dialog
>> >>
>> >> 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
>> >
>> >_________________________________________________________________
>> >Get the power of Windows + Web with the new Windows Live.
>> >http://www.windowslive.com?ocid=TXT_TAGHM_Wave2_powerofwindows_012008
>> >
>> >_______________________________________________
>> >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




More information about the Qgis-developer mailing list