Hi Martin. <br>Thanks, with this change the qml file is saved.<br><br>Regards.<br><br>Germán<br><br><div class="gmail_quote">El 12 de agosto de 2009 03:19, Martin Dobias <span dir="ltr"><<a href="http://wonder.sk">wonder.sk</a>@<a href="http://gmail.com">gmail.com</a>></span> escribió:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi German,<br>
<br>
2009/8/12 Germán Carrillo <<a href="mailto:carrillo.german@gmail.com">carrillo.german@gmail.com</a>>:<br>
<div class="im">> Hi all. I'm trying to emulate the symbology dialog for a Python application<br>
> but I have a trouble.<br>
><br>
> When I'm working with QgsGraduatedSymbolRenderer and I try to save the style<br>
> to a qml file using the saveNamedStyle() method I get the following message:<br>
><br>
> Could not save symbology because:<br>
><br>
> renderer failed to save<br>
><br>
> And in the command line:<br>
> NotImplementedError: QgsGraduatedSymbolRenderer.writeXML() is abstract and<br>
> must be overridden<br>
><br>
> With the other renderer classes (QgsContinuousColorRenderer,<br>
> QgsSingleSymbolRenderer, QgsUniqueValueRenderer) the saveNamedStyle()<br>
> method works well and the qml file is saved without any problem.<br>
<br>
</div>I suspect this might be due missing 'const' classifier in<br>
QgsGraduatedSymbolRenderer wrapper.<br>
<br>
In python/core/qgsgraduatedsymbolrenderer.sip, line 68:<br>
virtual bool writeXML( QDomNode & layer_node, QDomDocument & document,<br>
QgsVectorLayer& vl ) const;<br>
Try to alter "QgsVectorLayer&" to "const QgsVectorLayer&" and<br>
recompile the bindings.<br>
<br>
If it helps, please give me feedback and I'll fix it in SVN.<br>
<font color="#888888"><br>
Martin<br>
</font></blockquote></div><br>-- <br>-----------<br> |\__ <br>(:>__)(<br> |/ <br><br>Soluciones Geoinformáticas Libres <br><a href="http://geotux.tuxfamily.org/">http://geotux.tuxfamily.org/</a><br>
<br>