• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdeio/tdeio
 

tdeio/tdeio

  • tdeio
  • tdeio
tdefilemetainfo.h
1/*
2 * This file is part of the KDE libraries
3 * Copyright (C) 2001-2002 Rolf Magnus <ramagnus@kde.org>
4 * Copyright (C) 2001-2002 Carsten Pfeiffer <pfeiffer@kde.org>
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation version 2.0.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
14 *
15 * You should have received a copy of the GNU Library General Public License
16 * along with this library; see the file COPYING.LIB. If not, write to
17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301, USA.
19 */
20#ifndef TDEFILEMETAINFO_H
21#define TDEFILEMETAINFO_H
22
23#include <tqdict.h>
24#include <tqvariant.h>
25#include <tqobject.h>
26#include <tqstring.h>
27#include <kurl.h>
28
29class TQValidator;
30class KFilePlugin;
31class KFileMetaInfoGroup;
32
44class TDEIO_EXPORT KFileMimeTypeInfo
45{
46 // the plugin needs to be a friend because it puts the data into the object,
47 // and it should be the only one allowed to do this.
48 friend class KFilePlugin;
49 friend class KFileMetaInfoProvider;
50
51public:
52 KFileMimeTypeInfo() {}
53
58 enum Attributes
59 {
60 Addable = 1,
61 Removable = 2,
62 Modifiable = 4,
63 Cumulative = 8,
66 Cummulative = Cumulative,
67 Averaged = 16,
69 MultiLine = 32,
73 SqueezeText = 64
77 };
78
83 enum Hint {
84 NoHint = 0,
85 Name = 1,
86 Author = 2,
87 Description = 3,
88 Width = 4,
89 Height = 5,
90 Size = 6,
91 Bitrate = 7,
92 Length = 8,
93 Hidden = 9,
94 Thumbnail = 10
95
96 };
97
105 enum Unit {
106 NoUnit = 0,
107 Seconds = 1,
108 MilliSeconds = 2,
109 BitsPerSecond = 3,
110 Pixels = 4,
111 Inches = 5,
112 Centimeters = 6,
113 Bytes = 7,
114 FramesPerSecond = 8,
115 DotsPerInch = 9,
116 BitsPerPixel = 10,
117 Hertz = 11,
118 KiloBytes = 12,
119 Millimeters = 13
120 };
121
122
123 class ItemInfo;
124
132 class TDEIO_EXPORT GroupInfo
133 {
134
135 friend class KFilePlugin;
136 friend class KFileMimeTypeInfo;
137 public:
148 TQStringList supportedKeys() const
149 {
150 return m_supportedKeys;
151 }
152
159 const TQString& name() const
160 {
161 return m_name;
162 }
163
171 const TQString& translatedName() const
172 {
173 return m_translatedName;
174 }
175
183 const ItemInfo * itemInfo( const TQString& key ) const;
184
190 uint attributes() const
191 {
192 return m_attr;
193 }
194
199 bool supportsVariableKeys() const
200 {
201 return m_variableItemInfo;
202 }
203
211 const ItemInfo* variableItemInfo( ) const
212 {
213 return m_variableItemInfo;
214 }
215
217 ~GroupInfo();
218 private:
220 GroupInfo( const TQString& name, const TQString& translatedName);
221
223 KFileMimeTypeInfo::ItemInfo* addItemInfo( const TQString& key,
224 const TQString& translatedKey,
225 TQVariant::Type type);
226
228 void addVariableInfo( TQVariant::Type type, uint attr );
229
230 TQString m_name;
231 TQString m_translatedName;
232 TQStringList m_supportedKeys;
233 uint m_attr;
234 ItemInfo* m_variableItemInfo;
235 TQDict<ItemInfo> m_itemDict;
236
237 };
238
244 class TDEIO_EXPORT ItemInfo
245 {
246 friend class KFilePlugin;
247 friend class GroupInfo;
248 public:
250 ItemInfo() {} // ### should be private?
251
259 const TQString& prefix() const
260 {
261 return m_prefix;
262 }
263
270 const TQString& suffix() const
271 {
272 return m_suffix;
273 }
274
281 TQVariant::Type type() const
282 {
283 return m_type;
284 }
285
290 const TQString& key() const
291 {
292 return m_key;
293 }
294
306 TQString string( const TQVariant& value, bool mangle = true ) const;
307
313 bool isVariableItem() const
314 {
315 // every valid item is supposed to have a non-null key
316 return key().isNull();
317 }
318
325 const TQString& translatedKey() const
326 {
327 return m_translatedKey;
328 }
329
335 uint attributes() const
336 {
337 return m_attr;
338 }
339
345 uint hint() const
346 {
347 return m_hint;
348 }
349
355 uint unit() const
356 {
357 return m_unit;
358 }
359
360 private:
362 ItemInfo(const TQString& key, const TQString& translatedKey,
363 TQVariant::Type type)
364 : m_key(key), m_translatedKey(translatedKey),
365 m_type(type),
366 m_attr(0), m_unit(NoUnit), m_hint(NoHint),
367 m_prefix(TQString::null), m_suffix(TQString::null)
368 {}
369
370 TQString m_key;
371 TQString m_translatedKey;
372 TQVariant::Type m_type;
373 uint m_attr;
374 uint m_unit;
375 uint m_hint;
376 TQString m_prefix;
377 TQString m_suffix;
378 };
379
380 // ### could it be made private? Would this be BC?
381 ~KFileMimeTypeInfo();
382
394 TQValidator * createValidator(const TQString& group, const TQString& key,
395 TQObject *parent = 0, const char *name = 0) const;
396
403 TQStringList supportedGroups() const;
404
411 TQStringList translatedGroups() const;
412
419 TQStringList preferredGroups() const
420 {
421 return m_preferredGroups;
422 }
423
429 TQString mimeType() const {return m_mimeType;}
430
438 const GroupInfo * groupInfo( const TQString& group ) const;
439
440 // always returning stringlists which the user has to iterate and use them
441 // to look up the real items sounds strange to me. I think we should add
442 // our own iterators some time (somewhere in the future ;)
443
450 TQStringList supportedKeys() const;
451
457 TQStringList preferredKeys() const
458 {
459 return m_preferredKeys;
460 }
461
462 // ### shouldn't this be private? BC?
463 GroupInfo * addGroupInfo( const TQString& name,
464 const TQString& translatedName);
465
466 TQString m_translatedName;
467 TQStringList m_supportedKeys;
468 uint m_attr;
469 // bool m_supportsVariableKeys : 1;
470 TQDict<ItemInfo> m_itemDict;
471
472// ### this should be made private instead, but this would be BIC
473protected:
475 KFileMimeTypeInfo( const TQString& mimeType );
476
477 TQDict<GroupInfo> m_groups;
478 TQString m_mimeType;
479 TQStringList m_preferredKeys; // same as KFileMetaInfoProvider::preferredKeys()
480 TQStringList m_preferredGroups; // same as KFileMetaInfoProvider::preferredKeys()
481};
482
483
490class TDEIO_EXPORT KFileMetaInfoItem
491{
492public:
493 class Data;
494 typedef KFileMimeTypeInfo::Hint Hint;
495 typedef KFileMimeTypeInfo::Unit Unit;
496 typedef KFileMimeTypeInfo::Attributes Attributes;
497
503 // ### hmm, then it should be private
504 KFileMetaInfoItem( const KFileMimeTypeInfo::ItemInfo* mti,
505 const TQString& key, const TQVariant& value);
506
510 KFileMetaInfoItem( const KFileMetaInfoItem & item );
511
521 const KFileMetaInfoItem& operator= (const KFileMetaInfoItem & item );
522
526 KFileMetaInfoItem();
527
528 ~KFileMetaInfoItem();
529
535 TQString key() const;
536
543 TQString translatedKey() const;
544
550 const TQVariant& value() const;
551
560 TQString string( bool mangle = true ) const;
561
568 bool setValue( const TQVariant& value );
569
575 TQVariant::Type type() const;
576
586 bool isEditable() const;
587
596 bool isRemoved() const;
597
606 bool isModified() const;
607
614 TQString prefix() const;
615
622 TQString suffix() const;
623
629 uint hint() const;
630
637 uint unit() const;
638
645 uint attributes() const;
646
655 bool isValid() const;
656
657 TDEIO_EXPORT friend TQDataStream& operator >>(TQDataStream& s, KFileMetaInfoItem& );
658 TDEIO_EXPORT friend TQDataStream& operator >>(TQDataStream& s, KFileMetaInfoGroup& );
659 TDEIO_EXPORT friend TQDataStream& operator <<(TQDataStream& s, const KFileMetaInfoItem& );
660 friend class KFileMetaInfoGroup;
661
662protected:
663 void setAdded();
664 void setRemoved();
665
666 void ref();
667 void deref();
668
669 Data *d;
670};
671
678class TDEIO_EXPORT KFileMetaInfoGroup
679{
680 friend class KFilePlugin;
681 friend class KFileMetaInfo;
682 TDEIO_EXPORT friend TQDataStream& operator >>(TQDataStream& s, KFileMetaInfoGroup& );
683 TDEIO_EXPORT friend TQDataStream& operator <<(TQDataStream& s, const KFileMetaInfoGroup& );
684
685public:
686 class Data;
692 // ### hmm, then it should be private
693 KFileMetaInfoGroup( const TQString& name, const KFileMimeTypeInfo* info );
694
698 KFileMetaInfoGroup( const KFileMetaInfoGroup& original );
699
709 const KFileMetaInfoGroup& operator= (const KFileMetaInfoGroup& info );
710
716 KFileMetaInfoGroup();
717
718 ~KFileMetaInfoGroup();
719
728 bool isValid() const;
729
736 bool isEmpty() const;
737
746 bool isModified() const;
747
752 KFileMetaInfoItem operator[]( const TQString& key ) const
753 { return item( key ); }
754
761 KFileMetaInfoItem item( const TQString& key ) const;
762
769 KFileMetaInfoItem item( uint hint ) const;
770
778 const TQVariant value( const TQString& key ) const
779 {
780 const KFileMetaInfoItem &i = item( key );
781 return i.value();
782 }
783
794 TQStringList supportedKeys() const;
795
802 bool supportsVariableKeys() const;
803
809 bool contains( const TQString& key ) const;
810
816 TQStringList keys() const;
817
823 TQStringList preferredKeys() const;
824
831 // ### do we really want to support that?
832 // let's not waste time on thinking about it. Let's just kick it for now
833 // and add it in 4.0 if needed ;)
834// const TQMemArray<TQVariant::Type>& types( const TQString& key ) const;
835
844 KFileMetaInfoItem addItem( const TQString& key );
845
855 bool removeItem(const TQString& key);
856
862 TQStringList removedItems();
863
869 TQString name() const;
870
878 TQString translatedName() const;
879
885 uint attributes() const;
886
887protected:
888 void setAdded();
889 KFileMetaInfoItem appendItem( const TQString& key, const TQVariant& value);
890
891 Data* d;
892 void ref();
893 void deref();
894
895};
896
897
900
901
920class TDEIO_EXPORT KFileMetaInfo
921{
922public:
923 typedef KFileMimeTypeInfo::Hint Hint;
924 typedef KFileMimeTypeInfo::Unit Unit;
925 typedef KFileMimeTypeInfo::Attributes Attributes;
926 class Data;
927
932 enum What
933 {
934 Fastest = 0x1,
937 DontCare = 0x2,
938
939 TechnicalInfo = 0x4,
942 ContentInfo = 0x8,
944 ExtenedAttr = 0x10,
946 Thumbnail = 0x20,
948 Preferred = 0x40,
949 Everything = 0xffff
950
951 };
952
973 KFileMetaInfo( const TQString& path,
974 const TQString& mimeType = TQString::null,
975 uint what = Fastest);
976
984 KFileMetaInfo( const KURL& url,
985 const TQString& mimeType = TQString::null,
986 uint what = Fastest);
987
992 KFileMetaInfo();
993
1000 KFileMetaInfo( const KFileMetaInfo& original);
1001
1002 ~KFileMetaInfo();
1003
1014 const KFileMetaInfo& operator= (const KFileMetaInfo& info );
1015
1016
1022 TQStringList groups() const;
1023
1029 TQStringList supportedGroups() const;
1030
1036 TQStringList preferredGroups() const;
1037
1043 TQStringList preferredKeys() const;
1044
1050 TQStringList supportedKeys() const;
1051
1057 TQStringList editableGroups() const;
1058
1059 // I'd like to keep those for lookup without group, at least the hint
1060 // version
1067 KFileMetaInfoItem item(const TQString& key) const;
1074 KFileMetaInfoItem item(const KFileMetaInfoItem::Hint hint) const;
1075
1084 KFileMetaInfoItem saveItem( const TQString& key,
1085 const TQString& preferredGroup = TQString::null,
1086 bool createGroup = true );
1087
1094 KFileMetaInfoGroup group(const TQString& key) const;
1095
1102 KFileMetaInfoGroup operator[] (const TQString& key) const
1103 {
1104 return group(key);
1105 }
1106
1117 bool addGroup( const TQString& name );
1118
1128 bool removeGroup( const TQString& name );
1129
1135 TQStringList removedGroups();
1136
1144 bool applyChanges();
1145
1153 bool applyChanges(const TQString& path);
1154
1161 bool contains( const TQString& key ) const;
1162
1169 bool containsGroup( const TQString& key ) const;
1170
1177 const TQVariant value( const TQString& key ) const
1178 {
1179 return item(key).value();
1180 }
1181
1182
1189 bool isValid() const;
1190
1197 bool isEmpty() const;
1198
1204 TQString mimeType() const;
1205
1211 TQString path() const;
1212
1218 KURL url() const;
1219
1220 TDEIO_EXPORT friend TQDataStream& operator >>(TQDataStream& s, KFileMetaInfo& );
1221 TDEIO_EXPORT friend TQDataStream& operator <<(TQDataStream& s, const KFileMetaInfo& );
1222 friend class KFilePlugin;
1223
1224protected:
1225 KFileMetaInfoGroup appendGroup(const TQString& name);
1226
1231 KFilePlugin * plugin() const;
1232
1233 void ref();
1234 void deref();
1235
1236 Data* d;
1237
1238private:
1239 KFileMetaInfoItem findEditableItem( KFileMetaInfoGroup& group,
1240 const TQString& key );
1241
1242 void init( const KURL& url,
1243 const TQString& mimeType = TQString::null,
1244 uint what = Fastest);
1245};
1246
1249
1250
1388class TDEIO_EXPORT KFilePlugin : public TQObject
1389{
1390 TQ_OBJECT
1391
1392public:
1406 KFilePlugin( TQObject *parent, const char *name,
1407 const TQStringList& args );
1408
1412 virtual ~KFilePlugin();
1413
1426 virtual bool readInfo( KFileMetaInfo& info,
1427 uint what = KFileMetaInfo::Fastest ) = 0;
1428
1436 virtual bool writeInfo( const KFileMetaInfo& info ) const
1437 {
1438 Q_UNUSED(info);
1439 return true;
1440 }
1441
1456 virtual TQValidator* createValidator( const TQString& mimeType,
1457 const TQString& group,
1458 const TQString& key,
1459 TQObject* parent,
1460 const char* name) const
1461 {
1462 Q_UNUSED(mimeType); Q_UNUSED(group);Q_UNUSED(key);
1463 Q_UNUSED(parent);Q_UNUSED(name);
1464 return 0;
1465 }
1466
1467protected:
1468
1476 KFileMimeTypeInfo * addMimeTypeInfo( const TQString& mimeType );
1477 // ### do we need this, if it only calls the provider?
1478 // IMHO the Plugin shouldn't call its provider.
1479 // DF: yes we need this. A plugin can create more than one mimetypeinfo.
1480 // What sucks though, is to let plugins do that in their ctor.
1481 // Would be much simpler to have a virtual init method for that,
1482 // so that the provider can set up stuff with the plugin pointer first!
1483
1500 KFileMimeTypeInfo::GroupInfo* addGroupInfo(KFileMimeTypeInfo* info,
1501 const TQString& key, const TQString& translatedKey) const;
1502
1510 void setAttributes(KFileMimeTypeInfo::GroupInfo* gi, uint attr) const;
1511
1512 void addVariableInfo(KFileMimeTypeInfo::GroupInfo* gi, TQVariant::Type type,
1513 uint attr) const;
1514
1529 KFileMimeTypeInfo::ItemInfo* addItemInfo(KFileMimeTypeInfo::GroupInfo* gi,
1530 const TQString& key,
1531 const TQString& translatedKey,
1532 TQVariant::Type type);
1533
1543 void setAttributes(KFileMimeTypeInfo::ItemInfo* item, uint attr);
1544
1554 void setHint(KFileMimeTypeInfo::ItemInfo* item, uint hint);
1555
1566 void setUnit(KFileMimeTypeInfo::ItemInfo* item, uint unit);
1567
1576 void setPrefix(KFileMimeTypeInfo::ItemInfo* item, const TQString& prefix);
1577
1586 void setSuffix(KFileMimeTypeInfo::ItemInfo* item, const TQString& suffix);
1587
1599 KFileMetaInfoGroup appendGroup(KFileMetaInfo& info, const TQString& key);
1600
1609 void appendItem(KFileMetaInfoGroup& group, const TQString& key, TQVariant value);
1610
1611 TQStringList m_preferredKeys;
1612 TQStringList m_preferredGroups;
1613
1614protected:
1622 virtual void virtual_hook( int id, void* data );
1623private:
1624 class KFilePluginPrivate;
1625 KFilePluginPrivate *d;
1626};
1627
1630
1631
1640class TDEIO_EXPORT KFileMetaInfoProvider: private TQObject
1641{
1642 friend class KFilePlugin;
1643
1644 TQ_OBJECT
1645public:
1646 virtual ~KFileMetaInfoProvider();
1647
1648 static KFileMetaInfoProvider * self();
1649
1654 KFilePlugin * plugin( const TQString& mimeType ); // KDE4: merge with method below
1655
1661 KFilePlugin * plugin( const TQString& mimeType, const TQString& protocol );
1662
1663 const KFileMimeTypeInfo * mimeTypeInfo( const TQString& mimeType ); // KDE4: merge with below
1664 const KFileMimeTypeInfo * mimeTypeInfo( const TQString& mimeType, const TQString& protocol );
1665
1666 TQStringList preferredKeys( const TQString& mimeType ) const;
1667 TQStringList preferredGroups( const TQString& mimeType ) const;
1668
1670 TQStringList supportedMimeTypes() const;
1671
1672protected: // ## should be private, right?
1673 KFileMetaInfoProvider();
1674
1675private:
1676
1677 // Data structure:
1678 // Mimetype or Protocol -> { Plugin and MimeTypeInfo }
1679 // The {} struct is CachedPluginInfo
1680 struct CachedPluginInfo
1681 {
1682 CachedPluginInfo() : plugin( 0 ), mimeTypeInfo( 0 ), ownsPlugin( false ) {}
1683 CachedPluginInfo( KFilePlugin* p, KFileMimeTypeInfo* i, bool owns )
1684 : plugin( p ), mimeTypeInfo( i ), ownsPlugin( owns ) {}
1685 // auto-delete behavior
1686 ~CachedPluginInfo() {
1687 if ( ownsPlugin ) delete plugin;
1688 delete mimeTypeInfo;
1689 }
1690
1691 // If plugin and mimeTypeInfo are 0, means that no plugin is available.
1692 KFilePlugin* plugin;
1693 KFileMimeTypeInfo* mimeTypeInfo;
1694 // The problem here is that plugin can be shared in multiple instances,
1695 // so the memory management isn't easy. KDE4 solution: use TDESharedPtr?
1696 // For now we flag one copy of the KFilePlugin pointer as being "owned".
1697 bool ownsPlugin;
1698 };
1699
1700 // The key is either a mimetype or a protocol. Those things don't look the same
1701 // so there's no need for two QDicts.
1702 TQDict<CachedPluginInfo> m_plugins;
1703
1704 // This data is aggregated during the creation of a plugin,
1705 // before being moved to the appropriate CachedPluginInfo(s)
1706 // At any other time than during the loading of a plugin, this dict is EMPTY.
1707 // Same key as in m_plugins: mimetype or protocol
1708 TQDict<KFileMimeTypeInfo> m_pendingMimetypeInfos;
1709
1710private:
1711 static KFileMetaInfoProvider * s_self;
1712
1713 KFilePlugin* loadPlugin( const TQString& mimeType, const TQString& protocol );
1714 KFilePlugin* loadAndRegisterPlugin( const TQString& mimeType, const TQString& protocol );
1715 KFileMimeTypeInfo * addMimeTypeInfo( const TQString& mimeType );
1716
1717 class KFileMetaInfoProviderPrivate;
1718 KFileMetaInfoProviderPrivate *d;
1719
1720};
1721
1722TDEIO_EXPORT TQDataStream& operator <<(TQDataStream& s, const KFileMetaInfoItem& );
1723TDEIO_EXPORT TQDataStream& operator >>(TQDataStream& s, KFileMetaInfoItem& );
1724
1725TDEIO_EXPORT TQDataStream& operator <<(TQDataStream& s, const KFileMetaInfoGroup& );
1726TDEIO_EXPORT TQDataStream& operator >>(TQDataStream& s, KFileMetaInfoGroup& );
1727
1728TDEIO_EXPORT TQDataStream& operator <<(TQDataStream& s, const KFileMetaInfo& );
1729TDEIO_EXPORT TQDataStream& operator >>(TQDataStream& s, KFileMetaInfo& );
1730
1731
1732#endif // TDEFILEMETAINFO_H
KFileMetaInfoGroup
A group of meta information items about a file.
Definition: tdefilemetainfo.h:679
KFileMetaInfoGroup::value
const TQVariant value(const TQString &key) const
Convenience function.
Definition: tdefilemetainfo.h:778
KFileMetaInfoGroup::operator[]
KFileMetaInfoItem operator[](const TQString &key) const
Operator for convenience.
Definition: tdefilemetainfo.h:752
KFileMetaInfoItem
A meta information item about a file.
Definition: tdefilemetainfo.h:491
KFileMetaInfoItem::value
const TQVariant & value() const
Returns the value of the item.
Definition: tdefilemetainfo.cpp:182
KFileMetaInfo
Meta Information about a file.
Definition: tdefilemetainfo.h:921
KFileMetaInfo::value
const TQVariant value(const TQString &key) const
Returns the value with the given key.
Definition: tdefilemetainfo.h:1177
KFileMetaInfo::What
What
This is used to specify what a KFileMetaInfo object should read, so you can specify if you want to re...
Definition: tdefilemetainfo.h:933
KFileMetaInfo::Fastest
@ Fastest
do the fastest possible read and omit all items that might need a significantly longer time than the ...
Definition: tdefilemetainfo.h:934
KFileMimeTypeInfo::GroupInfo
Information about a meta information group.
Definition: tdefilemetainfo.h:133
KFileMimeTypeInfo::GroupInfo::supportsVariableKeys
bool supportsVariableKeys() const
Definition: tdefilemetainfo.h:199
KFileMimeTypeInfo::GroupInfo::variableItemInfo
const ItemInfo * variableItemInfo() const
If the group supports variable keys, you can query their item info with this method.
Definition: tdefilemetainfo.h:211
KFileMimeTypeInfo::GroupInfo::translatedName
const TQString & translatedName() const
Use this method to get the string to display to the user as group name.
Definition: tdefilemetainfo.h:171
KFileMimeTypeInfo::GroupInfo::supportedKeys
TQStringList supportedKeys() const
Use this method to get a list of keys in the specified group that the plugin knows about.
Definition: tdefilemetainfo.h:148
KFileMimeTypeInfo::GroupInfo::name
const TQString & name() const
Use this method to get the name of the group.
Definition: tdefilemetainfo.h:159
KFileMimeTypeInfo::GroupInfo::attributes
uint attributes() const
Get the attributes of this group (see Attributes)
Definition: tdefilemetainfo.h:190
KFileMimeTypeInfo::ItemInfo
This is the class for one item of a KFileMimeTypeInfo.
Definition: tdefilemetainfo.h:245
KFileMimeTypeInfo::ItemInfo::prefix
const TQString & prefix() const
This method returns a translated prefix to be displayed before the value.
Definition: tdefilemetainfo.h:259
KFileMimeTypeInfo::ItemInfo::suffix
const TQString & suffix() const
This method returns a translated suffix to be displayed after the value.
Definition: tdefilemetainfo.h:270
KFileMimeTypeInfo::ItemInfo::hint
uint hint() const
Return the hints for the item.
Definition: tdefilemetainfo.h:345
KFileMimeTypeInfo::ItemInfo::translatedKey
const TQString & translatedKey() const
Returns a translation of the key for displaying to the user.
Definition: tdefilemetainfo.h:325
KFileMimeTypeInfo::ItemInfo::attributes
uint attributes() const
Return the attributes of the item.
Definition: tdefilemetainfo.h:335
KFileMimeTypeInfo::ItemInfo::unit
uint unit() const
Return the unit of the item.
Definition: tdefilemetainfo.h:355
KFileMimeTypeInfo::ItemInfo::type
TQVariant::Type type() const
The items for a file are stored as a TQVariant and this method can be used to get the data type of th...
Definition: tdefilemetainfo.h:281
KFileMimeTypeInfo::ItemInfo::key
const TQString & key() const
Returns the name of the item.
Definition: tdefilemetainfo.h:290
KFileMimeTypeInfo::ItemInfo::isVariableItem
bool isVariableItem() const
Is this item the variable item?
Definition: tdefilemetainfo.h:313
KFileMimeTypeInfo
Represents the capabilities of a KFilePlugin for a given mimetype.
Definition: tdefilemetainfo.h:45
KFileMimeTypeInfo::preferredGroups
TQStringList preferredGroups() const
This returns the list of groups in the preferred order that's specified in the .desktop file.
Definition: tdefilemetainfo.h:419
KFileMimeTypeInfo::Attributes
Attributes
This enum is used to specify some attributes that an item can have, which fit neither in the Hint nor...
Definition: tdefilemetainfo.h:59
KFileMimeTypeInfo::Unit
Unit
This enum exists so that you can specify units for items, which you can usually use for integer items...
Definition: tdefilemetainfo.h:105
KFileMimeTypeInfo::mimeType
TQString mimeType() const
Returns the mimetype to which this info belongs.
Definition: tdefilemetainfo.h:429
KFileMimeTypeInfo::Hint
Hint
This enum is mainly for items that have a special meaning for some applications.
Definition: tdefilemetainfo.h:83
KFileMimeTypeInfo::preferredKeys
TQStringList preferredKeys() const
Return a list of all supported keys in preference order.
Definition: tdefilemetainfo.h:457
KFilePlugin
Base class for a meta information plugin.
Definition: tdefilemetainfo.h:1389
KFilePlugin::writeInfo
virtual bool writeInfo(const KFileMetaInfo &info) const
Similar to the readInfo() but for writing the info back to the file.
Definition: tdefilemetainfo.h:1436
KFilePlugin::appendGroup
KFileMetaInfoGroup appendGroup(KFileMetaInfo &info, const TQString &key)
Call this method from within readInfo() to indicate that you wish to fill meta information items of t...
Definition: tdefilemetainfo.cpp:894
KFilePlugin::readInfo
virtual bool readInfo(KFileMetaInfo &info, uint what=KFileMetaInfo::Fastest)=0
Read the info from the file in this method and insert it into the provided KFileMetaInfo object.
KFilePlugin::createValidator
virtual TQValidator * createValidator(const TQString &mimeType, const TQString &group, const TQString &key, TQObject *parent, const char *name) const
This method should create an appropriate validator for the specified item if it's editable or return ...
Definition: tdefilemetainfo.h:1456

tdeio/tdeio

Skip menu "tdeio/tdeio"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

tdeio/tdeio

Skip menu "tdeio/tdeio"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeio/tdeio by doxygen 1.9.4
This website is maintained by Timothy Pearson.