#include <kfilemetainfo.h>
Public Types | |
| enum | What |
Public Methods | |
| KFileMetaInfo (const QString &path, const QString &mimeType=QString::null, uint what=Fastest) | |
| KFileMetaInfo () | |
| KFileMetaInfo (const KFileMetaInfo &original) | |
| const KFileMetaInfo & | operator= (const KFileMetaInfo &info) |
| QStringList | groups () const |
| QStringList | editableGroups () const |
| bool | addGroup (const QString &name) |
| bool | removeGroup (const QString &name) |
| bool | applyChanges () |
| bool | contains (const QString &key) const |
| bool | containsGroup (const QString &key) const |
| bool | isValid () const |
| bool | isEmpty () const |
Protected Methods | |
| KFilePlugin *const | plugin () const |
The groups and the What enum are not yet supported, but already added to the interface so that adding support doesn't break compatibility.
Definition at line 853 of file kfilemetainfo.h.
|
|
This is used to specify what a KFileMetaInfo object should read, so you can specify if you want to read "expensive" items or not.
Definition at line 880 of file kfilemetainfo.h. |
|
||||||||||||||||
|
The constructor. creating a KFileMetaInfo item through this will autoload the plugin belonging to the mimetype and try to get meta information about the specified file. If no info is available, you'll get an empty (not invalid) object. You can test for it with the isEmpty() method.
|
|
|
Default constructor. This will create an invalid object (see isValid(). |
|
|
Copy constructor |
|
|
Try to add the specified group. This will only succeed if it is in the list of editableGroups(). Note that all non-variable items that belong to this group are automatically added as empty item. |
|
|
This method writes all pending changes of the meta info back to the file. If any items are marked as removed, they are really removed from the list. The info object as well as all items are updated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The assignment operator, so you can do e.g.:
KFileMetaInfo info;
if (something) info = KFileMetaInfo("/the/file");
This will create a shared copy of the object. The actual data is automatically deleted if all copies go out of scope |
|
|
|
|
|
remove the specified group. This will only succeed if it is in the list of editableGroups(). Beware that this also removes all the items in that group, so always ask the user before removing it! |
1.2.18