diff options
| author | Arie Miller <[email protected]> | 2026-02-11 21:46:14 -0500 |
|---|---|---|
| committer | Arie Miller <[email protected]> | 2026-02-11 21:49:32 -0500 |
| commit | bf94fe656c691908928cf59c1ff526fe5afc611e (patch) | |
| tree | b9969f5ecc3fceb3f4e5e51d7caa1de442ddf35c /src/kitemviews/private/kbaloorolesprovider.cpp | |
| parent | 0786d9433204aa81c411511feda0a34b1c234ff6 (diff) | |
kitemviews: add columns for audio/video codec, color space, and pixel format
Diffstat (limited to 'src/kitemviews/private/kbaloorolesprovider.cpp')
| -rw-r--r-- | src/kitemviews/private/kbaloorolesprovider.cpp | 51 |
1 files changed, 29 insertions, 22 deletions
diff --git a/src/kitemviews/private/kbaloorolesprovider.cpp b/src/kitemviews/private/kbaloorolesprovider.cpp index d0632e2c5..836eb95a4 100644 --- a/src/kitemviews/private/kbaloorolesprovider.cpp +++ b/src/kitemviews/private/kbaloorolesprovider.cpp @@ -10,6 +10,7 @@ #include <Baloo/File> #include <KFileMetaData/PropertyInfo> #include <KFileMetaData/UserMetaData> +#include <kfilemetadata_version.h> #include <QCollator> #include <QSize> @@ -34,28 +35,34 @@ QString tagsFromValues(const QStringList &values) using Property = KFileMetaData::Property::Property; // Mapping from the KFM::Property to the KFileItemModel roles. const QHash<Property, QByteArray> propertyRoleMap() { - static const auto map = QHash<Property, QByteArray> { - { Property::Rating, QByteArrayLiteral("rating") }, - { Property::Comment, QByteArrayLiteral("comment") }, - { Property::Title, QByteArrayLiteral("title") }, - { Property::Author, QByteArrayLiteral("author") }, - { Property::Publisher, QByteArrayLiteral("publisher") }, - { Property::PageCount, QByteArrayLiteral("pageCount") }, - { Property::WordCount, QByteArrayLiteral("wordCount") }, - { Property::LineCount, QByteArrayLiteral("lineCount") }, - { Property::Width, QByteArrayLiteral("width") }, - { Property::Height, QByteArrayLiteral("height") }, - { Property::ImageDateTime, QByteArrayLiteral("imageDateTime") }, - { Property::ImageOrientation, QByteArrayLiteral("orientation") }, - { Property::Artist, QByteArrayLiteral("artist") }, - { Property::Genre, QByteArrayLiteral("genre") }, - { Property::Album, QByteArrayLiteral("album") }, - { Property::Duration, QByteArrayLiteral("duration") }, - { Property::BitRate, QByteArrayLiteral("bitrate") }, - { Property::AspectRatio, QByteArrayLiteral("aspectRatio") }, - { Property::FrameRate, QByteArrayLiteral("frameRate") }, - { Property::ReleaseYear, QByteArrayLiteral("releaseYear") }, - { Property::TrackNumber, QByteArrayLiteral("track") } + static const auto map = QHash<Property, QByteArray>{ + {Property::Rating, QByteArrayLiteral("rating")}, + {Property::Comment, QByteArrayLiteral("comment")}, + {Property::Title, QByteArrayLiteral("title")}, + {Property::Author, QByteArrayLiteral("author")}, + {Property::Publisher, QByteArrayLiteral("publisher")}, + {Property::PageCount, QByteArrayLiteral("pageCount")}, + {Property::WordCount, QByteArrayLiteral("wordCount")}, + {Property::LineCount, QByteArrayLiteral("lineCount")}, + {Property::Width, QByteArrayLiteral("width")}, + {Property::Height, QByteArrayLiteral("height")}, + {Property::ImageDateTime, QByteArrayLiteral("imageDateTime")}, + {Property::ImageOrientation, QByteArrayLiteral("orientation")}, + {Property::Artist, QByteArrayLiteral("artist")}, + {Property::Genre, QByteArrayLiteral("genre")}, + {Property::Album, QByteArrayLiteral("album")}, + {Property::Duration, QByteArrayLiteral("duration")}, + {Property::BitRate, QByteArrayLiteral("bitrate")}, + {Property::AspectRatio, QByteArrayLiteral("aspectRatio")}, + {Property::FrameRate, QByteArrayLiteral("frameRate")}, + {Property::ReleaseYear, QByteArrayLiteral("releaseYear")}, + {Property::TrackNumber, QByteArrayLiteral("track")}, +#if KFILEMETADATA_VERSION >= QT_VERSION_CHECK(6, 13, 0) + {Property::AudioCodec, QByteArrayLiteral("audioCodec")}, + {Property::VideoCodec, QByteArrayLiteral("videoCodec")}, + {Property::PixelFormat, QByteArrayLiteral("pixelFormat")}, + {Property::ColorSpace, QByteArrayLiteral("colorSpace")}, +#endif }; return map; } |
