Feature request #10544

Allow math expressions in print composer size and position controls

Added by Alexandre Neto almost 3 years ago. Updated almost 3 years ago.

Status:Open Start Date:06/11/2014
Priority:Normal Due date:
Assigned to:- % Done:

0%

Category:Map Composer / Printing
Target version:Future Release - Nice to have
Platform: Resolution:
Platform version: Pull Request or Patch supplied:No
Status info: Tag:

Description

One very handy feature that many design software have is the ability to use simple math expressions in size and position controls fields.

For instance, if you have an item with a height of x, and you want to double it's height, you would be able to simply type after the x value '* 2' and press enter. The control would solve the math expression and set the new value. The same could be done with +, - , / and even %

Associated revisions

Revision 7400106e41f9e52b85f58ab98e92b4d79034f2e3
Added by Nyall Dawson over 2 years ago

[FEATURE] Evaluate expressions entered in QgsDoubleSpinBox

Allows entry of QGIS expressions into the spin box. The expression
is evaluated on enter or loss of focus and then discarded.

(refs #10544)

Revision dfe79807641884821985633fda14918c0c556db5
Added by Nyall Dawson over 2 years ago

Flip all composer double spin boxes to QgsDoubleSpin (refs #10544)

Add clear buttons to applicable properties.

Revision 697ef510b7a0fd602d4a9704e2350fa7e7f411c9
Added by Nyall Dawson over 2 years ago

Also evaluate expressions entered in QgsSpinBox

and flip all composer spin boxes to QgsSpinBox (refs #10544)

History

Updated by Andreas Neumann almost 3 years ago

There is an ongoing contract (a swiss province and Nyall Dawson) that will implement expression support for page resizing in Atlas serial printing.

This is kind of similar to your request - but slightly different. I guess you need just a temporary expression to calculate stuff, not in the atlas printing context.

Updated by Nyall Dawson almost 3 years ago

Yeah - that's what I'm thinking. A temporary expression which evaluates once and then updates the text box with the evaluated value.

Also available in: Atom