[Qgis-developer] Question about changing some code from QgisAppto QGgsDbSourceSelect

godofredo contreras frdcn at hotmail.com
Mon Oct 22 10:34:13 EDT 2007


Thank you Marco for your answers. I will place the code to create ogr database layers in
 QGisApp::addDatabaseLayer and keep QGgsDbSourceSelect returning the list of layers
to be added.

Best regards
Godofredo Contreras




> Subject: AW: [Qgis-developer] Question about changing some code from QgisAppto QGgsDbSourceSelect
> Date: Fri, 19 Oct 2007 21:57:52 +0200
> From: marco.hugentobler at karto.baug.ethz.ch
> To: frdcn at hotmail.com
> CC: qgis-developer at lists.qgis.org
> 
> Hi Godofredo
> 
> >I was thinking to create the selected layers of one database when pressing the
> >add button in QGgsDbSourceSelect. Because the gui elements of dialog will be
> >the same to postgres databases and ogr databases, I was also thinking in add
> >a disconnect button to  close the actual connection being able to choose another
> >connection, maybe of different type and populate again the list of tables, being
> >possible to add another set of tables without closing the dialog.
> 
> Hm, but if a user just adds layers from one database, he needs to press the close button for the dialog to disappear? In my opinion, it gets less usable for the case where only one database is added. And the one database case happens probably more often than the several database case. Also, it would not be consistent with the behaviour of the dialogs to add ogr file layers and raster layers any more. I'm therefore in favour to keep the current behaviour of the database dialog that disappears after adding layers from one database. 
> 
> >This is the how postgres vector is added actually.
> 
> Currently, postgres provider is hardcoded in QGisApp::addDatabaseLayer instead taken from the dialog. But yes, it is similar to current situation.
> 
> Regards,
> Marco
> 
> -----Ursprüngliche Nachricht-----
> Von: godofredo contreras [mailto:frdcn at hotmail.com]
> Gesendet: Fr 19.10.2007 17:37
> An: Hugentobler  Marco
> Cc: qgis-developer at lists.qgis.org
> Betreff: RE: [Qgis-developer] Question about changing some code from QgisAppto QGgsDbSourceSelect
>  
> 
> Hi Marco:
> 
> > >thinking in usability  it will be better if we
> > >could add multiple  database  layers  without needing to close and reopen  
> > QGgsDbSourceSelect
> > 
> > It is possible to add multiple tables from one database by selecting and 
> > holding the ctrl key pressed. Or do you mean to add layers from multiple 
> > databases with one dialog? If yes, how do you intend to change the gui 
> > elements in the dialog?
> 
> I was thinking to create the selected layers of one database when pressing the
> add button in QGgsDbSourceSelect. Because the gui elements of dialog will be
> the same to postgres databases and ogr databases, I was also thinking in add
> a disconnect button to  close the actual connection being able to choose another
> connection, maybe of different type and populate again the list of tables, being
> possible to add another set of tables without closing the dialog.
>  
> > >What do you think about this change, or it could be better to add the code to 
> > manage ogr database layers
> > >in  QgisApp::addDatabaseLayer()?
> > 
> > Maybe QgsDbSourceSelect should just give back a list of urls and provider 
> > strings and QgisApp::addDatabaseLayer() just create the vector layers with 
> > this information. That way, the assembly of the database urls for postgres- 
> > or ogr-database layers could happen inside QGgsDbSourceSelect class. Does 
> > that make sense?
> > 
> This is the how postgres vector is added actually.
> 
> 
> _________________________________________________________________
> Peek-a-boo FREE Tricks & Treats for You!
> http://www.reallivemoms.com?ocid=TXT_TAGHM&loc=us
> 

_________________________________________________________________
Climb to the top of the charts!  Play Star Shuffle:  the word scramble challenge with star power.
http://club.live.com/star_shuffle.aspx?icid=starshuffle_wlmailtextlink_oct
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/qgis-developer/attachments/20071022/ac0661b6/attachment.html


More information about the Qgis-developer mailing list