Hi Martin, <br>sorry for this reply so late.<br><br><div class="gmail_quote">On Thu, Oct 7, 2010 at 11:04 PM, Martin Dobias <span dir="ltr">&lt;<a href="http://wonder.sk">wonder.sk</a>@<a href="http://gmail.com">gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Hi Giuseppe<br>
<div class="im"><br>
On Tue, Oct 5, 2010 at 1:12 AM, Giuseppe Sucameli &lt;<a href="mailto:brush.tyler@gmail.com">brush.tyler@gmail.com</a>&gt; wrote:<br>
&gt; Hi devs,<br>
&gt;<br>
&gt; there is a way to load an editable layer without editing capabilities?<br>
&gt; I searched for a setCapabilities() method, but nothing.<br>
&gt; Reducing the layer capabilities would be useful, especially for plugins,<br>
&gt; obviously<br>
&gt; without adding new capabilities.<br>
&gt;<br>
&gt; In a C++ plugin I can extend the concrete DataProvider class.<br>
&gt; There is a way to do the same thing in a python plugin? Maybe creating a<br>
&gt; wrapper<br>
&gt; to the layer dataProvider?<br>
<br>
</div>I am not aware of such functionality. But it would be possible to add<br>
a pair of methods setReadOnly(bool) and isReadOnly() for the layers.<br>
If set as read only, editing would be disabled.<br></blockquote><div>I think this would be a nice feature for pyplugins developers.<br><br>In this moment the only workaround to make a layer uneditable is creating a <br>plugin window containing a new canvas, then adding the  layer in this new canvas, <br>

but you can neither use   useful tools (e.g all the newest selection tools) or qgis <br>mainwindow capabilities (add layers, move layers, ...).<br><br>I&#39;m going to open a ticket on trac.<br><br>Cheers.<br></div></div>

<br>-- <br>Giuseppe Sucameli<br>