KFileMetaInfoGroup Class Reference
This is one group of meta information items about a file (see KFileMetaInfo). A group of meta information items about a file. More...
#include <kfilemetainfo.h>
Public Member Functions | |
KFileMetaInfoGroup (const QString &name, const KFileMimeTypeInfo *info) | |
KFileMetaInfoGroup (const KFileMetaInfoGroup &original) | |
const KFileMetaInfoGroup & | operator= (const KFileMetaInfoGroup &info) |
KFileMetaInfoGroup () | |
bool | isValid () const |
bool | isEmpty () const |
bool | isModified () const |
KFileMetaInfoItem | operator[] (const QString &key) const |
KFileMetaInfoItem | item (const QString &key) const |
KFileMetaInfoItem | item (uint hint) const |
const QVariant | value (const QString &key) const |
QStringList | supportedKeys () const |
bool | supportsVariableKeys () const |
bool | contains (const QString &key) const |
QStringList | keys () const |
QStringList | preferredKeys () const |
KFileMetaInfoItem | addItem (const QString &key) |
bool | removeItem (const QString &key) |
QStringList | removedItems () |
QString | name () const |
QString | translatedName () const |
uint | attributes () const |
Protected Member Functions | |
void | setAdded () |
KFileMetaInfoItem | appendItem (const QString &key, const QVariant &value) |
void | ref () |
void | deref () |
Protected Attributes | |
Data * | d |
Friends | |
KIO_EXPORT friend QDataStream & | operator>> (QDataStream &s, KFileMetaInfoGroup &) |
KIO_EXPORT friend QDataStream & | operator<< (QDataStream &s, const KFileMetaInfoGroup &) |
Detailed Description
This is one group of meta information items about a file (see KFileMetaInfo). A group of meta information items about a file.
Definition at line 664 of file kfilemetainfo.h.
Constructor & Destructor Documentation
|
Copy constructor.
Definition at line 1168 of file kfilemetainfo.cpp. |
|
Default constructor. This creates an "invalid" item
Definition at line 1175 of file kfilemetainfo.cpp. |
Member Function Documentation
|
The assignment operator, so you can do: . 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 1185 of file kfilemetainfo.cpp. References d. |
|
Returns 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).
Definition at line 1198 of file kfilemetainfo.cpp. Referenced by addItem(), attributes(), preferredKeys(), removeItem(), supportedKeys(), supportsVariableKeys(), and translatedName(). |
|
Returns false if the object contains data, true if it's empty. An empty group is a group with no items (amazing, isn't it?).
Definition at line 1204 of file kfilemetainfo.cpp. |
|
Returns true if an item as added or removed from the group.
Definition at line 1314 of file kfilemetainfo.cpp. |
|
Operator for convenience. It does the same as item(), but you cannot specify a group to search in Definition at line 733 of file kfilemetainfo.h. |
|
This method searches for the specified item.
Definition at line 1278 of file kfilemetainfo.cpp. References item(). Referenced by addItem(), item(), and preferredKeys(). |
|
Returns the item with the given
Definition at line 1287 of file kfilemetainfo.cpp. References item(). |
|
Convenience function. Returns the value of the specified key. It does the same as item(key).value().
Definition at line 757 of file kfilemetainfo.h. References KFileMetaInfoItem::value(). |
|
Use this method to get a list of keys in the specified group that the plugin knows about. No variable keys. For a group that doesn't support variable keys, all keys that this group may have are returned. For a group that does support them, the non-variable ones are returned. See KFileMetaInfo about variable keys
Definition at line 1261 of file kfilemetainfo.cpp. References isValid(). |
|
Returns true if this group supports adding or removing arbitrary keys, false if not.
Definition at line 1267 of file kfilemetainfo.cpp. References isValid(). |
|
Checks whether an item with the given
Definition at line 1273 of file kfilemetainfo.cpp. References contains(). Referenced by contains(), and KFileMetaInfo::contains(). |
|
Returns a list of all keys.
Definition at line 1237 of file kfilemetainfo.cpp. References kdWarning(). Referenced by preferredKeys(). |
|
Returns a list of all keys in preference order.
Definition at line 1209 of file kfilemetainfo.cpp. References isValid(), item(), keys(), and preferredKeys(). Referenced by preferredKeys(). |
|
Add an item to the info.
This is only possible if the specified
Definition at line 1340 of file kfilemetainfo.cpp. References addItem(), isValid(), KFileMimeTypeInfo::ItemInfo::isVariableItem(), item(), KFileMimeTypeInfo::GroupInfo::itemInfo(), KFileMetaInfoItem::setAdded(), and KFileMimeTypeInfo::GroupInfo::variableItemInfo(). Referenced by addItem(), and KFileMetaInfo::saveItem(). |
|
Remove this item from the meta info of the file. You cannot query KFileMetaInfo for a removed object, but you can query for a list of removed items with removedItems() if you need to. If you re-add it, its value will be cleared.
Definition at line 1374 of file kfilemetainfo.cpp. References isValid(), kdDebug(), and removeItem(). Referenced by removeItem(). |
|
Returns a list of all removed items.
Definition at line 1402 of file kfilemetainfo.cpp. |
|
The name of this group.
Definition at line 1298 of file kfilemetainfo.cpp. |
|
The translated name of this group.
Definition at line 1255 of file kfilemetainfo.cpp. References isValid(). |
|
Returns the attributes of this item.
Definition at line 1303 of file kfilemetainfo.cpp. References isValid(). |
The documentation for this class was generated from the following files: