KIPI::ImageInfo

Search for usage in LXR

KIPI::ImageInfo Class Reference

#include <KIPI/ImageInfo>

Public Member Functions

 ImageInfo (ImageInfoShared *const)
 
 ImageInfo (const ImageInfo &)
 
void addAttributes (const QMap< QString, QVariant > &)
 
QMap< QString, QVariantattributes () const
 
void clearAttributes ()
 
void cloneData (const ImageInfo &other)
 
void delAttributes (const QStringList &)
 
QUrl url () const
 

Detailed Description

Holds info about an image from KIPI host application.

Note
If you want to manage item properties from kipi-plugins, use wrapper class KIPIPlugins::KPImageInfo, not this class directly. See kipi-plugins/common/libkipi-plugins API for details.
This class must be re-implemented in KIPI host application through KIPI::ImageInfoShared. This implementation must be thread-safe, due to possible use into kipi plugins separated thread implementation in the future.

Definition at line 39 of file imageinfo.h.

Constructor & Destructor Documentation

KIPI::ImageInfo::ImageInfo ( ImageInfoShared * const  shared)

Constructor and interface for host application.

Definition at line 18 of file imageinfo.cpp.

Member Function Documentation

void KIPI::ImageInfo::addAttributes ( const QMap< QString, QVariant > &  attributes)

Set the attributes defined from the map to the image.

Following keys/values are the same the attributes(), excepted "keywords", "filesize", and "isexactdate" properties which are read-only values.

Definition at line 49 of file imageinfo.cpp.

QMap< QString, QVariant > KIPI::ImageInfo::attributes ( ) const

Returns a Map of attributes of the image.

In case the host application supports some special attributes of the image, this function can be used to return them. Following attributes are supported:

ATTRIBUTES VALUE RETURNED COMMENTS
"name" QString Returns name of item (usually file name).
"comment" QString Returns default item comment.
"date" QDateTime Returns date of item (usually the creation date). In the case the application supports date ranges (like this image is from 1998-2000), this attribute always return the start of date range.
"dateto" QDateTime In the case the application supports date ranges (like this image is from 1998-2000), this attribute returns the end of date range.
"isexactdate" bool value In the case the application supports date ranges (like this image is from 1998-2000), this attribute returns true if the date is an exact specification, and thus not a range.
"orientation" integer value Returns orientation information. See ExifOrientation values for details).
"title" QString Returns default item title.
"rating" integer value Returns item starts 0 <= rate <= 5).
"colorlabel" integer value Return item color flag 0 <= colorlabel <= 10.
"picklabel" integer value Return item workflow flag 0 <= picklabel <= 4.
"latitude" double value Return item latitude in degrees (-90.0 >= lat <=90.0).
"longitude" double value Return item longitude in degrees (-180.0 >= long <=180.0).
"altitude" double value Return item altitude in meters.
"tagspath" QStringList Return all tags path list of item, formatted as "Country/France/City/Paris" for ex.
"keywords" QStringList Return all tags name list (without path).
"filesize" qlonglong value Return item file size in bytes.
"creators" QStringList Return creators list of item.
"credit" QString Return credit of item.
"rights" QString Return rights of item.
"source" QString Return source of item.
"tags" QStringList For compatibility. DEPRECATED and replaced by "keywords" attribute.
"angle" integer value For compatibility. DEPRECATED and replaced by "orientation" attribute.

Definition at line 44 of file imageinfo.cpp.

void KIPI::ImageInfo::clearAttributes ( )

Remove all attribute from the image.

See delAttributes() for list of all attributes removed.

Definition at line 59 of file imageinfo.cpp.

void KIPI::ImageInfo::cloneData ( const ImageInfo other)

Copies all the attributes from the other imageinfo.

Definition at line 64 of file imageinfo.cpp.

void KIPI::ImageInfo::delAttributes ( const QStringList attributes)

Remove attributes listed from the image.

Following values can be used:

ATTRIBUTES COMMENTS
"comment" Remove all comments.
"date" Remove date info.
"orientation" Remove orientation info.
"title" Remove all titles.
"rating" Remove rating info.
"colorlabel" Remove color labels info.
"picklabel" Remove pick labels info.
"gpslocation" Return item altitude in meters.
"tagspath" Remove all tags path.
"copyrights" Remove all copyrights info.
"tags" For compatibility. DEPRECATED and replaced by "keywords" attribute.
"angle" For compatibility. DEPRECATED and replaced by "orientation" attribute.

Definition at line 54 of file imageinfo.cpp.

QUrl KIPI::ImageInfo::url ( ) const

Return item URL.

Definition at line 69 of file imageinfo.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Sat Jan 22 2022 22:32:07 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.