KFileMetaInfo

KFileMetaInfo Class Reference

#include <kfilemetainfo.h>

Public Types

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

Public Member Functions

 KFileMetaInfo (const QString &path, const QString &mimetype=QString(), WhatFlags w=Everything)
 
 KFileMetaInfo (const QUrl &url)
 
 KFileMetaInfo ()
 
 KFileMetaInfo (const 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
 
KFileMetaInfooperator= (KFileMetaInfo const &kfmi)
 
KFileMetaInfoGroupList preferredGroups () const
 
QStringList preferredKeys () const
 
KFileMetaInfoGroupList supportedGroups () const
 
QStringList supportedKeys () const
 
QUrl url () const
 

Friends

QDataStreamoperator<< (QDataStream &s, const KFileMetaInfo &)
 
QDataStreamoperator>> (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 58 of file kfilemetainfo.h.

Member Enumeration Documentation

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

Everything 

read everything, even if it might take a while

Definition at line 67 of file kfilemetainfo.h.

Constructor & Destructor Documentation

KFileMetaInfo::KFileMetaInfo ( const QString path,
const QString mimetype = QString(),
KFileMetaInfo::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.

Definition at line 295 of file kfilemetainfo.cpp.

KFileMetaInfo::KFileMetaInfo ( const QUrl 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 313 of file kfilemetainfo.cpp.

KFileMetaInfo::KFileMetaInfo ( )

Construct an empty, invalid KFileMetaInfo instance.

Definition at line 326 of file kfilemetainfo.cpp.

KFileMetaInfo::KFileMetaInfo ( const KFileMetaInfo k)

Construct a KFileMetaInfo instance from another one.

Definition at line 330 of file kfilemetainfo.cpp.

KFileMetaInfo::~KFileMetaInfo ( )

Destructor.

Definition at line 340 of file kfilemetainfo.cpp.

Member Function Documentation

bool KFileMetaInfo::applyChanges ( )

Save the changes made to this KFileMetaInfo instance.

Definition at line 344 of file kfilemetainfo.cpp.

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

Retrieve all the items.

Definition at line 369 of file kfilemetainfo.cpp.

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

Copy a KFileMetaInfo instance from another one.

Definition at line 334 of file kfilemetainfo.cpp.

KFileMetaInfoGroupList KFileMetaInfo::preferredGroups ( ) const

Deprecated.

Definition at line 406 of file kfilemetainfo.cpp.

QStringList KFileMetaInfo::preferredKeys ( ) const

Deprecated.

Definition at line 395 of file kfilemetainfo.cpp.

KFileMetaInfoGroupList KFileMetaInfo::supportedGroups ( ) const

Deprecated.

Definition at line 413 of file kfilemetainfo.cpp.

QStringList KFileMetaInfo::supportedKeys ( ) const

Deprecated.

Definition at line 400 of file kfilemetainfo.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Aug 10 2020 23:02:32 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.