https://issues.qgis.org/https://issues.qgis.org/favicon.ico2011-01-28T05:44:25ZQGIS Issue TrackingQGIS Application - Feature request #3447: Grouping "add layer" toolbar buttonshttps://issues.qgis.org/issues/3447?journal_id=240462011-01-28T05:44:25ZTim Suttontim@linfiniti.com
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>In Progress</i></li></ul> QGIS Application - Feature request #3447: Grouping "add layer" toolbar buttonshttps://issues.qgis.org/issues/3447?journal_id=240472011-01-28T06:06:05ZTim Suttontim@linfiniti.com
<ul></ul><p>Applied with <a class="changeset" href="https://issues.qgis.org/projects/qgis/repository/revisions/58bd7acd6ac07ca7fda15e37e7ee2091a185325f" title="Applied patch from #3447. Button group for add layer git-svn-id: http://svn.osgeo.org/qgis/trunk...">58bd7acd</a> (SVN r15095). However I think we should have all add layers except Add vector and Add raster in the group. There are still a number of icons not in the group that could go in - sqlanywhere, wfs etc. I was thinking we could have a <a class="wiki-page new" href="https://issues.qgis.org/projects/qgis/wiki/QgisApp">QgisApp</a>::addLayerLoaderAction(QAction *) that providers could call to have their icon dropped into the group.</p>
<p>Regards</p>
<p>Tim</p> QGIS Application - Feature request #3447: Grouping "add layer" toolbar buttonshttps://issues.qgis.org/issues/3447?journal_id=240482011-01-30T22:47:50ZJürgen Fischerjef@norbit.de
<ul></ul><p>Replying to [comment:3 timlinux]:</p>
<blockquote>
<p>I was thinking we could have a <a class="wiki-page new" href="https://issues.qgis.org/projects/qgis/wiki/QgisApp">QgisApp</a>::addLayerLoaderAction(QAction *) that providers could call to have their icon dropped into the group.</p>
</blockquote>
<p>And also drop the "providers don't have a UI" rule?</p> QGIS Application - Feature request #3447: Grouping "add layer" toolbar buttonshttps://issues.qgis.org/issues/3447?journal_id=240492011-01-30T23:11:45ZMartin Dobiaswonder.sk@gmail.com
<ul></ul><p>Replying to [comment:4 jef]:</p>
<blockquote>
<p>Replying to [comment:3 timlinux]:</p>
<blockquote>
<p>I was thinking we could have a <a class="wiki-page new" href="https://issues.qgis.org/projects/qgis/wiki/QgisApp">QgisApp</a>::addLayerLoaderAction(QAction *) that providers could call to have their icon dropped into the group.</p>
</blockquote>
<p>And also drop the "providers don't have a UI" rule?</p>
</blockquote>
<p>I remember we started this rule long time ago when it was normal that provider constructor or nextFeature call showed a message box :-)</p>
<p>IMO we should move the "add layer" dialogs (which are specific to each provider) to the providers and add a new API method to provider modules that would create provider's add layer dialog.</p>
<p>A next step could be an unified add layer dialog: main window would contain just one "add layer" action that would trigger a dialog having all the provider dialogs inside (dialogs would be switched with a stacked widget).</p>
<p>(Pure imagination begins now) At some point, we could reach a situation where we have an integrated dialog with a file browser, database/web connections, "favorite" layers, "last used" layers and similar stuff, with good usability and minimized amount of necessary clicks per one layer.</p> QGIS Application - Feature request #3447: Grouping "add layer" toolbar buttonshttps://issues.qgis.org/issues/3447?journal_id=240502011-01-30T23:19:16ZTim Suttontim@linfiniti.com
<ul></ul><p>Replying to [comment:5 wonder]:</p>
<blockquote>
<p>Replying to [comment:4 jef]:</p>
<blockquote>
<p>Replying to [comment:3 timlinux]:</p>
<blockquote>
<p>I was thinking we could have a <a class="wiki-page new" href="https://issues.qgis.org/projects/qgis/wiki/QgisApp">QgisApp</a>::addLayerLoaderAction(QAction *) that providers could call to have their icon dropped into the group.</p>
</blockquote>
<p>And also drop the "providers don't have a UI" rule?</p>
</blockquote></blockquote>
<p>Sorry I had actually meant to write 'that a provider's gui plugin could call'.</p>
<blockquote>
<p>I remember we started this rule long time ago when it was normal that provider constructor or nextFeature call showed a message box :-)</p>
<p>IMO we should move the "add layer" dialogs (which are specific to each provider) to the providers and add a new API method to provider modules that would create provider's add layer dialog.</p>
<p>A next step could be an unified add layer dialog: main window would contain just one "add layer" action that would trigger a dialog having all the provider dialogs inside (dialogs would be switched with a stacked widget).</p>
<p>(Pure imagination begins now) At some point, we could reach a situation where we have an integrated dialog with a file browser, database/web connections, "favorite" layers, "last used" layers and similar stuff, with good usability and minimized amount of necessary clicks per one layer.</p>
</blockquote>
<p>I think there is still a good reason to avoid GUI interaction at the provider level. For example if we are creating an embedded (e.g. android) version of QGIS it may be that we want a completely different UI for adding layers than the desktop one. Then it may be better / easier to simply replace / tweak the plugin implementations themselves and leave the providers untouched.</p>
<p>@wonder Regards your other thoughts on a grand central station for provders, +1 from me - its quite cumbersome our current system (both to use and to explain to novices) and it would be nice to get them all together into a drawer etc paradigm.</p>
<p>Regards</p>
<p>Tim</p> QGIS Application - Feature request #3447: Grouping "add layer" toolbar buttonshttps://issues.qgis.org/issues/3447?journal_id=240512011-01-31T01:19:53ZJürgen Fischerjef@norbit.de
<ul></ul><p>Replying to [comment:5 wonder]:</p>
<blockquote>
<p>(Pure imagination begins now) At some point, we could reach a situation where<br />we have an integrated dialog with a file browser, database/web connections,<br />"favorite" layers, "last used" layers and similar stuff, with good usability<br />and minimized amount of necessary clicks per one layer.</p>
</blockquote>
<p>Yes and being at it, we shouldn't stop there and also add a way to show<br />provider specific layer properties (probably very useful for raster providers<br />especially WMS).</p> QGIS Application - Feature request #3447: Grouping "add layer" toolbar buttonshttps://issues.qgis.org/issues/3447?journal_id=240522011-01-31T13:59:15ZMartin Dobiaswonder.sk@gmail.com
<ul></ul><p>Replying to [comment:6 timlinux]:</p>
<blockquote>
<p>I think there is still a good reason to avoid GUI interaction at the provider level. For example if we are creating an embedded (e.g. android) version of QGIS it may be that we want a completely different UI for adding layers than the desktop one. Then it may be better / easier to simply replace / tweak the plugin implementations themselves and leave the providers untouched.</p>
</blockquote>
<p>What I had in my mind is that provider code would be untouched, just the code from their accompanying plugins would be added to the provider - instead of having it in a separate module. Now it is a mess: some providers have their dialogs directly in the src/app (ogr, postgres), while others have a plugin that only shows gui for loading layers from that provider. In order to use that provider, the user has to explicitly enable the plugin. Is that necessary?</p>
<p>Regarding the mobile interface, I don't see a reason why an alternative gui couldn't be added to a provider.</p>
<blockquote>
<p>@wonder Regards your other thoughts on a grand central station for provders, +1 from me - its quite cumbersome our current system (both to use and to explain to novices) and it would be nice to get them all together into a drawer etc paradigm.</p>
</blockquote>
<p>Yeah. Looking at the changes by the patch attached here, I have the impression that grouping the action in the way it is done now is merely a step back rather than a progress. It saves some space but sacrifices the usability as the plugins still create ungrouped actions. (I would suggest a revert until we have a better solution)</p>
<p>Martin</p> QGIS Application - Feature request #3447: Grouping "add layer" toolbar buttonshttps://issues.qgis.org/issues/3447?journal_id=240532011-01-31T23:22:56ZMarco Hugentoblermarco.hugentobler@sourcepole.ch
<ul></ul><p>A great benefit of bringing the dialogs into the provider libs is that dialogs could link to provider classes and using specific provider methods. E.g. the WMS dialog could pass the WMS capabilities document directly to the provider. Currently, WMS dialog fetches the capabilities and the WMS provider needs to fetch it again because the dialog has no possibility to communicate with the WMS provider directly (only through the provider interface that is common for all providers).</p>
<p>Regarding grouping the addLayer buttons: I like it because it because of the additional space I get. Couldn't we just export the toolbutton such that plugins could add their buttons there too? Additionally, we talked about bringing wfs, gps plugins into app (or into providers depending on the outcome of above discussion).</p>
<p>Regards,<br />Marco</p> QGIS Application - Feature request #3447: Grouping "add layer" toolbar buttonshttps://issues.qgis.org/issues/3447?journal_id=240542011-02-01T00:46:33ZMartin Dobiaswonder.sk@gmail.com
<ul></ul><p>Replying to [comment:9 mhugent]:</p>
<blockquote>
<p>A great benefit of bringing the dialogs into the provider libs is that dialogs could link to provider classes and using specific provider methods. E.g. the WMS dialog could pass the WMS capabilities document directly to the provider. Currently, WMS dialog fetches the capabilities and the WMS provider needs to fetch it again because the dialog has no possibility to communicate with the WMS provider directly (only through the provider interface that is common for all providers).</p>
</blockquote>
<p>Right. I see one more benefit: the dependencies (e.g. postgresql library for postgis) will be only inside the provider module. Therefore if the user has a mismatch in the libraries, there will be a lower chance that QGIS will fail to start (only the affected provider won't be loaded).</p>
<p>While we're at it, I would also suggest to move "new layer" functionality to the providers. Nowadays we can create new layer with ogr and spatialite backends, though the implementation is in src/app. If we had that functionality within providers, it would be possible to create new layers seamlessly also in plugins and implement "new layer" feature for further providers.</p>
<blockquote>
<p>Regarding grouping the addLayer buttons: I like it because it because of the additional space I get. Couldn't we just export the toolbutton such that plugins could add their buttons there too? Additionally, we talked about bringing wfs, gps plugins into app (or into providers depending on the outcome of above discussion).</p>
</blockquote>
<p>Yes, putting the other "add layer" buttons into the group is necessary. Exporting the toolbutton group can be a temporary solution.</p>
<p>Martin</p> QGIS Application - Feature request #3447: Grouping "add layer" toolbar buttonshttps://issues.qgis.org/issues/3447?journal_id=240552011-02-01T09:29:13ZJürgen Fischerjef@norbit.de
<ul></ul><p>Replying to [comment:10 wonder]:</p>
<blockquote>
<p>Right. I see one more benefit: the dependencies (e.g. postgresql library for<br />postgis) will be only inside the provider module. Therefore if the user has a<br />mismatch in the libraries, there will be a lower chance that QGIS will fail<br />to start (only the affected provider won't be loaded).</p>
<p>While we're at it, I would also suggest to move "new layer" functionality to<br />the providers. Nowadays we can create new layer with ogr and spatialite<br />backends, though the implementation is in src/app. If we had that<br />functionality within providers, it would be possible to create new layers<br />seamlessly also in plugins and implement "new layer" feature for further<br />providers.</p>
</blockquote>
<p>+1</p>
<p>Wait a minute - dejavu:<br /><a class="external" href="http://lists.osgeo.org/pipermail/qgis-developer/2008-April/003647.html">http://lists.osgeo.org/pipermail/qgis-developer/2008-April/003647.html</a> ff</p>
<p>Jürgen</p> QGIS Application - Feature request #3447: Grouping "add layer" toolbar buttonshttps://issues.qgis.org/issues/3447?journal_id=240562011-02-04T01:33:12ZTim Suttontim@linfiniti.com
<ul><li><strong>Resolution</strong> set to <i>wontfix</i></li><li><strong>Status</strong> changed from <i>In Progress</i> to <i>Closed</i></li></ul><p>As per the discussion above, I have rolled back this commit as I agree it does not improve usability.</p>
<p>Side note: How nice is git! I just did this:</p>
<pre>
git revert d1dfeae396b244bcb76076ef9ab80bfc42d05587
</pre>
<p>And it removed the patch for me. Cool bananas....</p>
<p>I'm going to mark this one as 'wont fix' and close it...</p>
<p>Tim</p>