Bug 398581 - Add ability for extractor to add display text
Summary: Add ability for extractor to add display text
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kfilemetadata
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: Pinak Ahuja
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-09-13 15:13 UTC by Kai Uwe Broulik
Modified: 2019-02-10 17:35 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kai Uwe Broulik 2018-09-13 15:13:00 UTC
There are plenty of properties that are enums, e.g. "Image Orientation", "Photo Flash", and others.

Currently there is no way for the UI (e.g. FileMetadataWidget) to make sense of those numbers, and they really shouldn't have to. 

This manifests in "Photo Flash: 24" (meaning Flash was on auto but didn't fire, compare to what Gwenview displays here)

There should be a displayText (like there is displayName) property on for custom types, so that not every user of KFileMetadata has to manually add custom formatting to e.g. "bitRatew", "releaseYear", and stuff like Exif information.
Comment 1 Alexander Stippich 2019-02-10 17:35:55 UTC
Git commit 4bedfd6609c6efe5dc327d305feac8985d4658e3 by Alexander Stippich.
Committed on 10/02/2019 at 17:35.
Pushed by astippich into branch 'master'.

Add string formatting function to property info

Summary:
Adds the ability to format the metadata value
for displaying purposes individually for each
property. Currently, users of KFileMetaData
must implement their own custom formatting
functions.
All custom formatting functions from
Baloo-Widgets and Dolphin are copied into
KFileMetaData. This can be extended later.

This adds a dependency on KCoreAddons to
KFileMetaData.

Test Plan: tests pass

Reviewers: broulik, bruns, mgallien, #frameworks

Reviewed By: bruns

Subscribers: ngraham, kde-frameworks-devel, #baloo

Tags: #frameworks, #baloo

Differential Revision: https://phabricator.kde.org/D17245

M  +5    -0    CMakeLists.txt
M  +29   -0    autotests/propertyinfotest.cpp
M  +1    -0    autotests/propertyinfotest.h
M  +2    -0    src/CMakeLists.txt
A  +86   -0    src/formatstrings.cpp     [License: LGPL (v2.1+)]
C  +23   -10   src/formatstrings_p.h [from: autotests/propertyinfotest.h - 053% similarity]
M  +27   -0    src/propertyinfo.cpp
M  +7    -0    src/propertyinfo.h

https://commits.kde.org/kfilemetadata/4bedfd6609c6efe5dc327d305feac8985d4658e3