Skip to content

Units management

Sebastien Peillet requested to merge spe-units_support into master

At the time being, measure units are declared by user when he configures a new plot measure (config_create_dialog.py & config_create_dialog.ui). It is a QLineEdit, and the text is saved as the measure unit. This method doesn't allow to switch unit according to a scale change, for instance if we want to change meters m to millimeters mm. This MR adds this opportunity.

The line edit has been replaced by two combo box (measure type and unit selection) to select the unit. Measure type combo box seems to me to be necessary, otherwise the unit combo box will have too many items.

This looks like following images :

image

image

If no value fit to the plot, the user can select - type and the unit combo box will be editable.

If the user mentions a known plot unit, then he can change the unit in the edit plot axis dialog (double click on header) :

image

Min and max limits will be converted in the new unit, and after validation, the scale displayed in the header will be actualized with the new unit, as the tooltip under the plots.

Note : project.qgs has been updated

Merge request reports