Hi Hugo
Having expression support in QgsComposerLabel will be a great thing (and
backwards support for $CURRENT_DATE should be no big deal I guess).
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.
Regards,
Marco
On 25.09.2012 11:55, Hugo Mercier wrote:
Hi Andreas,
Thanks for your feedback.
Le 25/09/2012 11:13, Andreas Neumann a écrit :
Hi Hugo,
I am open to replacements of $CURRENT_DATE(). We'd need to make sure,
however, that the new proposal of [% $now %] would also allow a way to
set the date format, e.g. german date, french date, english date or some
specific user defined format.
Functions like day(), month() and so on are good candidates.
However, it misses some kinds of formatting (month and day in letters
for instance).
So a new conversion function may be needed, something like dateformat(
$now, "ddd MMM yyyy").
Is your proposed change in line with what other text replacements of the
new expression builder do, e.g. in the label placement?
It uses the same mechanism as the one used for actions on layers for
instance or for HTML annotations on the main canvas.
Would the label in print composer gain a new GUI that would allow the
user to specify an expression?
Ideally yes.
How about backwards compatibility of $CURRENT_DATE() ? Although it
wasn't well documented, I taught a lot of people about using
$CURRENT_DATE() - would the old syntax still work with the new proposal?
Ok, that was the main point of my email. To keep or not to keep
backward compatibility.
Judging by the first remarks, I am going to keep the backward
compatibility and add this dateformat() equivalent if I have time to.
_______________________________________________
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer