#include <tdefilemetainfo.h>
Classes | |
| class | GroupInfo |
| class | ItemInfo |
Public Types | |
| enum | Attributes { Addable = 1 , Removable = 2 , Modifiable = 4 , Cumulative = 8 , Cummulative = Cumulative , Averaged = 16 , MultiLine = 32 , SqueezeText = 64 } |
| enum | Hint { NoHint = 0 , Name = 1 , Author = 2 , Description = 3 , Width = 4 , Height = 5 , Size = 6 , Bitrate = 7 , Length = 8 , Hidden = 9 , Thumbnail = 10 } |
| enum | Unit { NoUnit = 0 , Seconds = 1 , MilliSeconds = 2 , BitsPerSecond = 3 , Pixels = 4 , Inches = 5 , Centimeters = 6 , Bytes = 7 , FramesPerSecond = 8 , DotsPerInch = 9 , BitsPerPixel = 10 , Hertz = 11 , KiloBytes = 12 , Millimeters = 13 } |
Public Member Functions | |
| TQValidator * | createValidator (const TQString &group, const TQString &key, TQObject *parent=0, const char *name=0) const |
| TQStringList | supportedGroups () const |
| TQStringList | translatedGroups () const |
| TQStringList | preferredGroups () const |
| TQString | mimeType () const |
| const GroupInfo * | groupInfo (const TQString &group) const |
| TQStringList | supportedKeys () const |
| TQStringList | preferredKeys () const |
| GroupInfo * | addGroupInfo (const TQString &name, const TQString &translatedName) |
Public Attributes | |
| TQString | m_translatedName |
| TQStringList | m_supportedKeys |
| uint | m_attr |
| TQDict< ItemInfo > | m_itemDict |
Protected Member Functions | |
| KFileMimeTypeInfo (const TQString &mimeType) | |
Protected Attributes | |
| TQDict< GroupInfo > | m_groups |
| TQString | m_mimeType |
| TQStringList | m_preferredKeys |
| TQStringList | m_preferredGroups |
Friends | |
| class | KFilePlugin |
| class | KFileMetaInfoProvider |
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 44 of file tdefilemetainfo.h.
Member Enumeration Documentation
◆ Attributes
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 |
|
| 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.
|
| SqueezeText | If the text for this item is very long, it should be squeezed to the size of the widget where it's displayed.
|
Definition at line 58 of file tdefilemetainfo.h.
◆ Hint
This enum is mainly for items that have a special meaning for some applications.
Definition at line 83 of file tdefilemetainfo.h.
◆ Unit
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.
Definition at line 105 of file tdefilemetainfo.h.
Constructor & Destructor Documentation
◆ KFileMimeTypeInfo() [1/2]
|
inline |
Definition at line 52 of file tdefilemetainfo.h.
◆ ~KFileMimeTypeInfo()
| KFileMimeTypeInfo::~KFileMimeTypeInfo | ( | ) |
Definition at line 1479 of file tdefilemetainfo.cpp.
◆ KFileMimeTypeInfo() [2/2]
|
protected |
Definition at line 1473 of file tdefilemetainfo.cpp.
Member Function Documentation
◆ addGroupInfo()
| KFileMimeTypeInfo::GroupInfo * KFileMimeTypeInfo::addGroupInfo | ( | const TQString & | name, |
| const TQString & | translatedName | ||
| ) |
Definition at line 1488 of file tdefilemetainfo.cpp.
◆ createValidator()
| TQValidator * KFileMimeTypeInfo::createValidator | ( | const TQString & | group, |
| const TQString & | key, | ||
| TQObject * | 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 TQObject, or 0 for a parent-less object name the name of the TQObject, can be 0
- Returns
- the validator. You are responsible for deleting it. 0 if creation failed
Definition at line 1534 of file tdefilemetainfo.cpp.
◆ groupInfo()
| const KFileMimeTypeInfo::GroupInfo * KFileMimeTypeInfo::groupInfo | ( | const TQString & | 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 tdefilemetainfo.cpp.
◆ mimeType()
|
inline |
Returns the mimetype to which this info belongs.
- Returns
- the mimetype of this info
Definition at line 429 of file tdefilemetainfo.h.
◆ preferredGroups()
|
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 419 of file tdefilemetainfo.h.
◆ preferredKeys()
|
inline |
Return a list of all supported keys in preference order.
- Returns
- the list of keys
Definition at line 457 of file tdefilemetainfo.h.
◆ supportedGroups()
| TQStringList 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 tdefilemetainfo.cpp.
◆ supportedKeys()
| TQStringList 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 tdefilemetainfo.cpp.
◆ translatedGroups()
| TQStringList 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 tdefilemetainfo.cpp.
Friends And Related Symbol Documentation
◆ KFileMetaInfoProvider
|
friend |
Definition at line 49 of file tdefilemetainfo.h.
◆ KFilePlugin
|
friend |
Definition at line 48 of file tdefilemetainfo.h.
Member Data Documentation
◆ m_attr
| uint KFileMimeTypeInfo::m_attr |
Definition at line 468 of file tdefilemetainfo.h.
◆ m_groups
|
protected |
Definition at line 477 of file tdefilemetainfo.h.
◆ m_itemDict
| TQDict<ItemInfo> KFileMimeTypeInfo::m_itemDict |
Definition at line 470 of file tdefilemetainfo.h.
◆ m_mimeType
|
protected |
Definition at line 478 of file tdefilemetainfo.h.
◆ m_preferredGroups
|
protected |
Definition at line 480 of file tdefilemetainfo.h.
◆ m_preferredKeys
|
protected |
Definition at line 479 of file tdefilemetainfo.h.
◆ m_supportedKeys
| TQStringList KFileMimeTypeInfo::m_supportedKeys |
Definition at line 467 of file tdefilemetainfo.h.
◆ m_translatedName
| TQString KFileMimeTypeInfo::m_translatedName |
Definition at line 466 of file tdefilemetainfo.h.
The documentation for this class was generated from the following files:
Trinity API Reference