Add new, more specific measurement types

This commit is contained in:
Joshua Ramon Enslin 2024-12-18 17:00:13 +01:00
parent abb41ed32c
commit f1d0435eef
Signed by: jrenslin
GPG Key ID: 46016F84501B70AE
2 changed files with 46 additions and 1 deletions

2
l18n

@ -1 +1 @@
Subproject commit ffb9c18d930a87f491a06aed728409c6eed90359
Subproject commit 1aff60d35ece3fd565015d1b1ac9374869f05bb4

View File

@ -28,6 +28,15 @@ enum MDMeasurementType implements MDValueEnumInterface, JsonSerializable {
case length_socle;
case height_socle;
case width_socle;
case length_sheet_size;
case height_sheet_size;
case width_sheet_size;
case length_image_size;
case height_image_size;
case width_image_size;
case length_frame;
case height_frame;
case width_frame;
/**
* Returns a value of this type based on a string.
@ -51,6 +60,15 @@ enum MDMeasurementType implements MDValueEnumInterface, JsonSerializable {
'length_socle' => self::length_socle,
'height_socle' => self::height_socle,
'width_socle' => self::width_socle,
'length_sheet_size' => self::length_sheet_size,
'height_sheet_size' => self::height_sheet_size,
'width_sheet_size' => self::width_sheet_size,
'length_image_size' => self::length_image_size,
'height_image_size' => self::height_image_size,
'width_image_size' => self::width_image_size,
'length_frame' => self::length_frame,
'height_frame' => self::height_frame,
'width_frame' => self::width_frame,
default => throw new MDpageParameterNotFromListException("Unknown measurement type"),
};
@ -78,6 +96,15 @@ enum MDMeasurementType implements MDValueEnumInterface, JsonSerializable {
10 => self::length_socle,
11 => self::height_socle,
12 => self::width_socle,
13 => self::length_sheet_size,
14 => self::height_sheet_size,
15 => self::width_sheet_size,
16 => self::length_image_size,
17 => self::height_image_size,
18 => self::width_image_size,
19 => self::length_frame,
20 => self::height_frame,
21 => self::width_frame,
default => throw new MDpageParameterNotFromListException("Unknown measurement type"),
};
@ -125,6 +152,15 @@ enum MDMeasurementType implements MDValueEnumInterface, JsonSerializable {
self::length_socle => self::length,
self::height_socle => self::height,
self::width_socle => self::width,
self::length_sheet_size => self::length,
self::height_sheet_size => self::height,
self::width_sheet_size => self::width,
self::length_image_size => self::length,
self::height_image_size => self::height,
self::width_image_size => self::width,
self::length_frame => self::length,
self::height_frame => self::height,
self::width_frame => self::width,
# default => throw new MDpageParameterNotFromListException("Unknown measurement type"),
};
@ -150,6 +186,15 @@ enum MDMeasurementType implements MDValueEnumInterface, JsonSerializable {
self::length_socle => 10,
self::height_socle => 11,
self::width_socle => 12,
self::length_sheet_size => 13,
self::height_sheet_size => 14,
self::width_sheet_size => 15,
self::length_image_size => 16,
self::height_image_size => 17,
self::width_image_size => 18,
self::length_frame => 19,
self::height_frame => 20,
self::width_frame => 21,
# default => throw new MDpageParameterNotFromListException("Unknown measurement type"),
};