• 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 /* Hack for HPUX: Namespace pollution
24  m_unit is a define in <sys/sysmacros.h> */
25 #define m_unit outouftheway_m_unit
26 
27 #include <tqdict.h>
28 #include <tqvariant.h>
29 #include <tqobject.h>
30 #include <tqstring.h>
31 #include <kurl.h>
32 
33 #undef m_unit
34 
35 class TQValidator;
36 class KFilePlugin;
37 class KFileMetaInfoGroup;
38 
50 class TDEIO_EXPORT KFileMimeTypeInfo
51 {
52  // the plugin needs to be a friend because it puts the data into the object,
53  // and it should be the only one allowed to do this.
54  friend class KFilePlugin;
55  friend class KFileMetaInfoProvider;
56 
57 public:
58  KFileMimeTypeInfo() {}
59 
64  enum Attributes
65  {
66  Addable = 1,
67  Removable = 2,
68  Modifiable = 4,
69  Cumulative = 8,
72  Cummulative = Cumulative,
73  Averaged = 16,
75  MultiLine = 32,
79  SqueezeText = 64
83  };
84 
89  enum Hint {
90  NoHint = 0,
91  Name = 1,
92  Author = 2,
93  Description = 3,
94  Width = 4,
95  Height = 5,
96  Size = 6,
97  Bitrate = 7,
98  Length = 8,
99  Hidden = 9,
100  Thumbnail = 10
101 
102  };
103 
111  enum Unit {
112  NoUnit = 0,
113  Seconds = 1,
114  MilliSeconds = 2,
115  BitsPerSecond = 3,
116  Pixels = 4,
117  Inches = 5,
118  Centimeters = 6,
119  Bytes = 7,
120  FramesPerSecond = 8,
121  DotsPerInch = 9,
122  BitsPerPixel = 10,
123  Hertz = 11,
124  KiloBytes = 12,
125  Millimeters = 13
126  };
127 
128 
129  class ItemInfo;
130 
138  class TDEIO_EXPORT GroupInfo
139  {
140 
141  friend class KFilePlugin;
142  friend class KFileMimeTypeInfo;
143  public:
154  TQStringList supportedKeys() const
155  {
156  return m_supportedKeys;
157  }
158 
165  const TQString& name() const
166  {
167  return m_name;
168  }
169 
177  const TQString& translatedName() const
178  {
179  return m_translatedName;
180  }
181 
189  const ItemInfo * itemInfo( const TQString& key ) const;
190 
196  uint attributes() const
197  {
198  return m_attr;
199  }
200 
205  bool supportsVariableKeys() const
206  {
207  return m_variableItemInfo;
208  }
209 
217  const ItemInfo* variableItemInfo( ) const
218  {
219  return m_variableItemInfo;
220  }
221 
223  ~GroupInfo();
224  private:
226  GroupInfo( const TQString& name, const TQString& translatedName);
227 
229  KFileMimeTypeInfo::ItemInfo* addItemInfo( const TQString& key,
230  const TQString& translatedKey,
231  TQVariant::Type type);
232 
234  void addVariableInfo( TQVariant::Type type, uint attr );
235 
236  TQString m_name;
237  TQString m_translatedName;
238  TQStringList m_supportedKeys;
239  uint m_attr;
240  ItemInfo* m_variableItemInfo;
241  TQDict<ItemInfo> m_itemDict;
242 
243  };
244 
250  class TDEIO_EXPORT ItemInfo
251  {
252  friend class KFilePlugin;
253  friend class GroupInfo;
254  public:
256  ItemInfo() {} // ### should be private?
257 
265  const TQString& prefix() const
266  {
267  return m_prefix;
268  }
269 
276  const TQString& suffix() const
277  {
278  return m_suffix;
279  }
280 
287  TQVariant::Type type() const
288  {
289  return m_type;
290  }
291 
296  const TQString& key() const
297  {
298  return m_key;
299  }
300 
312  TQString string( const TQVariant& value, bool mangle = true ) const;
313 
319  bool isVariableItem() const
320  {
321  // every valid item is supposed to have a non-null key
322  return key().isNull();
323  }
324 
331  const TQString& translatedKey() const
332  {
333  return m_translatedKey;
334  }
335 
341  uint attributes() const
342  {
343  return m_attr;
344  }
345 
351  uint hint() const
352  {
353  return m_hint;
354  }
355 
361  uint unit() const
362  {
363  return m_unit;
364  }
365 
366  private:
368  ItemInfo(const TQString& key, const TQString& translatedKey,
369  TQVariant::Type type)
370  : m_key(key), m_translatedKey(translatedKey),
371  m_type(type),
372  m_attr(0), m_unit(NoUnit), m_hint(NoHint),
373  m_prefix(TQString::null), m_suffix(TQString::null)
374  {}
375 
376  TQString m_key;
377  TQString m_translatedKey;
378  TQVariant::Type m_type;
379  uint m_attr;
380  uint m_unit;
381  uint m_hint;
382  TQString m_prefix;
383  TQString m_suffix;
384  };
385 
386  // ### could it be made private? Would this be BC?
387  ~KFileMimeTypeInfo();
388 
400  TQValidator * createValidator(const TQString& group, const TQString& key,
401  TQObject *parent = 0, const char *name = 0) const;
402 
409  TQStringList supportedGroups() const;
410 
417  TQStringList translatedGroups() const;
418 
425  TQStringList preferredGroups() const
426  {
427  return m_preferredGroups;
428  }
429 
435  TQString mimeType() const {return m_mimeType;}
436 
444  const GroupInfo * groupInfo( const TQString& group ) const;
445 
446  // always returning stringlists which the user has to iterate and use them
447  // to look up the real items sounds strange to me. I think we should add
448  // our own iterators some time (somewhere in the future ;)
449 
456  TQStringList supportedKeys() const;
457 
463  TQStringList preferredKeys() const
464  {
465  return m_preferredKeys;
466  }
467 
468  // ### shouldn't this be private? BC?
469  GroupInfo * addGroupInfo( const TQString& name,
470  const TQString& translatedName);
471 
472  TQString m_translatedName;
473  TQStringList m_supportedKeys;
474  uint m_attr;
475  // bool m_supportsVariableKeys : 1;
476  TQDict<ItemInfo> m_itemDict;
477 
478 // ### this should be made private instead, but this would be BIC
479 protected:
481  KFileMimeTypeInfo( const TQString& mimeType );
482 
483  TQDict<GroupInfo> m_groups;
484  TQString m_mimeType;
485  TQStringList m_preferredKeys; // same as KFileMetaInfoProvider::preferredKeys()
486  TQStringList m_preferredGroups; // same as KFileMetaInfoProvider::preferredKeys()
487 };
488 
489 
496 class TDEIO_EXPORT KFileMetaInfoItem
497 {
498 public:
499  class Data;
500  typedef KFileMimeTypeInfo::Hint Hint;
501  typedef KFileMimeTypeInfo::Unit Unit;
502  typedef KFileMimeTypeInfo::Attributes Attributes;
503 
509  // ### hmm, then it should be private
510  KFileMetaInfoItem( const KFileMimeTypeInfo::ItemInfo* mti,
511  const TQString& key, const TQVariant& value);
512 
516  KFileMetaInfoItem( const KFileMetaInfoItem & item );
517 
527  const KFileMetaInfoItem& operator= (const KFileMetaInfoItem & item );
528 
532  KFileMetaInfoItem();
533 
534  ~KFileMetaInfoItem();
535 
541  TQString key() const;
542 
549  TQString translatedKey() const;
550 
556  const TQVariant& value() const;
557 
566  TQString string( bool mangle = true ) const;
567 
574  bool setValue( const TQVariant& value );
575 
581  TQVariant::Type type() const;
582 
592  bool isEditable() const;
593 
602  bool isRemoved() const;
603 
612  bool isModified() const;
613 
620  TQString prefix() const;
621 
628  TQString suffix() const;
629 
635  uint hint() const;
636 
643  uint unit() const;
644 
651  uint attributes() const;
652 
661  bool isValid() const;
662 
663  TDEIO_EXPORT friend TQDataStream& operator >>(TQDataStream& s, KFileMetaInfoItem& );
664  TDEIO_EXPORT friend TQDataStream& operator >>(TQDataStream& s, KFileMetaInfoGroup& );
665  TDEIO_EXPORT friend TQDataStream& operator <<(TQDataStream& s, const KFileMetaInfoItem& );
666  friend class KFileMetaInfoGroup;
667 
668 protected:
669  void setAdded();
670  void setRemoved();
671 
672  void ref();
673  void deref();
674 
675  Data *d;
676 };
677 
684 class TDEIO_EXPORT KFileMetaInfoGroup
685 {
686  friend class KFilePlugin;
687  friend class KFileMetaInfo;
688  TDEIO_EXPORT friend TQDataStream& operator >>(TQDataStream& s, KFileMetaInfoGroup& );
689  TDEIO_EXPORT friend TQDataStream& operator <<(TQDataStream& s, const KFileMetaInfoGroup& );
690 
691 public:
692  class Data;
698  // ### hmm, then it should be private
699  KFileMetaInfoGroup( const TQString& name, const KFileMimeTypeInfo* info );
700 
704  KFileMetaInfoGroup( const KFileMetaInfoGroup& original );
705 
715  const KFileMetaInfoGroup& operator= (const KFileMetaInfoGroup& info );
716 
722  KFileMetaInfoGroup();
723 
724  ~KFileMetaInfoGroup();
725 
734  bool isValid() const;
735 
742  bool isEmpty() const;
743 
752  bool isModified() const;
753 
758  KFileMetaInfoItem operator[]( const TQString& key ) const
759  { return item( key ); }
760 
767  KFileMetaInfoItem item( const TQString& key ) const;
768 
775  KFileMetaInfoItem item( uint hint ) const;
776 
784  const TQVariant value( const TQString& key ) const
785  {
786  const KFileMetaInfoItem &i = item( key );
787  return i.value();
788  }
789 
800  TQStringList supportedKeys() const;
801 
808  bool supportsVariableKeys() const;
809 
815  bool contains( const TQString& key ) const;
816 
822  TQStringList keys() const;
823 
829  TQStringList preferredKeys() const;
830 
837  // ### do we really want to support that?
838  // let's not waste time on thinking about it. Let's just kick it for now
839  // and add it in 4.0 if needed ;)
840 // const TQMemArray<TQVariant::Type>& types( const TQString& key ) const;
841 
850  KFileMetaInfoItem addItem( const TQString& key );
851 
861  bool removeItem(const TQString& key);
862 
868  TQStringList removedItems();
869 
875  TQString name() const;
876 
884  TQString translatedName() const;
885 
891  uint attributes() const;
892 
893 protected:
894  void setAdded();
895  KFileMetaInfoItem appendItem( const TQString& key, const TQVariant& value);
896 
897  Data* d;
898  void ref();
899  void deref();
900 
901 };
902 
903 
906 
907 
926 class TDEIO_EXPORT KFileMetaInfo
927 {
928 public:
929  typedef KFileMimeTypeInfo::Hint Hint;
930  typedef KFileMimeTypeInfo::Unit Unit;
931  typedef KFileMimeTypeInfo::Attributes Attributes;
932  class Data;
933 
938  enum What
939  {
940  Fastest = 0x1,
943  DontCare = 0x2,
944 
945  TechnicalInfo = 0x4,
948  ContentInfo = 0x8,
950  ExtenedAttr = 0x10,
952  Thumbnail = 0x20,
954  Preferred = 0x40,
955  Everything = 0xffff
956 
957  };
958 
979  KFileMetaInfo( const TQString& path,
980  const TQString& mimeType = TQString::null,
981  uint what = Fastest);
982 
990  KFileMetaInfo( const KURL& url,
991  const TQString& mimeType = TQString::null,
992  uint what = Fastest);
993 
998  KFileMetaInfo();
999 
1006  KFileMetaInfo( const KFileMetaInfo& original);
1007 
1008  ~KFileMetaInfo();
1009 
1020  const KFileMetaInfo& operator= (const KFileMetaInfo& info );
1021 
1022 
1028  TQStringList groups() const;
1029 
1035  TQStringList supportedGroups() const;
1036 
1042  TQStringList preferredGroups() const;
1043 
1049  TQStringList preferredKeys() const;
1050 
1056  TQStringList supportedKeys() const;
1057 
1063  TQStringList editableGroups() const;
1064 
1065  // I'd like to keep those for lookup without group, at least the hint
1066  // version
1073  KFileMetaInfoItem item(const TQString& key) const;
1080  KFileMetaInfoItem item(const KFileMetaInfoItem::Hint hint) const;
1081 
1090  KFileMetaInfoItem saveItem( const TQString& key,
1091  const TQString& preferredGroup = TQString::null,
1092  bool createGroup = true );
1093 
1100  KFileMetaInfoGroup group(const TQString& key) const;
1101 
1108  KFileMetaInfoGroup operator[] (const TQString& key) const
1109  {
1110  return group(key);
1111  }
1112 
1123  bool addGroup( const TQString& name );
1124 
1134  bool removeGroup( const TQString& name );
1135 
1141  TQStringList removedGroups();
1142 
1150  bool applyChanges();
1151 
1159  bool applyChanges(const TQString& path);
1160 
1167  bool contains( const TQString& key ) const;
1168 
1175  bool containsGroup( const TQString& key ) const;
1176 
1183  const TQVariant value( const TQString& key ) const
1184  {
1185  return item(key).value();
1186  }
1187 
1188 
1195  bool isValid() const;
1196 
1203  bool isEmpty() const;
1204 
1210  TQString mimeType() const;
1211 
1217  TQString path() const;
1218 
1224  KURL url() const;
1225 
1226  TDEIO_EXPORT friend TQDataStream& operator >>(TQDataStream& s, KFileMetaInfo& );
1227  TDEIO_EXPORT friend TQDataStream& operator <<(TQDataStream& s, const KFileMetaInfo& );
1228  friend class KFilePlugin;
1229 
1230 protected:
1231  KFileMetaInfoGroup appendGroup(const TQString& name);
1232 
1237  KFilePlugin * plugin() const;
1238 
1239  void ref();
1240  void deref();
1241 
1242  Data* d;
1243 
1244 private:
1245  KFileMetaInfoItem findEditableItem( KFileMetaInfoGroup& group,
1246  const TQString& key );
1247 
1248  void init( const KURL& url,
1249  const TQString& mimeType = TQString::null,
1250  uint what = Fastest);
1251 };
1252 
1255 
1256 
1394 class TDEIO_EXPORT KFilePlugin : public TQObject
1395 {
1396  TQ_OBJECT
1397 
1398 public:
1412  KFilePlugin( TQObject *parent, const char *name,
1413  const TQStringList& args );
1414 
1418  virtual ~KFilePlugin();
1419 
1432  virtual bool readInfo( KFileMetaInfo& info,
1433  uint what = KFileMetaInfo::Fastest ) = 0;
1434 
1442  virtual bool writeInfo( const KFileMetaInfo& info ) const
1443  {
1444  Q_UNUSED(info);
1445  return true;
1446  }
1447 
1462  virtual TQValidator* createValidator( const TQString& mimeType,
1463  const TQString& group,
1464  const TQString& key,
1465  TQObject* parent,
1466  const char* name) const
1467  {
1468  Q_UNUSED(mimeType); Q_UNUSED(group);Q_UNUSED(key);
1469  Q_UNUSED(parent);Q_UNUSED(name);
1470  return 0;
1471  }
1472 
1473 protected:
1474 
1482  KFileMimeTypeInfo * addMimeTypeInfo( const TQString& mimeType );
1483  // ### do we need this, if it only calls the provider?
1484  // IMHO the Plugin shouldn't call its provider.
1485  // DF: yes we need this. A plugin can create more than one mimetypeinfo.
1486  // What sucks though, is to let plugins do that in their ctor.
1487  // Would be much simpler to have a virtual init method for that,
1488  // so that the provider can set up stuff with the plugin pointer first!
1489 
1506  KFileMimeTypeInfo::GroupInfo* addGroupInfo(KFileMimeTypeInfo* info,
1507  const TQString& key, const TQString& translatedKey) const;
1508 
1516  void setAttributes(KFileMimeTypeInfo::GroupInfo* gi, uint attr) const;
1517 
1518  void addVariableInfo(KFileMimeTypeInfo::GroupInfo* gi, TQVariant::Type type,
1519  uint attr) const;
1520 
1535  KFileMimeTypeInfo::ItemInfo* addItemInfo(KFileMimeTypeInfo::GroupInfo* gi,
1536  const TQString& key,
1537  const TQString& translatedKey,
1538  TQVariant::Type type);
1539 
1549  void setAttributes(KFileMimeTypeInfo::ItemInfo* item, uint attr);
1550 
1560  void setHint(KFileMimeTypeInfo::ItemInfo* item, uint hint);
1561 
1572  void setUnit(KFileMimeTypeInfo::ItemInfo* item, uint unit);
1573 
1582  void setPrefix(KFileMimeTypeInfo::ItemInfo* item, const TQString& prefix);
1583 
1592  void setSuffix(KFileMimeTypeInfo::ItemInfo* item, const TQString& suffix);
1593 
1605  KFileMetaInfoGroup appendGroup(KFileMetaInfo& info, const TQString& key);
1606 
1615  void appendItem(KFileMetaInfoGroup& group, const TQString& key, TQVariant value);
1616 
1617  TQStringList m_preferredKeys;
1618  TQStringList m_preferredGroups;
1619 
1620 protected:
1628  virtual void virtual_hook( int id, void* data );
1629 private:
1630  class KFilePluginPrivate;
1631  KFilePluginPrivate *d;
1632 };
1633 
1636 
1637 
1646 class TDEIO_EXPORT KFileMetaInfoProvider: private TQObject
1647 {
1648  friend class KFilePlugin;
1649 
1650  TQ_OBJECT
1651 public:
1652  virtual ~KFileMetaInfoProvider();
1653 
1654  static KFileMetaInfoProvider * self();
1655 
1660  KFilePlugin * plugin( const TQString& mimeType ); // KDE4: merge with method below
1661 
1667  KFilePlugin * plugin( const TQString& mimeType, const TQString& protocol );
1668 
1669  const KFileMimeTypeInfo * mimeTypeInfo( const TQString& mimeType ); // KDE4: merge with below
1670  const KFileMimeTypeInfo * mimeTypeInfo( const TQString& mimeType, const TQString& protocol );
1671 
1672  TQStringList preferredKeys( const TQString& mimeType ) const;
1673  TQStringList preferredGroups( const TQString& mimeType ) const;
1674 
1676  TQStringList supportedMimeTypes() const;
1677 
1678 protected: // ## should be private, right?
1679  KFileMetaInfoProvider();
1680 
1681 private:
1682 
1683  // Data structure:
1684  // Mimetype or Protocol -> { Plugin and MimeTypeInfo }
1685  // The {} struct is CachedPluginInfo
1686  struct CachedPluginInfo
1687  {
1688  CachedPluginInfo() : plugin( 0 ), mimeTypeInfo( 0 ), ownsPlugin( false ) {}
1689  CachedPluginInfo( KFilePlugin* p, KFileMimeTypeInfo* i, bool owns )
1690  : plugin( p ), mimeTypeInfo( i ), ownsPlugin( owns ) {}
1691  // auto-delete behavior
1692  ~CachedPluginInfo() {
1693  if ( ownsPlugin ) delete plugin;
1694  delete mimeTypeInfo;
1695  }
1696 
1697  // If plugin and mimeTypeInfo are 0, means that no plugin is available.
1698  KFilePlugin* plugin;
1699  KFileMimeTypeInfo* mimeTypeInfo;
1700  // The problem here is that plugin can be shared in multiple instances,
1701  // so the memory management isn't easy. KDE4 solution: use TDESharedPtr?
1702  // For now we flag one copy of the KFilePlugin pointer as being "owned".
1703  bool ownsPlugin;
1704  };
1705 
1706  // The key is either a mimetype or a protocol. Those things don't look the same
1707  // so there's no need for two QDicts.
1708  TQDict<CachedPluginInfo> m_plugins;
1709 
1710  // This data is aggregated during the creation of a plugin,
1711  // before being moved to the appropriate CachedPluginInfo(s)
1712  // At any other time than during the loading of a plugin, this dict is EMPTY.
1713  // Same key as in m_plugins: mimetype or protocol
1714  TQDict<KFileMimeTypeInfo> m_pendingMimetypeInfos;
1715 
1716 private:
1717  static KFileMetaInfoProvider * s_self;
1718 
1719  KFilePlugin* loadPlugin( const TQString& mimeType, const TQString& protocol );
1720  KFilePlugin* loadAndRegisterPlugin( const TQString& mimeType, const TQString& protocol );
1721  KFileMimeTypeInfo * addMimeTypeInfo( const TQString& mimeType );
1722 
1723  class KFileMetaInfoProviderPrivate;
1724  KFileMetaInfoProviderPrivate *d;
1725 
1726 };
1727 
1728 TDEIO_EXPORT TQDataStream& operator <<(TQDataStream& s, const KFileMetaInfoItem& );
1729 TDEIO_EXPORT TQDataStream& operator >>(TQDataStream& s, KFileMetaInfoItem& );
1730 
1731 TDEIO_EXPORT TQDataStream& operator <<(TQDataStream& s, const KFileMetaInfoGroup& );
1732 TDEIO_EXPORT TQDataStream& operator >>(TQDataStream& s, KFileMetaInfoGroup& );
1733 
1734 TDEIO_EXPORT TQDataStream& operator <<(TQDataStream& s, const KFileMetaInfo& );
1735 TDEIO_EXPORT TQDataStream& operator >>(TQDataStream& s, KFileMetaInfo& );
1736 
1737 
1738 #endif // TDEFILEMETAINFO_H
KFileMetaInfoGroup
A group of meta information items about a file.
Definition: tdefilemetainfo.h:685
KFileMetaInfoGroup::value
const TQVariant value(const TQString &key) const
Convenience function.
Definition: tdefilemetainfo.h:784
KFileMetaInfoGroup::operator[]
KFileMetaInfoItem operator[](const TQString &key) const
Operator for convenience.
Definition: tdefilemetainfo.h:758
KFileMetaInfoItem
A meta information item about a file.
Definition: tdefilemetainfo.h:497
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:927
KFileMetaInfo::value
const TQVariant value(const TQString &key) const
Returns the value with the given key.
Definition: tdefilemetainfo.h:1183
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:939
KFileMetaInfo::Fastest
@ Fastest
do the fastest possible read and omit all items that might need a significantly longer time than the ...
Definition: tdefilemetainfo.h:940
KFileMimeTypeInfo::GroupInfo
Information about a meta information group.
Definition: tdefilemetainfo.h:139
KFileMimeTypeInfo::GroupInfo::supportsVariableKeys
bool supportsVariableKeys() const
Definition: tdefilemetainfo.h:205
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:177
KFileMimeTypeInfo::GroupInfo::name
const TQString & name() const
Use this method to get the name of the group.
Definition: tdefilemetainfo.h:165
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:154
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:217
KFileMimeTypeInfo::GroupInfo::attributes
uint attributes() const
Get the attributes of this group (see Attributes)
Definition: tdefilemetainfo.h:196
KFileMimeTypeInfo::ItemInfo
This is the class for one item of a KFileMimeTypeInfo.
Definition: tdefilemetainfo.h:251
KFileMimeTypeInfo::ItemInfo::translatedKey
const TQString & translatedKey() const
Returns a translation of the key for displaying to the user.
Definition: tdefilemetainfo.h:331
KFileMimeTypeInfo::ItemInfo::hint
uint hint() const
Return the hints for the item.
Definition: tdefilemetainfo.h:351
KFileMimeTypeInfo::ItemInfo::prefix
const TQString & prefix() const
This method returns a translated prefix to be displayed before the value.
Definition: tdefilemetainfo.h:265
KFileMimeTypeInfo::ItemInfo::attributes
uint attributes() const
Return the attributes of the item.
Definition: tdefilemetainfo.h:341
KFileMimeTypeInfo::ItemInfo::unit
uint unit() const
Return the unit of the item.
Definition: tdefilemetainfo.h:361
KFileMimeTypeInfo::ItemInfo::suffix
const TQString & suffix() const
This method returns a translated suffix to be displayed after the value.
Definition: tdefilemetainfo.h:276
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:287
KFileMimeTypeInfo::ItemInfo::key
const TQString & key() const
Returns the name of the item.
Definition: tdefilemetainfo.h:296
KFileMimeTypeInfo::ItemInfo::isVariableItem
bool isVariableItem() const
Is this item the variable item?
Definition: tdefilemetainfo.h:319
KFileMimeTypeInfo
Represents the capabilities of a KFilePlugin for a given mimetype.
Definition: tdefilemetainfo.h:51
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:425
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:65
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:111
KFileMimeTypeInfo::mimeType
TQString mimeType() const
Returns the mimetype to which this info belongs.
Definition: tdefilemetainfo.h:435
KFileMimeTypeInfo::Hint
Hint
This enum is mainly for items that have a special meaning for some applications.
Definition: tdefilemetainfo.h:89
KFileMimeTypeInfo::preferredKeys
TQStringList preferredKeys() const
Return a list of all supported keys in preference order.
Definition: tdefilemetainfo.h:463
KFilePlugin
Base class for a meta information plugin.
Definition: tdefilemetainfo.h:1395
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:1462
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:1442
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.

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.1
This website is maintained by Timothy Pearson.