<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
The API seems to make that not too hard ;)<br>
<br>
<a class="moz-txt-link-freetext" href="http://qgis.org/api/classQgsMapLayerRegistry.html#a3d0d19c86467341bdd62471c5de61376">http://qgis.org/api/classQgsMapLayerRegistry.html#a3d0d19c86467341bdd62471c5de61376</a><br>
<br>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<table class="memname" style="font-weight: bold; font-style: normal;
font-variant: normal; font-stretch: normal; font-size: 14px;
line-height: 22px; font-family: Roboto, sans-serif; margin-left:
6px;">
<tbody>
<tr>
<td class="memname" style="font-weight: bold; margin-left:
6px; vertical-align: bottom;"><a class="el"
href="http://qgis.org/api/classQgsMapLayer.html"
style="color: rgb(70, 101, 162); font-weight: bold;
text-decoration: none;">QgsMapLayer</a><span
class="Apple-converted-space"> </span>*
QgsMapLayerRegistry::addMapLayer</td>
<td style="vertical-align: bottom;">(</td>
<td class="paramtype" style="white-space: nowrap;
vertical-align: bottom;"><a class="el"
href="http://qgis.org/api/classQgsMapLayer.html"
style="color: rgb(70, 101, 162); font-weight: bold;
text-decoration: none;">QgsMapLayer</a><span
class="Apple-converted-space"> </span>* </td>
<td class="paramname" style="color: rgb(96, 32, 32);
white-space: nowrap; vertical-align: bottom;"><em
style="font-style: normal;">theMapLayer</em>,</td>
</tr>
<tr>
<td class="paramkey" style="text-align: right; vertical-align:
bottom;"><br>
</td>
<td style="vertical-align: bottom;"><br>
</td>
<td class="paramtype" style="white-space: nowrap;
vertical-align: bottom;">bool </td>
<td class="paramname" style="color: rgb(96, 32, 32);
white-space: nowrap; vertical-align: bottom;"><em
style="font-style: normal;">addToLegend</em><span
class="Apple-converted-space"> </span>=<span
class="Apple-converted-space"> </span><code
style="line-height: 14px;">true</code>,</td>
</tr>
<tr>
<td class="paramkey" style="text-align: right; vertical-align:
bottom;"><br>
</td>
<td style="vertical-align: bottom;"><br>
</td>
<td class="paramtype" style="white-space: nowrap;
vertical-align: bottom;">bool </td>
<td class="paramname" style="color: rgb(96, 32, 32);
white-space: nowrap; vertical-align: bottom;"><em
style="font-style: normal;">takeOwnership</em><span
class="Apple-converted-space"> </span>=<span
class="Apple-converted-space"> </span><code
style="line-height: 14px;">true</code> </td>
</tr>
<tr>
<td style="vertical-align: bottom; color: rgb(37, 53, 85);
font-family: Roboto, sans-serif; font-size: 14px;
font-style: normal; font-variant: normal; font-weight: bold;
letter-spacing: normal; line-height: 22px; orphans: auto;
text-align: start; text-indent: 0px; text-transform: none;
white-space: normal; widows: 1; word-spacing: 0px;
-webkit-text-stroke-width: 0px; background-color: rgb(226,
232, 242);"><br>
</td>
<td style="vertical-align: bottom; color: rgb(37, 53, 85);
font-family: Roboto, sans-serif; font-size: 14px;
font-style: normal; font-variant: normal; font-weight: bold;
letter-spacing: normal; line-height: 22px; orphans: auto;
text-align: start; text-indent: 0px; text-transform: none;
white-space: normal; widows: 1; word-spacing: 0px;
-webkit-text-stroke-width: 0px; background-color: rgb(226,
232, 242);">)</td>
<td style="vertical-align: bottom; color: rgb(37, 53, 85);
font-family: Roboto, sans-serif; font-size: 14px;
font-style: normal; font-variant: normal; font-weight: bold;
letter-spacing: normal; line-height: 22px; orphans: auto;
text-align: start; text-indent: 0px; text-transform: none;
white-space: normal; widows: 1; word-spacing: 0px;
-webkit-text-stroke-width: 0px; background-color: rgb(226,
232, 242);"><br>
</td>
</tr>
</tbody>
</table>
<br class="Apple-interchange-newline">
<br>
Matthias<br>
<br>
<div class="moz-cite-prefix">On 12/02/2015 01:11 PM, Richard
Duivenvoorde wrote:<br>
</div>
<blockquote cite="mid:565EDFF1.7050609@duif.net" type="cite">
<pre wrap="">Hi Devs,
Is there a way to create a memory layer in a plugin, and load it in the
map (and put temporary features in it), but NOT show it in the
legend/layerlist?
Context: we generate sort of big pie-charts in a plugin, which are shown
to user (and user is able to change color), but after closing of the
plugin the layer is emptied (or published to a shp or server).
It seems not very usefull to let the user for exampel make the layer go
down or make invisible or so.
So: possible? If yes: how?
Regards & Thanks,
Richard Duivenvoorde
_______________________________________________
Qgis-developer mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Qgis-developer@lists.osgeo.org">Qgis-developer@lists.osgeo.org</a>
List info: <a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/qgis-developer">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a>
Unsubscribe: <a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/qgis-developer">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a></pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Matthias Kuhn
OPENGIS.ch - <a class="moz-txt-link-freetext" href="https://www.opengis.ch">https://www.opengis.ch</a>
Spatial • (Q)GIS • PostGIS • Open Source</pre>
</body>
</html>