kio Library API Documentation

KFileMimeTypeInfo::ItemInfo Class Reference

This is the class for one item of a KFileMimeTypeInfo. More...

#include <kfilemetainfo.h>

List of all members.

Public Methods

const QStringprefix () const
 This method returns a translated prefix to be displayed before the value.

const QStringsuffix () const
 This method returns a translated suffix to be displayed after the value.

QVariant::Type type () const
 The items for a file are stored as a QVariant and this method can be used to get the data type of this item.

const QStringkey () const
QString string (const QVariant &value, bool mangle=true) const
bool isVariableItem () const
 Is this item the variable item?

const QStringtranslatedKey () const
uint attributes () const
 Return the attributes of the item.

uint hint () const
 Return the hints for the item.

uint unit () const
 Return the unit of the item.


Detailed Description

This is the class for one item of a KFileMimeTypeInfo.

It contains every information about a KFileMetaInfoItem that this item has in common for each file of a specific mimetype.

Definition at line 267 of file kfilemetainfo.h.


Member Function Documentation

const QString& KFileMimeTypeInfo::ItemInfo::prefix   const [inline]
 

This method returns a translated prefix to be displayed before the value.

Think e.g. of the $ in $30

Returns:
the prefix

Definition at line 282 of file kfilemetainfo.h.

Referenced by string().

const QString& KFileMimeTypeInfo::ItemInfo::suffix   const [inline]
 

This method returns a translated suffix to be displayed after the value.

Think of the kbps in 128kbps

Returns:
the prefix

Definition at line 293 of file kfilemetainfo.h.

Referenced by string().

QVariant::Type KFileMimeTypeInfo::ItemInfo::type   const [inline]
 

The items for a file are stored as a QVariant and this method can be used to get the data type of this item.

Returns:
the QVariant type

Definition at line 304 of file kfilemetainfo.h.

const QString& KFileMimeTypeInfo::ItemInfo::key   const [inline]
 

Returns:
The name of the item

Definition at line 312 of file kfilemetainfo.h.

Referenced by KFileMetaInfo::addGroup(), and isVariableItem().

QString KFileMimeTypeInfo::ItemInfo::string const QVariant   value,
bool    mangle = true
const
 

Returns:
a string for the specified value, if possible. If not, QString::null is returned. This can be used by programs if they want to display a sum or an average of some item for a list of files.
if mangle is true, the string will already contain prefix and suffix
Since:
3.1

Definition at line 1437 of file kfilemetainfo.cpp.

References QString::append(), QString::arg(), KIO::convertSize(), KIO::convertSizeFromKB(), KLocale::formatDate(), KLocale::formatDateTime(), KLocale::formatNumber(), KLocale::formatTime(), QString::isNull(), KFileMimeTypeInfo::KiloBytes, KGlobal::locale(), prefix(), QString::prepend(), QString::sprintf(), suffix(), QVariant::toBool(), QVariant::toDate(), QVariant::toDateTime(), QVariant::toDouble(), QVariant::toInt(), QVariant::toSize(), QVariant::toString(), QVariant::toTime(), QVariant::toUInt(), QVariant::type(), and unit().

bool KFileMimeTypeInfo::ItemInfo::isVariableItem   const [inline]
 

Is this item the variable item?

Returns:
true if it is, false if not

Definition at line 333 of file kfilemetainfo.h.

References QString::isNull(), and key().

Referenced by KFileMetaInfoGroup::addItem().

const QString& KFileMimeTypeInfo::ItemInfo::translatedKey   const [inline]
 

Returns:
a translation of the key for displaying to the user. If the plugin provides translation to the key, it's also in the user's language.

Definition at line 344 of file kfilemetainfo.h.

uint KFileMimeTypeInfo::ItemInfo::attributes   const [inline]
 

Return the attributes of the item.

See KFileMimeTypeInfo::Attributes

Definition at line 353 of file kfilemetainfo.h.

Referenced by KFileMetaInfo::addGroup().

uint KFileMimeTypeInfo::ItemInfo::hint   const [inline]
 

Return the hints for the item.

See KFileMimeTypeInfo::Hint

Definition at line 362 of file kfilemetainfo.h.

uint KFileMimeTypeInfo::ItemInfo::unit   const [inline]
 

Return the unit of the item.

See KFileMimeTypeInfo::Unit

Definition at line 371 of file kfilemetainfo.h.

Referenced by string().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for kdelibs Version 3.1.0.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Oct 8 12:21:35 2003 by doxygen 1.2.18 written by Dimitri van Heesch, © 1997-2001