extensions to postgis dialog

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
18 messages Options
Reply | Threaded
Open this post in threaded view
|

extensions to postgis dialog

Hugentobler  Marco
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
[hidden email]
http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|

Re: extensions to postgis dialog

Tim Sutton
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 <[hidden email]>:

> 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
> [hidden email]
> 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
_______________________________________________
Qgis-developer mailing list
[hidden email]
http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|

Re: extensions to postgis dialog

godofredo contreras
In reply to this post by Hugentobler Marco
Hi Marco:

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.

I have made several changes to this dialog and I have planned some others
I can move your changes later into ogr-plugin-branch after I have finished
with dialog design.

Regards

Godofredo Contreras




> Date: Thu, 13 Dec 2007 16:23:01 +0100

> From: [hidden email]
> To: [hidden email]
> Subject: [Qgis-developer] extensions to postgis dialog
>
> 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
> [hidden email]
> http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-developer


Share life as it happens with the new Windows Live. Share now!
_______________________________________________
Qgis-developer mailing list
[hidden email]
http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|

Re: extensions to postgis dialog

Tim Sutton
Hi Godofredo

One thing I meant to comment about your API proposal was just a
pedantic issue. The QGIS coding style guidelines follow those of Qt
i.e. not using 'get' prefix for accessors. Also normally class names
should not contain abbreviations so QgsConnectionParams would become
QgsConnectionParameters. I know much of the code in QGIS doesnt follow
our own standards ( that will change eventually I hope ) but it is
good to ensure any new stuff does adhere to it to reduce overhead of
getting all the code standards compliant later.

Best regards

Tim

2007/12/13, godofredo contreras <[hidden email]>:

>
> Hi Marco:
>
> 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.
>
> I have made several changes to this dialog and I have planned some others
> I can move your changes later into ogr-plugin-branch after I have finished
> with dialog design.
>
> Regards
>
> Godofredo Contreras
>
>
>
> ________________________________
> > Date: Thu, 13 Dec 2007 16:23:01 +0100
> > From: [hidden email]
> > To: [hidden email]
> > Subject: [Qgis-developer] extensions to postgis dialog
>
> >
> > 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
> > [hidden email]
> >
> http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-developer
>
> ________________________________
> Share life as it happens with the new Windows Live. Share now!
> _______________________________________________
> Qgis-developer mailing list
> [hidden email]
> 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
_______________________________________________
Qgis-developer mailing list
[hidden email]
http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|

Re: extensions to postgis dialog

Hugentobler  Marco
In reply to this post by Tim Sutton
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 <[hidden email]>:
> > 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
> > [hidden email]
> > http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-developer



--
Dr. Marco Hugentobler
Institute of Cartography
ETH Zurich
Technical Advisor QGIS Project Steering Committee
[hidden email]
_______________________________________________
Qgis-developer mailing list
[hidden email]
http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|

Re: extensions to postgis dialog

Tim Sutton
Hi


> 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.

Yes - one of the things I wanted to raise for post 1.0 is implementing
providers as models...the only thing Im not sure of (maybe Martin has
some ideas here) is how it would work with a canvas 'view' which has
multiple models (layers) associated. Certailnly it would work well
with attribute table views. Anyway I'm trying not to get distracted by
post 1.0 ideas now :-)

>
> > 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?
>

Yes sorry I should have realised that - its a good suggestion you  make..

--
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
_______________________________________________
Qgis-developer mailing list
[hidden email]
http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|

Re: extensions to postgis dialog

Martin Dobias
On Dec 14, 2007 2:02 PM, Tim Sutton <[hidden email]> wrote:

> > 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.
>
> Yes - one of the things I wanted to raise for post 1.0 is implementing
> providers as models...the only thing Im not sure of (maybe Martin has
> some ideas here) is how it would work with a canvas 'view' which has
> multiple models (layers) associated. Certailnly it would work well
> with attribute table views. Anyway I'm trying not to get distracted by
> post 1.0 ideas now :-)

Hi,

I still don't get idea why providers should be implemented as models.
In my view the concept of models is different from the concept of
providers. And I don't know what would be the benefit of bending
provider interface to be a model. Our canvas view uses only rendered
image from map renderer so changing the canvas to be actually a view
of provider model would be quite a lot of work, moreover we would need
to work out what to do with map canvas items and tools etc.

But I completely agree to implement attribute table on the model/view
architecture.

Martin
_______________________________________________
Qgis-developer mailing list
[hidden email]
http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|

Re: extensions to postgis dialog

Hugentobler  Marco
In reply to this post by Hugentobler Marco
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 <[hidden email]>:
> > > 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
> > > [hidden email]
> > > http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-developer


--
Dr. Marco Hugentobler
Institute of Cartography
ETH Zurich
Technical Advisor QGIS Project Steering Committee

_______________________________________________
Qgis-developer mailing list
[hidden email]
http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-developer

qgis_postgisdialog_071229.diff (51K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: extensions to postgis dialog

godofredo contreras

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: [hidden email]

> To: [hidden email]
> 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 <[hidden email]>:
> > > > 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
> > > > [hidden email]
> > > > 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. Get it now!
_______________________________________________
Qgis-developer mailing list
[hidden email]
http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|

Re: extensions to postgis dialog

Hugentobler  Marco
Hi Godofredo,

Afaik the encoding combobox is not used for postgis layers in qgis anymore, only for ogr layers. The postgis provider sets client encoding to unicode:

(qgspostgresprovider.cpp, l. 260)
//set client encoding to unicode because QString uses UTF-8 anyway
  QgsDebugMsg("setting client encoding to UNICODE");

  int errcode=PQsetClientEncoding(pd, "UNICODE");

That's why I removed the gui element. But know that I'm thinking about it, you probably need the encoding combo box for loading database layers with ogr? If yes then I'm gonna add the combo box to the code in the patch.

Btw did other developers or users look at the patch too? You know, feature freeze on 10th of January, and it would be really cool to include the patch for 0.9.2...

Best regards,
Marco


-----Ursprüngliche Nachricht-----
Von: godofredo contreras [mailto:[hidden email]]
Gesendet: Di 08.01.2008 20:58
An: Hugentobler  Marco
Cc: [hidden email]
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: [hidden email]
> To: [hidden email]
> 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 <[hidden email]>:
> > > > 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
> > > > [hidden email]
> > > > 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
[hidden email]
http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|

Re: extensions to postgis dialog

godofredo contreras
I will be working with your patch today and tomorrow to adapt it to ogr-branch. Here are some
problems I found when compiling in windows:

CORE_EXPORT macro is missing in qgsdbfilterproxymodel.h and
and in qgsdbtablemodel.h for being able to link in windows.

Regarding to encoding combobox I haven´t used it  with ogr but not
sure if it will be needed .

Regards

Godofredo Contreras

> Subject: AW: [Qgis-developer] extensions to postgis dialog

> Date: Tue, 8 Jan 2008 21:18:34 +0100
> From: [hidden email]
> To: [hidden email]
> CC: [hidden email]
>
> Hi Godofredo,
>
> Afaik the encoding combobox is not used for postgis layers in qgis anymore, only for ogr layers. The postgis provider sets client encoding to unicode:
>
> (qgspostgresprovider.cpp, l. 260)
> //set client encoding to unicode because QString uses UTF-8 anyway
> QgsDebugMsg("setting client encoding to UNICODE");
>
> int errcode=PQsetClientEncoding(pd, "UNICODE");
>
> That's why I removed the gui element. But know that I'm thinking about it, you probably need the encoding combo box for loading database layers with ogr? If yes then I'm gonna add the combo box to the code in the patch.
>
> Btw did other developers or users look at the patch too? You know, feature freeze on 10th of January, and it would be really cool to include the patch for 0.9.2...
>
> Best regards,
> Marco
>
>
> -----Ursprüngliche Nachricht-----
> Von: godofredo contreras [mailto:[hidden email]]
> Gesendet: Di 08.01.2008 20:58
> An: Hugentobler Marco
> Cc: [hidden email]
> 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: [hidden email]
> > To: [hidden email]
> > 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 <[hidden email]>:
> > > > > 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
> > > > > [hidden email]
> > > > > 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
>


Put your friends on the big screen with Windows Vista® + Windows Live™. Start now!
_______________________________________________
Qgis-developer mailing list
[hidden email]
http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|

Re: extensions to postgis dialog

Gavin Macaulay
In reply to this post by Hugentobler Marco
Marco,

>Btw did other developers or users look at the patch too? You know, feature freeze on 10th of January, and it would be really cool to include the patch for 0.9.2...

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:[hidden email]]
>Gesendet: Di 08.01.2008 20:58
>An: Hugentobler  Marco
>Cc: [hidden email]
>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: [hidden email]
>> To: [hidden email]
>> 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 <[hidden email]>:
>> > > > 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
>> > > > [hidden email]
>> > > > 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
>[hidden email]
>http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-developer
_______________________________________________
Qgis-developer mailing list
[hidden email]
http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|

