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

tdeio/tdeio

Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
KFileMetaInfoGroup Class Reference

#include <tdefilemetainfo.h>

Public Member Functions

 KFileMetaInfoGroup (const TQString &name, const KFileMimeTypeInfo *info)
 
 KFileMetaInfoGroup (const KFileMetaInfoGroup &original)
 
const KFileMetaInfoGroup & operator= (const KFileMetaInfoGroup &info)
 
 KFileMetaInfoGroup ()
 
bool isValid () const
 
bool isEmpty () const
 
bool isModified () const
 
KFileMetaInfoItem operator[] (const TQString &key) const
 
KFileMetaInfoItem item (const TQString &key) const
 
KFileMetaInfoItem item (uint hint) const
 
const TQVariant value (const TQString &key) const
 
TQStringList supportedKeys () const
 
bool supportsVariableKeys () const
 
bool contains (const TQString &key) const
 
TQStringList keys () const
 
TQStringList preferredKeys () const
 
KFileMetaInfoItem addItem (const TQString &key)
 
bool removeItem (const TQString &key)
 
TQStringList removedItems ()
 
TQString name () const
 
TQString translatedName () const
 
uint attributes () const
 

Protected Member Functions

void setAdded ()
 
KFileMetaInfoItem appendItem (const TQString &key, const TQVariant &value)
 
void ref ()
 
void deref ()
 

Protected Attributes

Data * d
 

Friends

class KFilePlugin
 
class KFileMetaInfo
 
TDEIO_EXPORT friend TQDataStream & operator>> (TQDataStream &s, KFileMetaInfoGroup &)
 
TDEIO_EXPORT friend TQDataStream & operator<< (TQDataStream &s, const KFileMetaInfoGroup &)
 

Detailed Description

A group of meta information items about a file.

This is one group of meta information items about a file (see KFileMetaInfo).

Definition at line 684 of file tdefilemetainfo.h.

Constructor & Destructor Documentation

KFileMetaInfoGroup::KFileMetaInfoGroup ( const KFileMetaInfoGroup &  original)

Copy constructor.

Definition at line 1184 of file tdefilemetainfo.cpp.

KFileMetaInfoGroup::KFileMetaInfoGroup ( )

Default constructor.

This creates an "invalid" item

Since
3.1

Definition at line 1191 of file tdefilemetainfo.cpp.

Member Function Documentation

KFileMetaInfoItem KFileMetaInfoGroup::addItem ( const TQString &  key)

Add an item to the info.

Returns
the list of possible types that the value for the specified key can be. You can use this to determine the possible types for new keys before you add them. This is only possible if the specified key is in the supportedKeys list and not yet defined or if the group supports variable keys.
Parameters
keythe key of the item
Returns
the KFileMetaInfoItem for the given key

Definition at line 1356 of file tdefilemetainfo.cpp.

uint KFileMetaInfoGroup::attributes ( ) const

Returns the attributes of this item.

Returns
the attributes

Definition at line 1319 of file tdefilemetainfo.cpp.

bool KFileMetaInfoGroup::contains ( const TQString &  key) const

Checks whether an item with the given key exists.

Returns
true if an item for this key exists.

Definition at line 1289 of file tdefilemetainfo.cpp.

bool KFileMetaInfoGroup::isEmpty ( ) const

Returns false if the object contains data, true if it's empty.

An empty group is a group with no items (amazing, isn't it?).

Returns
true if empty, false otherwise

Definition at line 1220 of file tdefilemetainfo.cpp.

bool KFileMetaInfoGroup::isModified ( ) const

Returns true if an item as added or removed from the group.

Returns
true if an item was added or removed from the group, otherwise false.
Since
3.1

Definition at line 1330 of file tdefilemetainfo.cpp.

bool KFileMetaInfoGroup::isValid ( ) const

Returns true if the item is valid, i.e.

if it contains data, false if it's invalid (created with the default constructor and not been assigned anything), or if KFileMetaInfoGroup::item() didn't find your requested item).

Returns
true if valid, false if invalid

Definition at line 1214 of file tdefilemetainfo.cpp.

KFileMetaInfoItem KFileMetaInfoGroup::item ( const TQString &  key) const

This method searches for the specified item.

Parameters
keythe key of the item to search
Returns
the specified item if found, an invalid item, if not

Definition at line 1294 of file tdefilemetainfo.cpp.

KFileMetaInfoItem KFileMetaInfoGroup::item ( uint  hint) const

Returns the item with the given hint.

Parameters
hintthe hint of the item
Returns
the item with the specified hint

Definition at line 1303 of file tdefilemetainfo.cpp.

TQStringList KFileMetaInfoGroup::keys ( ) const

Returns a list of all keys.

Returns
a list of all keys in the order they were inserted.

Definition at line 1253 of file tdefilemetainfo.cpp.

TQString KFileMetaInfoGroup::name ( ) const

The name of this group.

Returns
the name of this group

Definition at line 1314 of file tdefilemetainfo.cpp.

const KFileMetaInfoGroup & KFileMetaInfoGroup::operator= ( const KFileMetaInfoGroup &  info)

The assignment operator, so you can do:

KFileMetaInfoGroup group = info.group("Technical");

This will create a shared copy of the object. The actual data is automatically deleted if all copies go out of scope

Definition at line 1201 of file tdefilemetainfo.cpp.

KFileMetaInfoItem KFileMetaInfoGroup::operator[] ( const TQString &  key) const
inline

Operator for convenience.

It does the same as item(), but you cannot specify a group to search in

Definition at line 758 of file tdefilemetainfo.h.

TQStringList KFileMetaInfoGroup::preferredKeys ( ) const

Returns a list of all keys in preference order.

Returns
a list of all keys in preference order.

Definition at line 1225 of file tdefilemetainfo.cpp.

TQStringList KFileMetaInfoGroup::removedItems ( )

Returns a list of all removed items.

Returns
a list of all removed items

Definition at line 1418 of file tdefilemetainfo.cpp.

bool KFileMetaInfoGroup::removeItem ( const TQString &  key)

Remove this item from the meta info of the file.

You cannot query KFileMetaInfo for a removed object, but you can query for a list of removed items with removedItems() if you need to. If you re-add it, its value will be cleared.

Parameters
keythe key of the removed item
Returns
true if successful, false otherwise

Definition at line 1390 of file tdefilemetainfo.cpp.

TQStringList KFileMetaInfoGroup::supportedKeys ( ) const

Use this method to get a list of keys in the specified group that the plugin knows about.

No variable keys. For a group that doesn't support variable keys, all keys that this group may have are returned. For a group that does support them, the non-variable ones are returned. See KFileMetaInfo about variable keys

Returns
the list of keys supported for this mimetype

Definition at line 1277 of file tdefilemetainfo.cpp.

bool KFileMetaInfoGroup::supportsVariableKeys ( ) const

Returns true if this group supports adding or removing arbitrary keys, false if not.

Returns
true is variable keys are supported, false otherwise

Definition at line 1283 of file tdefilemetainfo.cpp.

TQString KFileMetaInfoGroup::translatedName ( ) const

The translated name of this group.

Returns
the translated name of this group
Since
3.2

Definition at line 1271 of file tdefilemetainfo.cpp.

const TQVariant KFileMetaInfoGroup::value ( const TQString &  key) const
inline

Convenience function.

Returns the value of the specified key. It does the same as item(key).value().

Parameters
keythe key of the item to search
Returns
the value with the given key

Definition at line 784 of file tdefilemetainfo.h.


The documentation for this class was generated from the following files:
  • tdefilemetainfo.h
  • tdefilemetainfo.cpp

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
  •     tdecore
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  • tdeioslave
  •   http
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeio/tdeio by doxygen 1.8.8
This website is maintained by Timothy Pearson.