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

Marco Hugentobler marco.hugentobler at karto.baug.ethz.ch
Fri Oct 19 09:19:55 EDT 2007


Hi Godofredo

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

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

Regards,
Marco


-----Ursprüngliche Nachricht-----
Von: godofredo contreras [mailto:frdcn at hotmail.com]
Gesendet: Di 16.10.2007 23:11
An: Hugentobler  Marco; tim at linfiniti.com; gsherman at mrcc.com; 
otto.dassau at gmx.de
Betreff: Question about changing some code from QgisApp to QGgsDbSourceSelect
 

                
                
                
                Hi:

I'm working with  QGgsDbSourceSelect dialog to unify access to spatial tables 
(ogr and postgres). 
The  layers are added in  QgisApp::addDatabaseLayer(), thinking in usability  
it will be better if we
could add multiple  database  layers  without needing to close and reopen  
QGgsDbSourceSelect,
but this needs that the calls of  QgsVectorLayer and  
QgsMapLayerRegistry::instance()->addMapLayer(layer);
have done from QGgsDbSourceSelect instead of  QgisApp::addDatabaseLayer().

What do you think about this change, or it could be better to add the code to 
manage ogr database layers
in  QgisApp::addDatabaseLayer()?

Best regards
Godofredo Contreras
-- 
Dr. Marco Hugentobler
Institute of Cartography
ETH Zurich
Technical Advisor QGIS Project Steering Committee
marco.hugentobler at karto.baug.ethz.ch



More information about the Qgis-developer mailing list