Re: extensions to postgis dialog

Hugentobler  Marco
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:[hidden email]]
> >Gesendet: Di 08.01.2008 20:58
> >An: Hugentobler  Marco
> >Cc: [hidden email]
> >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: [hidden email]
> >> To: [hidden email]
> >> 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
<[hidden email]>:

> >> > > > 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
> >> > > > [hidden email]
> >> > > > 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
> >[hidden email]
> >http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-developer



--
Dr. Marco Hugentobler
Institute of Cartography
ETH Zurich
Technical Advisor QGIS Project Steering Committee
_______________________________________________
Qgis-developer mailing list
[hidden email]
http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|

Re: extensions to postgis dialog

Gavin Macaulay
In reply to this post by Hugentobler Marco
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 <[hidden email]>  
>Subject: Re: [Qgis-developer] extensions to postgis dialog  
>To: [hidden email]
>Cc: [hidden email]
>
>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:[hidden email]]
>> >Gesendet: Di 08.01.2008 20:58
>> >An: Hugentobler  Marco
>> >Cc: [hidden email]
>> >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: [hidden email]
>> >> To: [hidden email]
>> >> 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
><[hidden email]>:
>> >> > > > 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
>> >> > > > [hidden email]
>> >> > > > 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
>> >[hidden email]
>> >http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-developer
>
>
>
>--
>Dr. Marco Hugentobler
>Institute of Cartography
>ETH Zurich
>Technical Advisor QGIS Project Steering Committee
_______________________________________________
Qgis-developer mailing list
[hidden email]
http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|

Re: extensions to postgis dialog

Hugentobler  Marco
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:[hidden email]]
Gesendet: Mi 09.01.2008 21:27
An: Hugentobler  Marco
Cc: [hidden email]
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 <[hidden email]>  
>Subject: Re: [Qgis-developer] extensions to postgis dialog  
>To: [hidden email]
>Cc: [hidden email]
>
>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:[hidden email]]
>> >Gesendet: Di 08.01.2008 20:58
>> >An: Hugentobler  Marco
>> >Cc: [hidden email]
>> >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: [hidden email]
>> >> To: [hidden email]
>> >> 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
><[hidden email]>:
>> >> > > > 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
>> >> > > > [hidden email]
>> >> > > > 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
>> >[hidden email]
>> >http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-developer
>
>
>
>--
>Dr. Marco Hugentobler
>Institute of Cartography
>ETH Zurich
>Technical Advisor QGIS Project Steering Committee

_______________________________________________
Qgis-developer mailing list
[hidden email]
http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|

Re: extensions to postgis dialog

Gavin Macaulay
In reply to this post by Hugentobler Marco
Marco,

I'll have a look at the search again tonight to see if it actually works for me.

Fair comment about the schema column - some more opinion on it would be good. For 95% of my uses, the column is not required (everything is in a couple of schema) and it just takes up extra column space that would be more useful in the SQL column.

Regards

Gavin

---- Original message ----

>Date: Wed, 9 Jan 2008 23:48:26 +0100
>From: "Hugentobler  Marco" <[hidden email]>  
>Subject: AW: [Qgis-developer] extensions to postgis dialog  
>To: <[hidden email]>
>Cc: <[hidden email]>
>
>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:[hidden email]]
>Gesendet: Mi 09.01.2008 21:27
>An: Hugentobler  Marco
>Cc: [hidden email]
>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 <[hidden email]>  
>>Subject: Re: [Qgis-developer] extensions to postgis dialog  
>>To: [hidden email]
>>Cc: [hidden email]
>>
>>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:[hidden email]]
>>> >Gesendet: Di 08.01.2008 20:58
>>> >An: Hugentobler  Marco
>>> >Cc: [hidden email]
>>> >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: [hidden email]
>>> >> To: [hidden email]
>>> >> 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
>><[hidden email]>:
>>> >> > > > 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
>>> >> > > > [hidden email]
>>> >> > > > 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
>>> >[hidden email]
>>> >http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-developer
>>
>>
>>
>>--
>>Dr. Marco Hugentobler
>>Institute of Cartography
>>ETH Zurich
>>Technical Advisor QGIS Project Steering Committee
>
_______________________________________________
Qgis-developer mailing list
[hidden email]
http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|

Re: extensions to postgis dialog

Gavin Macaulay
In reply to this post by Hugentobler Marco
Marco,

