kio
KFileMimeTypeInfo Class Reference
Represents the capabilities of a KFilePlugin for a given mimetype. More...
#include <kfilemetainfo.h>
Detailed Description
Represents the capabilities of a KFilePlugin for a given mimetype.This class provides information about the capabilities that a KFilePlugin for a given mimetype has. It includes a list of metainfo groups and items together with their type, a prefix, suffix and some other information about how to use, display or edit the items.
Definition at line 50 of file kfilemetainfo.h.
Member Enumeration Documentation
This enum is used to specify some attributes that an item can have, which fit neither in the Hint nor in the Unit enum.
- Enumerator:
-
Addable The item or group can be added by a user. Removable It can be removed. Modifiable The value can be edited (no meaning for a group). Cumulative If an application wants to display information for more than one file, it may add up the values for this item (e.g. play time of an mp3 file)
Cummulative - Deprecated:
- Use Cumulative instead
Averaged Similar to Cumulative, but the average should be calculated instead of the sum. MultiLine This attribute says that a string item is likely to be more than one line long, so for editing, a widget capable for multline text should be used. - Since:
- 3.1
SqueezeText If the text for this item is very long, it should be squeezed to the size of the widget where it's displayed. - Since:
- 3.1
Definition at line 64 of file kfilemetainfo.h.
This enum is mainly for items that have a special meaning for some applications.
- Enumerator:
Definition at line 89 of file kfilemetainfo.h.
This enum exists so that you can specify units for items, which you can usually use for integer items, so an application knows how to display it (e.g.
a time in seconds in a hh:mm:ss form). You can either use one of those units, or if you don't find one that fits, you can add it yourself using a prefix and/or suffix.
- Enumerator:
Definition at line 111 of file kfilemetainfo.h.
Constructor & Destructor Documentation
KFileMimeTypeInfo::KFileMimeTypeInfo | ( | ) | [inline] |
Definition at line 58 of file kfilemetainfo.h.
KFileMimeTypeInfo::~KFileMimeTypeInfo | ( | ) |
Definition at line 1479 of file kfilemetainfo.cpp.
KFileMimeTypeInfo::KFileMimeTypeInfo | ( | const QString & | mimeType | ) | [protected] |
Member Function Documentation
KFileMimeTypeInfo::GroupInfo * KFileMimeTypeInfo::addGroupInfo | ( | const QString & | name, | |
const QString & | translatedName | |||
) |
Definition at line 1488 of file kfilemetainfo.cpp.
QValidator * KFileMimeTypeInfo::createValidator | ( | const QString & | group, | |
const QString & | key, | |||
QObject * | parent = 0 , |
|||
const char * | name = 0 | |||
) | const |
Creates a validator for this item.
Make sure to supply a proper parent
argument or delete the validator yourself.
- Parameters:
-
group the group of the item key the key of the item parent the parent of the QObject, or 0 for a parent-less object name the name of the QObject, can be 0
- Returns:
- the validator. You are responsible for deleting it. 0 if creation failed
Definition at line 1534 of file kfilemetainfo.cpp.
const KFileMimeTypeInfo::GroupInfo * KFileMimeTypeInfo::groupInfo | ( | const QString & | group | ) | const |
Get the group info for a specific group.
- Parameters:
-
group the group whose group info should be retrieved
- Returns:
- a pointer to the info. 0 if it does not exist. Don't delete this object!
Definition at line 1483 of file kfilemetainfo.cpp.
QString KFileMimeTypeInfo::mimeType | ( | ) | const [inline] |
Returns the mimetype to which this info belongs.
- Returns:
- the mimetype of this info
Definition at line 435 of file kfilemetainfo.h.
QStringList KFileMimeTypeInfo::preferredGroups | ( | ) | const [inline] |
This returns the list of groups in the preferred order that's specified in the .desktop file.
- Returns:
- the list of groups
Definition at line 425 of file kfilemetainfo.h.
QStringList KFileMimeTypeInfo::preferredKeys | ( | ) | const [inline] |
Return a list of all supported keys in preference order.
- Returns:
- the list of keys
Definition at line 463 of file kfilemetainfo.h.
QStringList KFileMimeTypeInfo::supportedGroups | ( | ) | const |
Returns the list of all groups that the plugin for this mimetype supports.
- Returns:
- the list of groups
Definition at line 1496 of file kfilemetainfo.cpp.
QStringList KFileMimeTypeInfo::supportedKeys | ( | ) | const |
Return a list of all supported keys without looking for a specific group.
- Returns:
- the list of keys
Definition at line 1516 of file kfilemetainfo.cpp.
QStringList KFileMimeTypeInfo::translatedGroups | ( | ) | const |
Same as the above function, but returns the strings to display to the user.
- Returns:
- the list of groups
Definition at line 1506 of file kfilemetainfo.cpp.
Member Data Documentation
Definition at line 474 of file kfilemetainfo.h.
QDict<GroupInfo> KFileMimeTypeInfo::m_groups [protected] |
Definition at line 483 of file kfilemetainfo.h.
Definition at line 476 of file kfilemetainfo.h.
QString KFileMimeTypeInfo::m_mimeType [protected] |
Definition at line 484 of file kfilemetainfo.h.
QStringList KFileMimeTypeInfo::m_preferredGroups [protected] |
Definition at line 486 of file kfilemetainfo.h.
QStringList KFileMimeTypeInfo::m_preferredKeys [protected] |
Definition at line 485 of file kfilemetainfo.h.
Definition at line 473 of file kfilemetainfo.h.
Definition at line 472 of file kfilemetainfo.h.
The documentation for this class was generated from the following files: