requested to merge alexishorner/gwenview:alexishorner/edit-metadata-399069 into master
Allows users to edit metadata entries in the image metainfo dialog. To edit metadata fields the user must open the image meta info dialog (information side panel ->
Show more details...) and can change the values by clicking on them (see image below).
Note that some values are read-only by design (e.g.
Image Size) to prevent unexpected behavior. The metadata editor does not validate the input and does not attempt to maintain any form of consistency between metadata fields. Values of the wrong type are ignored by exiv2 on save and shouldn't corrupt the file. Most Exiv2 data types are supported, including Exiv2::signedRational. Non supported types are not editable in the UI. Number types such as Exiv2::signedShort must not contain any letter (even the unit). This means that if want to change the aperture from
F7, we have to write
7 in the UI.
Since saving metadata was only supported by jpeg images through
JpegContent, I generalized images with
AbstractImageContent which now allows all image formats to be treated through the same interface and lets them support metadata writing. While this should not break the code API, this violates the Application Binary Interface.