Yes, searching isn't working. I've had a look at the code and as far as I can see it's working fine. If I replace the line:

 return QSortFilterProxyModel::filterAcceptsRow(row, source_parent)

in QgsDbFilterProxyModel with 'return false', no tables show as expect, so it looks like the filters aren't getting used. I assume that typing 'a' in the filter box should just show rows that have an 'a' in them?

Anything that I could try to debug the problem?

I'm using Qt 4.2.3 under linux (suse 10.2).

Regards

Gavin

---- Original message ----

>Date: Wed, 9 Jan 2008 23:48:26 +0100
>From: "Hugentobler  Marco" <[hidden email]>  
>Subject: AW: [Qgis-developer] extensions to postgis dialog  
>To: <[hidden email]>
>Cc: <[hidden email]>
>
>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:[hidden email]]
>Gesendet: Mi 09.01.2008 21:27
>An: Hugentobler  Marco
>Cc: [hidden email]
>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 <[hidden email]>  
>>Subject: Re: [Qgis-developer] extensions to postgis dialog  
>>To: [hidden email]
>>Cc: [hidden email]
>>
>>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:[hidden email]]
>>> >Gesendet: Di 08.01.2008 20:58
>>> >An: Hugentobler  Marco
>>> >Cc: [hidden email]
>>> >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: [hidden email]
>>> >> To: [hidden email]
>>> >> 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
>><[hidden email]>:
>>> >> > > > 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
>>> >> > > > [hidden email]
>>> >> > > > 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
>>> >[hidden email]
>>> >http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-developer
>>
>>
>>
>>--
>>Dr. Marco Hugentobler
>>Institute of Cartography
>>ETH Zurich
>>Technical Advisor QGIS Project Steering Committee
>
_______________________________________________
Qgis-developer mailing list
[hidden email]
http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|

Re: extensions to postgis dialog

Hugentobler  Marco
Hi Gavin,

I made some more tests: the problem is only if the search is done with all columns, as soon as I choose e.g search in 'Table' column, it works. The search in all columns work for me with Qt 4.3.2, but not with 4.2.2 and also not with 4.3. I suppose it is a bug in those Qt versions related to the function QSortFilterProxyModel::setFilterKeyColumn(int). This function should filter in all columns with -1 as argument, but it seems it only does so with 4.3.2.

As a workaround, I set the search to the 'Table' column only per default (can be changed with the combo box of course).

Regards,
Marco


-----Ursprüngliche Nachricht-----
Von: Gavin Macaulay [mailto:[hidden email]]
Gesendet: Do 10.01.2008 09:16
An: Hugentobler  Marco
Cc: [hidden email]
Betreff: Re: AW: [Qgis-developer] extensions to postgis dialog
 
Marco,

Yes, searching isn't working. I've had a look at the code and as far as I can see it's working fine. If I replace the line:

 return QSortFilterProxyModel::filterAcceptsRow(row, source_parent)

in QgsDbFilterProxyModel with 'return false', no tables show as expect, so it looks like the filters aren't getting used. I assume that typing 'a' in the filter box should just show rows that have an 'a' in them?

Anything that I could try to debug the problem?

I'm using Qt 4.2.3 under linux (suse 10.2).

Regards

Gavin

---- Original message ----

>Date: Wed, 9 Jan 2008 23:48:26 +0100
>From: "Hugentobler  Marco" <[hidden email]>  
>Subject: AW: [Qgis-developer] extensions to postgis dialog  
>To: <[hidden email]>
>Cc: <[hidden email]>
>
>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:[hidden email]]
>Gesendet: Mi 09.01.2008 21:27
>An: Hugentobler  Marco
>Cc: [hidden email]
>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 <[hidden email]>  
>>Subject: Re: [Qgis-developer] extensions to postgis dialog  
>>To: [hidden email]
>>Cc: [hidden email]
>>
>>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:[hidden email]]
>>> >Gesendet: Di 08.01.2008 20:58
>>> >An: Hugentobler  Marco
>>> >Cc: [hidden email]
>>> >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: [hidden email]
>>> >> To: [hidden email]
>>> >> 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
>><[hidden email]>:
>>> >> > > > 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
>>> >> > > > [hidden email]
>>> >> > > > 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
>>> >[hidden email]
>>> >http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-developer
>>
>>
>>
>>--
>>Dr. Marco Hugentobler
>>Institute of Cartography
>>ETH Zurich
>>Technical Advisor QGIS Project Steering Committee
>

_______________________________________________
Qgis-developer mailing list
[hidden email]
http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-developer