Re: [Qgis-developer] Re: show grid on map canvas (similiar to grid used in composer) - strategy?
Il 14/05/2012 13:43, John Donovan ha scritto: It's marked as experimental, and there are a few things on the TODO list, but it can be found in my plugin repo: http://109.123.122.13/qgis/plugins.xml why not on http://plugins.qgis.org/ ? all the best. -- Paolo Cavallini - Faunalia www.faunalia.eu Full contact details at www.faunalia.eu/pc ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Re: show grid on map canvas (similiar to grid used in composer) - strategy?
As we all know, the plugin approval process is still somewhat slow, and this plugin is under development (not even 'experimental' yet). Could we streamline this process by adding a flag 'development' (similar to experimental) which makes is available to those who allow them? This by all means would be similar to adding the plugin to another repository. Another option would be to add a parallel repository (on the same server as the official, say http://pyqgis.org/repo/dev) which makes all unapproved plugins available? Cheers, Etienne On Tue, May 15, 2012 at 3:57 AM, Paolo Cavallini cavall...@faunalia.it wrote: Il 14/05/2012 13:43, John Donovan ha scritto: It's marked as experimental, and there are a few things on the TODO list, but it can be found in my plugin repo: http://109.123.122.13/qgis/plugins.xml why not on http://plugins.qgis.org/ ? all the best. -- Paolo Cavallini - Faunalia www.faunalia.eu Full contact details at www.faunalia.eu/pc ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Re: show grid on map canvas (similiar to grid used in composer) - strategy?
I tested your plugin with 1.7.4-4 on Mac 10.6.8 and it works fine. One suggestion: maybe allow the rotation for be about a chosen point, instead of only SE corner? That's good to hear. The reason it rotates about the origin is because my main use-case is for archaeological geophysical prospection where there isn't a need for an arbitrary rotation point. That said, it wouldn't be hard to put something in to handle that. -John -- One of the advantages of being disorderly is that one is constantly making exciting discoveries. - AA Milne ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Re: show grid on map canvas (similiar to grid used in composer) - strategy?
Hi John, On Mon, May 14, 2012 at 5:43 AM, John Donovan mersey.vik...@gmail.comwrote: On 13 May 2012 22:49, Etienne Tourigny etourigny@gmail.com wrote: ... Basically I think there could be 2 concurrent and complementary ways to implement grids: 1) basic grid in core, similar to what is already in the composer map (and in my branch) 2) more refined grid(s) as plugin/vector layers, whose rendering order can be fine-tuned Nice work Etienne! Over the weekend, I've knocked up a little plugin of the second type - a plugin layer that uses the new symbology system. It's marked as experimental, and there are a few things on the TODO list, but it can be found in my plugin repo: http://109.123.122.13/qgis/plugins.xml One of the todo's is saving the styling information - I can't find where I can get the XML of the symbol for my writeXml() function. Any ideas? ... I tried your Grid Overlay plugin and this is what I found. Same error as Etienne reported: Traceback (most recent call last): File /home/tourigny/.qgis/python/ plugins/grid_overlay/gridpluginlayer.py, line 63, in draw self.symbol.renderPolyline(polyline, renderContext) ... it also occurs when I cancel the dialog. The plugin layer is made regardless of cancelling dialog on initial plugin launch. When I click the 'Set Style...' button I get this error: Traceback (most recent call last): File /Users/larrys/.qgis/python/plugins/grid_overlay/gridpropertiesdialog.py, line 42, in chooseStyle self, False) TypeError: QgsSymbolV2SelectorDialog(QgsSymbolV2, QgsStyleV2, QgsVectorLayer, QWidget parent=None, bool embedded=False): argument 3 has unexpected type 'GridPropertiesDialog' Is that not implemented yet? I noticed in your metadata.txt and __init__.py you assigned the Layers category, but the action doesn't show up there. Does it need to use the following to be added to/removed from the Layer menu? (worked when I edited gridoverlay.py): self.iface.insertAddLayerAction(self.action_newGrid) self.iface.removeAddLayerAction(self.action_newGrid) Tested with QGIS 1.8 rev.69ef4de on Mac 10.6.8. Looking forward to using your plugin on the current map I am working with. Regards, Larry Shaffer Dakota Cartography Black Hills, South Dakota ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Re: show grid on map canvas (similiar to grid used in composer) - strategy?
Hi Larry and Etienne, Thanks for being brave! On 14 May 2012 18:48, Larry Shaffer lar...@dakotacarto.com wrote: I tried your Grid Overlay plugin and this is what I found. Same error as Etienne reported: Traceback (most recent call last): File /home/tourigny/.qgis/python/ plugins/grid_overlay/gridpluginlayer.py, line 63, in draw self.symbol.renderPolyline(polyline, renderContext) ... That's odd, I'm using 1.7.4 and Python 2.7.2, but I can't imagine the API to have changed. It runs fine on both my Linux and Windows boxes. Looking at the C++ docs, indeed RenderPolyline() takes a QgsFeature as the second parameter, so I'm not sure why it should work for me! it also occurs when I cancel the dialog. The plugin layer is made regardless of cancelling dialog on initial plugin launch. Mea culpa. When I click the 'Set Style...' button I get this error: Traceback (most recent call last): File /Users/larrys/.qgis/python/plugins/grid_overlay/gridpropertiesdialog.py, line 42, in chooseStyle self, False) TypeError: QgsSymbolV2SelectorDialog(QgsSymbolV2, QgsStyleV2, QgsVectorLayer, QWidget parent=None, bool embedded=False): argument 3 has unexpected type 'GridPropertiesDialog' Is that not implemented yet? Another odd one. GridPropertiesDialog, the class in which this function is defined, is inherited from QtGui.QDialog, so should make a valid parent to the symbol selector dialog. I've set it to None on my machine with no ill effects. I noticed in your metadata.txt and __init__.py you assigned the Layers category, but the action doesn't show up there. Does it need to use the following to be added to/removed from the Layer menu? (worked when I edited gridoverlay.py): self.iface.insertAddLayerAction(self.action_newGrid) self.iface.removeAddLayerAction(self.action_newGrid) Ah yes, a copy-and-paste code bug. Ahem... Tested with QGIS 1.8 rev.69ef4de on Mac 10.6.8. Looking forward to using your plugin on the current map I am working with. I'm glad to hear others will be using it, when it works. Regards, John -- One of the advantages of being disorderly is that one is constantly making exciting discoveries. - AA Milne ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Re: show grid on map canvas (similiar to grid used in composer) - strategy?
Hi John, On Mon, May 14, 2012 at 1:36 PM, John Donovan mersey.vik...@gmail.comwrote: Hi Larry and Etienne, Thanks for being brave! On 14 May 2012 18:48, Larry Shaffer lar...@dakotacarto.com wrote: I tried your Grid Overlay plugin and this is what I found. Same error as Etienne reported: Traceback (most recent call last): File /home/tourigny/.qgis/python/ plugins/grid_overlay/gridpluginlayer.py, line 63, in draw self.symbol.renderPolyline(polyline, renderContext) ... That's odd, I'm using 1.7.4 and Python 2.7.2, but I can't imagine the API to have changed. It runs fine on both my Linux and Windows boxes. Looking at the C++ docs, indeed RenderPolyline() takes a QgsFeature as the second parameter, so I'm not sure why it should work for me! 1.7.4 method: QgsLineSymbolV2.renderPolyline(QPolygonF, QgsRenderContext, int layer=-1, bool selected=False) 1.8 method: QgsLineSymbolV2.renderPolyline(QPolygonF, QgsFeature, QgsRenderContext, int layer=-1, bool selected=False) When I click the 'Set Style...' button I get this error: Traceback (most recent call last): File /Users/larrys/.qgis/python/plugins/grid_overlay/gridpropertiesdialog.py, line 42, in chooseStyle self, False) TypeError: QgsSymbolV2SelectorDialog(QgsSymbolV2, QgsStyleV2, QgsVectorLayer, QWidget parent=None, bool embedded=False): argument 3 has unexpected type 'GridPropertiesDialog' Is that not implemented yet? Another odd one. GridPropertiesDialog, the class in which this function is defined, is inherited from QtGui.QDialog, so should make a valid parent to the symbol selector dialog. I've set it to None on my machine with no ill effects. 1.7.4 method: QgsSymbolV2SelectorDialog(QgsSymbolV2, QgsStyleV2, QWidget parent=None, bool embedded=False) 1.8 method: QgsSymbolV2SelectorDialog(QgsSymbolV2, QgsStyleV2, QgsVectorLayer, QWidget parent=None, bool embedded=False) I can't even find this method in the current API docs. Just referenced in the error dialog, and last seen in the 1.7.4 API docs. Didn't see these documented in the API changes part of the wiki [0]. Maybe there is a different, or more up-to-date, listing somewhere. I tested your plugin with 1.7.4-4 on Mac 10.6.8 and it works fine. One suggestion: maybe allow the rotation for be about a chosen point, instead of only SE corner? [0] http://hub.qgis.org/wiki/17/API_changes_for_version_20 Regards, Larry Shaffer Dakota Cartography Black Hills, South Dakota ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer