tdefilemetainfo.cpp
729 kdWarning(7033) << "Someone's trying to add a KFileMetaInfoGroup which is not supported or already existing: " << name << endl;
930KFilePlugin* KFileMetaInfoProvider::loadPlugin( const TQString& mimeType, const TQString& protocol )
945 const TDETrader::OfferList offers = TDETrader::self()->query( queryMimeType, "KFilePlugin", query, TQString::null );
961KFilePlugin* KFileMetaInfoProvider::loadAndRegisterPlugin( const TQString& mimeType, const TQString& protocol )
990 kdWarning(7033) << plugin->className() << " was created for " << mimeType << " but doesn't call addMimeTypeInfo for it!" << endl;
1003 //kdDebug(7033) << "plugin() : looking for plugin for protocol=" << protocol << " mimeType=" << mimeType << endl;
1071const KFileMimeTypeInfo * KFileMetaInfoProvider::mimeTypeInfo( const TQString& mimeType, const TQString& protocol )
1073 //kdDebug(7033) << "mimeTypeInfo() : looking for plugin for protocol=" << protocol << " mimeType=" << mimeType << endl;
1430 kdWarning() << "Trying to append a Metadata item for a non-existant group:" << d->name << endl;
1435 kdWarning() << "Trying to append a Metadata item for an unknown key (no ItemInfo): " << key << endl;
1483const KFileMimeTypeInfo::GroupInfo * KFileMimeTypeInfo::groupInfo( const TQString& group ) const
1565const KFileMimeTypeInfo::ItemInfo * KFileMimeTypeInfo::GroupInfo::itemInfo( const TQString& key ) const
1582// kdDebug(7034) << key << "(" << translatedKey << ") -> " << TQVariant::typeToName(type) << endl;
bool removeItem(const TQString &key)
Remove this item from the meta info of the file.
Definition: tdefilemetainfo.cpp:1390
bool isEmpty() const
Returns false if the object contains data, true if it's empty.
Definition: tdefilemetainfo.cpp:1220
KFileMetaInfoItem item(const TQString &key) const
This method searches for the specified item.
Definition: tdefilemetainfo.cpp:1294
const TQVariant value(const TQString &key) const
Convenience function.
Definition: tdefilemetainfo.h:784
TQStringList supportedKeys() const
Use this method to get a list of keys in the specified group that the plugin knows about.
Definition: tdefilemetainfo.cpp:1277
const KFileMetaInfoGroup & operator=(const KFileMetaInfoGroup &info)
The assignment operator, so you can do:
Definition: tdefilemetainfo.cpp:1201
bool supportsVariableKeys() const
Returns true if this group supports adding or removing arbitrary keys, false if not.
Definition: tdefilemetainfo.cpp:1283
TQString translatedName() const
The translated name of this group.
Definition: tdefilemetainfo.cpp:1271
KFileMetaInfoItem addItem(const TQString &key)
Add an item to the info.
Definition: tdefilemetainfo.cpp:1356
bool isModified() const
Returns true if an item as added or removed from the group.
Definition: tdefilemetainfo.cpp:1330
bool contains(const TQString &key) const
Checks whether an item with the given key exists.
Definition: tdefilemetainfo.cpp:1289
TQStringList preferredKeys() const
Returns a list of all keys in preference order.
Definition: tdefilemetainfo.cpp:1225
TQString translatedKey() const
Returns a translation of the key for displaying to the user.
Definition: tdefilemetainfo.cpp:170
bool isEditable() const
You can query if the application can edit the item and write it back to the file with this method.
Definition: tdefilemetainfo.cpp:227
TQString prefix() const
This method returns a translated prefix to be displayed before the value.
Definition: tdefilemetainfo.cpp:207
bool isRemoved() const
If you remove an item, it is only marked for removal for the file.
Definition: tdefilemetainfo.cpp:160
bool isModified() const
If you change an item, it is marked as "dirty".
Definition: tdefilemetainfo.cpp:202
TQString suffix() const
This method returns a translated suffix to be displayed after the value.
Definition: tdefilemetainfo.cpp:212
bool setValue(const TQVariant &value)
Changes the value of the item.
Definition: tdefilemetainfo.cpp:134
TQString string(bool mangle=true) const
Returns a string containing the value, if possible.
Definition: tdefilemetainfo.cpp:187
bool containsGroup(const TQString &key) const
Checks whether a group with the given key exists.
Definition: tdefilemetainfo.cpp:609
TQStringList editableGroups() const
Returns the list of groups that you can add or remove from the file.
Definition: tdefilemetainfo.cpp:387
bool contains(const TQString &key) const
Checks whether an item with the given key exists.
Definition: tdefilemetainfo.cpp:598
TQStringList preferredKeys() const
Returns a list of all preferred keys.
Definition: tdefilemetainfo.cpp:428
bool removeGroup(const TQString &name)
Remove the specified group.
Definition: tdefilemetainfo.cpp:487
bool applyChanges()
This method writes all pending changes of the meta info back to the file.
Definition: tdefilemetainfo.cpp:532
KFileMetaInfoItem item(const TQString &key) const
Returns the KFileMetaInfoItem with the given key.
Definition: tdefilemetainfo.cpp:614
TQStringList preferredGroups() const
Returns a list of the preferred groups.
Definition: tdefilemetainfo.cpp:402
TQStringList supportedKeys() const
Returns a list of supported keys.
Definition: tdefilemetainfo.cpp:371
TQStringList supportedGroups() const
Returns a list of all supported groups.
Definition: tdefilemetainfo.cpp:365
KFileMetaInfoGroup group(const TQString &key) const
Returns the KFileMetaInfoGroup with the given key.
Definition: tdefilemetainfo.cpp:441
const KFileMetaInfo & operator=(const KFileMetaInfo &info)
The assignment operator, so you can do e.g.
Definition: tdefilemetainfo.cpp:504
KFileMetaInfoItem saveItem(const TQString &key, const TQString &preferredGroup=TQString::null, bool createGroup=true)
Saves the item with the given key.
Definition: tdefilemetainfo.cpp:637
TQString path() const
Returns the path of file - or TQString::null if file is non-local.
Definition: tdefilemetainfo.cpp:734
bool addGroup(const TQString &name)
Try to add the specified group.
Definition: tdefilemetainfo.cpp:450
bool isEmpty() const
Returns false if the object contains data, true if it's empty.
Definition: tdefilemetainfo.cpp:523
Information about a meta information group.
Definition: tdefilemetainfo.h:139
const ItemInfo * variableItemInfo() const
If the group supports variable keys, you can query their item info with this method.
Definition: tdefilemetainfo.h:217
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
uint attributes() const
Get the attributes of this group (see Attributes)
Definition: tdefilemetainfo.h:196
const ItemInfo * itemInfo(const TQString &key) const
A group object can contain several item objects (of which you can get the names with supportedKeys() ...
Definition: tdefilemetainfo.cpp:1565
This is the class for one item of a KFileMimeTypeInfo.
Definition: tdefilemetainfo.h:251
TQString string(const TQVariant &value, bool mangle=true) const
Returns a string for the specified value, if possible.
Definition: tdefilemetainfo.cpp:1603
Represents the capabilities of a KFilePlugin for a given mimetype.
Definition: tdefilemetainfo.h:51
const GroupInfo * groupInfo(const TQString &group) const
Get the group info for a specific group.
Definition: tdefilemetainfo.cpp:1483
TQStringList translatedGroups() const
Same as the above function, but returns the strings to display to the user.
Definition: tdefilemetainfo.cpp:1506
TQString mimeType() const
Returns the mimetype to which this info belongs.
Definition: tdefilemetainfo.h:435
TQStringList supportedKeys() const
Return a list of all supported keys without looking for a specific group.
Definition: tdefilemetainfo.cpp:1516
TQStringList supportedGroups() const
Returns the list of all groups that the plugin for this mimetype supports.
Definition: tdefilemetainfo.cpp:1496
Hint
This enum is mainly for items that have a special meaning for some applications.
Definition: tdefilemetainfo.h:89
TQValidator * createValidator(const TQString &group, const TQString &key, TQObject *parent=0, const char *name=0) const
Creates a validator for this item.
Definition: tdefilemetainfo.cpp:1534
KFileMimeTypeInfo::GroupInfo * addGroupInfo(KFileMimeTypeInfo *info, const TQString &key, const TQString &translatedKey) const
Creates a meta information group for KFileMimeTypeInfo object returned by addMimeTypeInfo().
Definition: tdefilemetainfo.cpp:802
KFileMimeTypeInfo::ItemInfo * addItemInfo(KFileMimeTypeInfo::GroupInfo *gi, const TQString &key, const TQString &translatedKey, TQVariant::Type type)
Adds a meta information item to a GroupInfo object as returned by addGroupInfo().
Definition: tdefilemetainfo.cpp:819
void setPrefix(KFileMimeTypeInfo::ItemInfo *item, const TQString &prefix)
Sets a prefix string which is displayed before the item's value.
Definition: tdefilemetainfo.cpp:884
virtual void virtual_hook(int id, void *data)
Helper method to allow binary compatible extensions when needing "new virtual methods".
Definition: tdefilemetainfo.cpp:798
KFileMimeTypeInfo * addMimeTypeInfo(const TQString &mimeType)
Call this from within your constructor to tell the KFile framework what mimetypes your plugin support...
Definition: tdefilemetainfo.cpp:793
void setUnit(KFileMimeTypeInfo::ItemInfo *item, uint unit)
Sets the unit used in the meta information item.
Definition: tdefilemetainfo.cpp:837
virtual bool writeInfo(const KFileMetaInfo &info) const
Similar to the readInfo() but for writing the info back to the file.
Definition: tdefilemetainfo.h:1442
void appendItem(KFileMetaInfoGroup &group, const TQString &key, TQVariant value)
Call this method from within readInfo() to fill the meta information item identified by key with a va...
Definition: tdefilemetainfo.cpp:899
void setAttributes(KFileMimeTypeInfo::GroupInfo *gi, uint attr) const
Sets attributes of the GroupInfo object returned by addGroupInfo().
Definition: tdefilemetainfo.cpp:808
void setHint(KFileMimeTypeInfo::ItemInfo *item, uint hint)
Defines the meaning of the meta information item.
Definition: tdefilemetainfo.cpp:832
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(TQObject *parent, const char *name, const TQStringList &args)
Creates a new KFilePlugin instance.
Definition: tdefilemetainfo.cpp:781
void setSuffix(KFileMimeTypeInfo::ItemInfo *item, const TQString &suffix)
Sets a suffix string which is displayed before the item's value.
Definition: tdefilemetainfo.cpp:889
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.
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
static Ptr findByURL(const KURL &_url, mode_t _mode=0, bool _is_local_file=false, bool _fast_mode=false)
Finds a KMimeType with the given _url.
Definition: kmimetype.cpp:165
static KService::Ptr preferredService(const TQString &serviceType, const TQString &genericServiceType)
Returns the preferred service for _serviceType and _genericServiceType ("Application",...
Definition: kuserprofile.cpp:303
virtual OfferList query(const TQString &servicetype, const TQString &constraint=TQString::null, const TQString &preferences=TQString::null) const
The main function in the TDETrader class.
Definition: ktrader.cpp:106
static TDETrader * self()
This is a static pointer to a TDETrader instance.
Definition: ktrader.cpp:90
TDEIO_EXPORT TQString convertSizeFromKB(TDEIO::filesize_t kbSize)
Converts size from kilo-bytes to the string representation.
Definition: global.cpp:91
TDEIO_EXPORT TQString convertSize(TDEIO::filesize_t size)
Converts size from bytes to the string representation.
Definition: global.cpp:53