• Skip to content
  • Skip to link menu
KDE 4.6 API Reference
  • KDE API Reference
  • kdelibs
  • KDE Home
  • Contact Us
 

KIO

Public Types | Public Member Functions | Friends

KFileMetaInfo Class Reference

KFileMetaInfo provides metadata extracted from a file or other resource. More...

#include <kfilemetainfo.h>

List of all members.

Public Types

enum  What {
  Fastest = 0x1, TechnicalInfo = 0x4, ContentInfo = 0x8, ExternalSources = 0x10,
  Thumbnail = 0x20, LinkedData = 0x80, Everything = 0xffff
}

Public Member Functions

 KFileMetaInfo (const QString &path, const QString &mimetype=QString(), WhatFlags w=Everything)
 KFileMetaInfo (const KUrl &url)
 KFileMetaInfo (const KFileMetaInfo &)
 KFileMetaInfo ()
 ~KFileMetaInfo ()
bool applyChanges ()
KFileMetaInfoGroupList groups () const
bool isValid () const
KFileMetaInfoItem & item (const QString &key)
const KFileMetaInfoItem & item (const QString &key) const
const QHash< QString,
KFileMetaInfoItem > & 
items () const
QStringList keys () const
const KFileMetaInfo & operator= (KFileMetaInfo const &kfmi)
KFileMetaInfoGroupList preferredGroups () const
QStringList preferredKeys () const
KFileMetaInfoGroupList supportedGroups () const
QStringList supportedKeys () const
const KUrl & url () const

Friends

QDataStream & operator<< (QDataStream &s, const KFileMetaInfo &)
QDataStream & operator>> (QDataStream &s, KFileMetaInfo &)

Detailed Description

KFileMetaInfo provides metadata extracted from a file or other resource.

When instantiating an instance of this class, the metadata related to it will be retrieved and stored in the instance. The data can be inspected through KFileMetaInfoItem objects.

Definition at line 56 of file kfilemetainfo.h.


Member Enumeration Documentation

enum KFileMetaInfo::What

This is used to specify what a KFileMetaInfo object should read, so you can specify if you want to read "expensive" items or not.

This is like a preset which can be customized by passing additional parameters to constructors.

Enumerator:
Fastest 

do the fastest possible read and omit all items that might need a significantly longer time than the others

TechnicalInfo 

extract technical details about the file, like e.g.

play time, resolution or a compressioni type

ContentInfo 

read information about the content of the file like comments or id3 tags

ExternalSources 

read external metadata sources such as filesystem based extended attributes if they are supported for the filesystem; RDF storages etc

Thumbnail 

only read the file's thumbnail, if it contains one

LinkedData 
Everything 

read everything, even if it might take a while

Definition at line 64 of file kfilemetainfo.h.


Constructor & Destructor Documentation

KFileMetaInfo::KFileMetaInfo ( const QString &  path,
const QString &  mimetype = QString(),
WhatFlags  w = Everything 
) [explicit]

Construct a KFileMetaInfo that contains metainformation about the resource pointed to by path.

When w is not Everything, a limit of 64kbytes is imposed on the file size.

KFileMetaInfo::KFileMetaInfo ( const KUrl &  url)

Construct a KFileMetaInfo that contains metainformation about the resource pointed to by url.

Note:
that c'tor is not thread-safe

Definition at line 293 of file kfilemetainfo.cpp.

KFileMetaInfo::KFileMetaInfo ( )

Construct an empty, invalid KFileMetaInfo instance.

Definition at line 306 of file kfilemetainfo.cpp.

KFileMetaInfo::KFileMetaInfo ( const KFileMetaInfo &  k)

Construct a KFileMetaInfo instance from another one.

Definition at line 310 of file kfilemetainfo.cpp.

KFileMetaInfo::~KFileMetaInfo ( )

Destructor.

Definition at line 320 of file kfilemetainfo.cpp.


Member Function Documentation

bool KFileMetaInfo::applyChanges ( )

Save the changes made to this KFileMetaInfo instance.

Definition at line 324 of file kfilemetainfo.cpp.

KFileMetaInfoGroupList KFileMetaInfo::groups ( ) const
bool KFileMetaInfo::isValid ( ) const

Definition at line 370 of file kfilemetainfo.cpp.

KFileMetaInfoItem & KFileMetaInfo::item ( const QString &  key)

Definition at line 365 of file kfilemetainfo.cpp.

const KFileMetaInfoItem & KFileMetaInfo::item ( const QString &  key) const

Definition at line 354 of file kfilemetainfo.cpp.

const QHash< QString, KFileMetaInfoItem > & KFileMetaInfo::items ( ) const

Retrieve all the items.

Definition at line 349 of file kfilemetainfo.cpp.

QStringList KFileMetaInfo::keys ( ) const

Definition at line 360 of file kfilemetainfo.cpp.

const KFileMetaInfo & KFileMetaInfo::operator= ( KFileMetaInfo const &  kfmi)

Copy a KFileMetaInfo instance from another one.

Definition at line 314 of file kfilemetainfo.cpp.

KFileMetaInfoGroupList KFileMetaInfo::preferredGroups ( ) const

Deprecated.

Definition at line 386 of file kfilemetainfo.cpp.

QStringList KFileMetaInfo::preferredKeys ( ) const

Deprecated.

Definition at line 375 of file kfilemetainfo.cpp.

KFileMetaInfoGroupList KFileMetaInfo::supportedGroups ( ) const

Deprecated.

Definition at line 393 of file kfilemetainfo.cpp.

QStringList KFileMetaInfo::supportedKeys ( ) const

Deprecated.

Definition at line 380 of file kfilemetainfo.cpp.

const KUrl & KFileMetaInfo::url ( ) const

Definition at line 344 of file kfilemetainfo.cpp.


Friends And Related Function Documentation

QDataStream& operator<< ( QDataStream &  s,
const KFileMetaInfo &   
) [friend]

Definition at line 61 of file kfilemetainfo.cpp.

QDataStream& operator>> ( QDataStream &  s,
KFileMetaInfo &   
) [friend]

Definition at line 56 of file kfilemetainfo.cpp.


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

KIO

Skip menu "KIO"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.7.3
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal