[Qgis-developer] Expressions in print composer

James Stott James.Stott at npaconsult.co.uk
Tue Sep 25 02:23:58 PDT 2012


Agree on keeping $CURRENT_DATE() backwards compatibility. We use that on every drawing we create.


James Stott BSc (Hons) MSc | Senior Professional
Nicholas Pearson Associates | 30 Brock Street | Bath | BA1 2LN
T: 01225 445548 | M: -
http://www.npaconsult.co.uk/ 

http://www.npaconsult.co.uk/http://www.npaconsult.co.uk/about-news.asp

From: qgis-developer-bounces at lists.osgeo.org [mailto:qgis-developer-bounces at lists.osgeo.org] On Behalf Of Andreas Neumann
Sent: 25 September 2012 10:14
To: qgis-developer at lists.osgeo.org
Subject: Re: [Qgis-developer] Expressions in print composer

 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.

 Is your proposed change in line with what other text replacements of  the new expression builder do, e.g. in the label placement?

 Would the label in print composer gain a new GUI that would allow the  user to specify an expression?

 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?

 It would be best if Marco H. could comment, since he implemented the  current label object in print composer.

 Thanks,
 Andreas

 On Tue, 25 Sep 2012 11:01:05 +0200, Hugo Mercier wrote:
> Hi all,
>
> I am currently working on the integration of the Atlas plugin into the 
> core.
>
> I noticed the "replaceDateText" method of the QgsComposerLabel class 
> that is aimed at dealing with the very specific "$CURRENT_DATE"
> expression and replace it with ... the current date.
>
> For the sake of homogeneity and considering we have a powerful way of 
> handling expressions, why not consider text in labels where 
> expressions are surrounded by '[%' and '%]'. So $CURRENT_DATE would be 
> replaced by date manipulations based on '[% $now %]' ?
>
> The other change I propose is to enhance the optional "substitution 
> map" that can be set on an expression text. It is used to define 
> special column names like $layerid, $CWD and so on when using Actions 
> on a layer. Until now, they are used for text replacement and cannot 
> be used within an expression.
> My proposal is to make them first-class citizen within the grammar.
>
> I have a local branch with these proposed changes. If there is no 
> special objections, I am about to propose them.

--
 --
 Andreas Neumann
 Böschacherstrasse 10A
 8624 Grüt (Gossau ZH)
 Switzerland
_______________________________________________
Qgis-developer mailing list
Qgis-developer at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

http://www.npaconsult.co.uk/terms.asp
This Electronic Transmission is intended only for the attention of the addressee. It may contain privileged and confidential information. If you are not the person for whom it is intended, you must not copy, distribute or take any action in reliance on it. If you have received this electronic transmission in error please notify us immediately by telephone, delete the transmission and destroy any hard copies.
Nicholas Pearson Associates has used all reasonable efforts to ensure that this message and any attachments are free from viruses.
Nicholas Pearson Associates, 30 Brock Street, Bath, BA1 2LN , Tel: +44 (0) 01225 445548, Fax: +44 (0) 01225 312387, Website: http://www.npaconsult.co.uk/


More information about the Qgis-developer mailing list