Search for usage in LXR

KFileMetaData::PropertyInfo Class Reference

#include <KFileMetaData/PropertyInfo>

Public Member Functions

 PropertyInfo (Property::Property property)
 PropertyInfo (const PropertyInfo &pi)
QString displayName () const
QString formatAsDisplayString (const QVariant &value) const
QString name () const
PropertyInfooperator= (const PropertyInfo &rhs)
bool operator== (const PropertyInfo &rhs) const
Property::Property property () const
bool shouldBeIndexed () const
QVariant::Type valueType () const

Static Public Member Functions

static PropertyInfo fromName (const QString &name)

Detailed Description

The PropertyInfo class can be used to obtain extra information about any property.

It is commonly used be indexers in order to obtain a translatable name of the property along with additional information such as if the property should be indexed.

Definition at line 26 of file propertyinfo.h.

Member Function Documentation

QString PropertyInfo::displayName ( ) const

A user visible name of the property.

Definition at line 601 of file propertyinfo.cpp.

QString PropertyInfo::formatAsDisplayString ( const QVariant value) const

Returns the value of the property as a QString with added formatting, added units if needed, and translated enums.


Definition at line 626 of file propertyinfo.cpp.

PropertyInfo PropertyInfo::fromName ( const QString name)

Construct a PropertyInfo from the internal property name.

The internal property name is case insensitive

Definition at line 644 of file propertyinfo.cpp.

QString PropertyInfo::name ( ) const

The internal unique name used to refer to the property.

Definition at line 606 of file propertyinfo.cpp.

Property::Property PropertyInfo::property ( ) const

The enumeration which represents this property.

Definition at line 611 of file propertyinfo.cpp.

bool PropertyInfo::shouldBeIndexed ( ) const

Indicates if this property requires indexing or should just be stored.

Eg - Property::Height does not need to be part of the global index. When a user searches for 600, they should not get images with that height

This is just a recommendation.

Definition at line 621 of file propertyinfo.cpp.

QVariant::Type PropertyInfo::valueType ( ) const

The type the value of this property should be.

Eg - Property::Height should be an integer

Definition at line 616 of file propertyinfo.cpp.

The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Thu Dec 2 2021 22:49:59 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.