Hi Hugo,<div><br></div><div>You may want to consider this proposed implementation for expression-based tokens for use in composer labels (and maybe elsewhere in QGIS):</div><div><br></div><a href="http://hub.qgis.org/issues/6269">http://hub.qgis.org/issues/6269</a><div>
<br></div><div>I don't think any coding has been done, just the GUI mockups I did. I'm happy to help out with coding that approach.<span></span></div><div><br></div><div>Regards,</div><div><br></div><div>Larry<br>
<br>On Tuesday, September 25, 2012, Marco Hugentobler  wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Hugo<br>
<br>
Having expression support in QgsComposerLabel will be a great thing (and backwards support for $CURRENT_DATE should be no big deal I guess).<br>
<br>
Note that I have a new composer item in the pipeline with support for rich text formating and with support for multiple frames. It will be nice to have expression support also there, hopefully we can look at it in Essen.<br>

<br>
Regards,<br>
Marco<br>
<br>
On 25.09.2012 11:55, Hugo Mercier wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Andreas,<br>
<br>
Thanks for your feedback.<br>
<br>
Le 25/09/2012 11:13, Andreas Neumann a écrit :<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Hugo,<br>
<br>
I am open to replacements of $CURRENT_DATE(). We'd need to make sure,<br>
however, that the new proposal of [% $now %] would also allow a way to<br>
set the date format, e.g. german date, french date, english date or some<br>
specific user defined format.<br>
</blockquote>
<br>
Functions like day(), month() and so on are good candidates.<br>
However, it misses some kinds of formatting (month and day in letters for instance).<br>
So a new conversion function may be needed, something like dateformat( $now, "ddd MMM yyyy").<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Is your proposed change in line with what other text replacements of the<br>
new expression builder do, e.g. in the label placement?<br>
</blockquote>
<br>
It uses the same mechanism as the one used for actions on layers for instance or for HTML annotations on the main canvas.<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Would the label in print composer gain a new GUI that would allow the<br>
user to specify an expression?<br>
</blockquote>
<br>
Ideally yes.<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
How about backwards compatibility of $CURRENT_DATE() ? Although it<br>
wasn't well documented, I taught a lot of people about using<br>
$CURRENT_DATE() - would the old syntax still work with the new proposal?<br>
</blockquote>
<br>
Ok, that was the main point of my email. To keep or not to keep backward compatibility.<br>
<br>
Judging by the first remarks, I am going to keep the backward compatibility and add this dateformat() equivalent if I have time to.<br>
<br>
</blockquote>
<br>
______________________________<u></u>_________________<br>
Qgis-developer mailing list<br>
<a>Qgis-developer@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">http://lists.osgeo.org/<u></u>mailman/listinfo/qgis-<u></u>developer</a><br>
</blockquote></div><br><br>-- <br><br>Larry Shaffer<br>Dakota Cartography<br>Black Hills, South Dakota<br>