KFileMetaInfoItem Class Reference
This is one item of the meta information about a file (see KFileMetaInfo). A meta information item about a file. More...
#include <kfilemetainfo.h>
Public Types | |
typedef KFileMimeTypeInfo::Hint | Hint |
typedef KFileMimeTypeInfo::Unit | Unit |
typedef KFileMimeTypeInfo::Attributes | Attributes |
Public Member Functions | |
KFileMetaInfoItem (const KFileMimeTypeInfo::ItemInfo *mti, const QString &key, const QVariant &value) | |
KFileMetaInfoItem (const KFileMetaInfoItem &item) | |
const KFileMetaInfoItem & | operator= (const KFileMetaInfoItem &item) |
KFileMetaInfoItem () | |
QString | key () const |
QString | translatedKey () const |
const QVariant & | value () const |
QString | string (bool mangle=true) const |
bool | setValue (const QVariant &value) |
QVariant::Type | type () const |
bool | isEditable () const |
bool | isRemoved () const |
bool | isModified () const |
QString | prefix () const |
QString | suffix () const |
uint | hint () const |
uint | unit () const |
uint | attributes () const |
bool | isValid () const |
Protected Member Functions | |
void | setAdded () |
void | setRemoved () |
void | ref () |
void | deref () |
Protected Attributes | |
Data * | d |
Friends | |
QDataStream & | operator>> (QDataStream &s, KFileMetaInfoItem &) |
QDataStream & | operator>> (QDataStream &s, KFileMetaInfoGroup &) |
QDataStream & | operator<< (QDataStream &s, const KFileMetaInfoItem &) |
Detailed Description
This is one item of the meta information about a file (see KFileMetaInfo). A meta information item about a file.Definition at line 489 of file kfilemetainfo.h.
Constructor & Destructor Documentation
|
Copy constructor. Definition at line 100 of file kfilemetainfo.cpp. |
|
Default constructor. This creates an "invalid" item Definition at line 107 of file kfilemetainfo.cpp. |
Member Function Documentation
|
The assignment operator, so you can do: KFileMetaInfoItem item = info.item("Title"); This will create a shared copy of the object. The actual data is automatically deleted if all copies go out of scope Definition at line 118 of file kfilemetainfo.cpp. |
|
Returns the key of the item.
Referenced by setValue(). |
|
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
Referenced by KFileItem::getToolTipText(). |
|
Returns the value of the item.
Referenced by KFileMetaInfoGroup::value(). |
|
Returns a string containing the value, if possible. If not, QString::null is returned.
Referenced by KFileItem::getToolTipText(). |
|
Changes the value of the item.
References QVariant::canCast(), kdDebug(), and key(). |
|
Return the type of the item.
|
|
You can query if the application can edit the item and write it back to the file with this method.
|
|
If you remove an item, it is only marked for removal for the file. On the next KFileMetaInfo::applyChanges() , it will be removed from the file. With this method, you can ask if the item is marked for removal.
|
|
If you change an item, it is marked as "dirty". On the next KFileMetaInfo::applyChanges() , the change will be written to the file. With this method, you can ask if this item is dirty.
|
|
This method returns a translated prefix to be displayed before the value. Think e.g. of the $ in $30
|
|
This method returns a translated suffix to be displayed after the value. Think of the kbps in 128kbps *
|
|
Returns the hint for this item.
|
|
Returns the unit for this item.
|
|
Returns the atttributes for this item. See KFileMimeTypeInfo::Attributes.
|
|
Return true if the item is valid, i.e. if it contains data, false if it's invalid (created with the default constructor and not been assigned anything), or if KFileMetaInfoGroup::item() didn't find your requested item).
Referenced by KFileItem::getToolTipText(), KFileMetaInfo::item(), and KFileMetaInfo::saveItem(). |
The documentation for this class was generated from the following files: