<html><body><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:12pt">Hi Michael,<br><br>That is very close... (but does have a bug- #9687 - I can save a style, then try to load it for the same layer opened a second time & get an error:<br>
<style type="text/css">
p, li { white-space: pre-wrap; }
</style>
<div style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style="font-style: italic;">"error occurred while parsing reference at line 113 column 155"</span>)</div><div style="margin: 0px; text-indent: 0px; color: rgb(0, 0, 0); font-size: 16px; font-family: arial,helvetica,sans-serif; background-color: transparent; font-style: italic;"><br></div><div style="margin: 0px; text-indent: 0px; color: rgb(0, 0, 0); font-size: 16px; font-family: arial,helvetica,sans-serif; background-color: transparent;">The line in the QML file is the action, which is appended to "labeling/shapeFillColorB" as well as an action later in the file.</div><div style="margin: 0px; text-indent: 0px; color: rgb(0, 0, 0); font-size: 16px; font-family: arial,helvetica,sans-serif; background-color: transparent; font-style: italic;"><property key="labeling/shapeFillColorB" value="255"/>eom
 https://atlas.niwa.co.nz/login/SearchService?SERVICE_REQUEST_TYPE=100&SERVICE_REQUEST_USERID=833&SERVICE_REQUEST_ASSETID=[% "atlas_id" %]&SERVICE_REQUEST_PASSKEY=public"<br></div><br>(Change the Atlas_ID value to 247002 or 247224 & open the URL in a browser to see the result if you are interested - it is for a map layer of echosounder transects to retrieve the echogram from our image management tool via a web service)<br><br><br>Anyway, apart from the bug, as I understand it, that allows me to save a style, which can then be applied to a layer, but does not inlude the layer data source.<br><br><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: arial,helvetica,sans-serif; background-color: transparent; font-style: normal;">I'd like to be able to open a layer  (sort of like a virtual dataset in ogr) by opening the QGIS layer file, & have the layer load & all settings applied automatically. Currently I need to open a
 layer, open properties, select style, load style, apply style every time I load the layer.<br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: arial,helvetica,sans-serif; background-color: transparent; font-style: normal;"><br><span></span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: arial,helvetica,sans-serif; background-color: transparent; font-style: normal;"><span>Cheers,</span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: arial,helvetica,sans-serif; background-color: transparent; font-style: normal;"><br><span></span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: arial,helvetica,sans-serif; background-color: transparent; font-style: normal;"><span>  Brent<br></span></div><div><br></div>  <div style="font-family: arial, helvetica, sans-serif; font-size: 12pt;"> <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div dir="ltr">
 <hr size="1">  <font face="Arial" size="2"> <b><span style="font-weight:bold;">From:</span></b> kimaidou <kimaidou@gmail.com><br> <b><span style="font-weight: bold;">To:</span></b> Brent Wood <pcreso@pcreso.com> <br><b><span style="font-weight: bold;">Cc:</span></b> "qgis-developer@lists.osgeo.org" <qgis-developer@lists.osgeo.org> <br> <b><span style="font-weight: bold;">Sent:</span></b> Monday, March 3, 2014 6:40 AM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [Qgis-developer] What about a qgis project add function ?<br> </font> </div> <div class="y_msg_container"><br><div id="yiv9522137751"><div><div dir="ltr"><div>Brent,<br clear="none"><br clear="none">Perhaps I have misunderstood your question, but I think you can achieve this simply by "save style as default" . Every time you will use the layer in any QGIS project, the default "style" (which mean the default properties of the layer) would be applied.<br
 clear="none">
<br clear="none"></div>Michael<br clear="none"></div><div class="yiv9522137751gmail_extra"><br clear="none"><br clear="none"><div class="yiv9522137751gmail_quote">2014-03-02 18:27 GMT+01:00 Brent Wood <span dir="ltr"><<a rel="nofollow" shape="rect" ymailto="mailto:pcreso@pcreso.com" target="_blank" href="mailto:pcreso@pcreso.com">pcreso@pcreso.com</a>></span>:<br clear="none">
<blockquote class="yiv9522137751gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="yiv9522137751yqt3861299415" id="yiv9522137751yqt50793"><div><div style="font-size:12pt;font-family:arial, helvetica, sans-serif;"><div><span>I suggest a slightly different approach (which may not be all that different once the details are  worked out?) <br clear="none">
</span></div><div><br clear="none"></div><div>A project stores lots of info about more items than just a layer... but I often want to add a layer with the same style, actions, label, etc settings to several projects, or just to the current canvas without changing what is already in the canvas.</div>
<div><br clear="none"></div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:arial, helvetica, sans-serif;">Does it seem useful to others to be able to store such info in a "layer setup" file rather than a QGIS project file, so layers can be opened with all such info attached & optionally read on opening? <br clear="none">
</div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:arial, helvetica, sans-serif;"><br clear="none"></div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:arial, helvetica, sans-serif;">
Regards,</div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:arial, helvetica, sans-serif;"><br clear="none"></div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:arial, helvetica, sans-serif;">
  Brent Wood<br clear="none"></div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:arial, helvetica, sans-serif;"><br clear="none"></div>  <div style="font-family:arial, helvetica, sans-serif;font-size:12pt;"> <div style="font-family:times new roman, new york, times, serif;font-size:12pt;">
 <div dir="ltr"> <hr size="1">  <font face="Arial"> <b><span style="font-weight:bold;">From:</span></b> Paolo Cavallini <<a rel="nofollow" shape="rect" ymailto="mailto:cavallini@faunalia.it" target="_blank" href="mailto:cavallini@faunalia.it">cavallini@faunalia.it</a>><br clear="none"> <b><span style="font-weight:bold;">To:</span></b> <a rel="nofollow" shape="rect" ymailto="mailto:qgis-developer@lists.osgeo.org" target="_blank" href="mailto:qgis-developer@lists.osgeo.org">qgis-developer@lists.osgeo.org</a> <br clear="none">
 <b><span style="font-weight:bold;">Sent:</span></b> Sunday, March 2, 2014 9:27 PM<br clear="none"> <b><span style="font-weight:bold;">Subject:</span></b> Re: [Qgis-developer] What about a qgis project add function ?<br clear="none"> </font> </div><div>
<div class="yiv9522137751h5"> <div><br clear="none">Il 01/03/2014 22:07, Régis Haubourg ha scritto:<br clear="none"><br clear="none">> I would love to call it "Add or embed from other project", and just add a<br clear="none">> checkbox choose embed or hard copy of the layers and groups. Existing dialog<br clear="none">
> is already correct.<br clear="none">> I just ported Import Project plugin to 2.0 to satisfy that need. Just be<br clear="none">> aware that you need to give a new id to imported layers, to be able to<br clear="none">> import some layers n times. Code is quite simple, I would love to see that<br clear="none">
> in core!<br clear="none"><br clear="none">+1<br clear="none">Merci
 Régis.<br clear="none">-- <br clear="none">Paolo Cavallini - <a rel="nofollow" shape="rect" target="_blank" href="http://www.faunalia.eu/">www.faunalia.eu</a><br clear="none">QGIS & PostGIS courses: <a rel="nofollow" shape="rect" target="_blank" href="http://www.faunalia.eu/training.html">http://www.faunalia.eu/training.html</a><br clear="none">
_______________________________________________<br clear="none">Qgis-developer mailing list<br clear="none"><a rel="nofollow" shape="rect" ymailto="mailto:Qgis-developer@lists.osgeo.org" target="_blank" href="mailto:Qgis-developer@lists.osgeo.org">Qgis-developer@lists.osgeo.org</a><br clear="none"><a rel="nofollow" shape="rect" target="_blank" href="http://lists.osgeo.org/mailman/listinfo/qgis-developer">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br clear="none">
<br clear="none"></div> </div></div></div> </div>  </div></div></div><br clear="none">_______________________________________________<br clear="none">
Qgis-developer mailing list<br clear="none">
<a rel="nofollow" shape="rect" ymailto="mailto:Qgis-developer@lists.osgeo.org" target="_blank" href="mailto:Qgis-developer@lists.osgeo.org">Qgis-developer@lists.osgeo.org</a><br clear="none">
<a rel="nofollow" shape="rect" target="_blank" href="http://lists.osgeo.org/mailman/listinfo/qgis-developer">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br clear="none"></blockquote></div><br clear="none"></div></div></div><br><br></div> </div> </div>  </div></body></html>