KFileMetaData::PropertyInfo
#include <KFileMetaData/PropertyInfo>
Public Member Functions | |
PropertyInfo (const PropertyInfo &pi) | |
PropertyInfo (Property::Property property) | |
QString | displayName () const |
QString | formatAsDisplayString (const QVariant &value) const |
QString | name () const |
PropertyInfo & | operator= (const PropertyInfo &rhs) |
bool | operator== (const PropertyInfo &rhs) const |
Property::Property | property () const |
bool | shouldBeIndexed () const |
QMetaType::Type | valueType () const |
Static Public Member Functions | |
static QStringList | allNames () |
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 29 of file propertyinfo.h.
Constructor & Destructor Documentation
◆ PropertyInfo() [1/3]
PropertyInfo::PropertyInfo | ( | ) |
Definition at line 154 of file propertyinfo.cpp.
◆ PropertyInfo() [2/3]
PropertyInfo::PropertyInfo | ( | Property::Property | property | ) |
Definition at line 152 of file propertyinfo.cpp.
◆ PropertyInfo() [3/3]
PropertyInfo::PropertyInfo | ( | const PropertyInfo & | pi | ) |
Definition at line 156 of file propertyinfo.cpp.
Member Function Documentation
◆ allNames()
|
static |
Get the names of all valid, supported properties.
Note: Property::Empty is not considered a valid property.
- Since
- 6.0
- 5.107
Definition at line 224 of file propertyinfo.cpp.
◆ displayName()
QString PropertyInfo::displayName | ( | ) | const |
A user visible name of the property.
Note: When the displayName for a given property is used repeatedly the returned value should be cached, as calling this method is fairly expensive, as the returned name is localized.
Definition at line 174 of file propertyinfo.cpp.
◆ formatAsDisplayString()
Returns the value of the property as a QString with added formatting, added units if needed, and translated enums.
- Since
- 5.56
Definition at line 199 of file propertyinfo.cpp.
◆ fromName()
|
static |
Construct a PropertyInfo from the internal property name.
The internal property name is case insensitive
Definition at line 217 of file propertyinfo.cpp.
◆ name()
QString PropertyInfo::name | ( | ) | const |
The internal unique name used to refer to the property.
Definition at line 179 of file propertyinfo.cpp.
◆ operator=()
PropertyInfo & PropertyInfo::operator= | ( | const PropertyInfo & | rhs | ) |
Definition at line 163 of file propertyinfo.cpp.
◆ operator==()
bool PropertyInfo::operator== | ( | const PropertyInfo & | rhs | ) | const |
Definition at line 169 of file propertyinfo.cpp.
◆ property()
Property::Property PropertyInfo::property | ( | ) | const |
The enumeration which represents this property.
Definition at line 184 of file propertyinfo.cpp.
◆ shouldBeIndexed()
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 194 of file propertyinfo.cpp.
◆ valueType()
QMetaType::Type PropertyInfo::valueType | ( | ) | const |
The type the value of this property should be.
Eg - Property::Height should be an integer
Definition at line 189 of file propertyinfo.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:15:13 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.