Qtopia library API Documentation

MimeType Class Reference

The MimeType class provides MIME type information. More...

#include <mimetype.h>

Collaboration diagram for MimeType:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 MimeType (const QString &ext_or_id)
 MimeType (const DocLnk &)
QString id () const
QString description () const
QPixmap pixmap () const
QPixmap bigPixmap () const
const AppLnkapplication () const

Static Public Member Functions

QString appsFolderName ()
void updateApplications ()
void clear ()
void registerApp (const AppLnk &)

Detailed Description

The MimeType class provides MIME type information.

A MimeType object is a light-weight value which provides information about a MIME type.

Definition at line 33 of file mimetype.h.


Constructor & Destructor Documentation

MimeType::MimeType const QString ext_or_id  ) 
 

Constructs a MimeType. Normally, ext_or_id is a MIME type, but if ext_or_id starts with / or contains no /, it is interpretted as a filename and the extension (eg. .txt) is used as the MIME type.

Definition at line 151 of file mimetype.cpp.

MimeType::MimeType const DocLnk lnk  ) 
 

Constructs a MimeType from the type() of lnk.

Definition at line 159 of file mimetype.cpp.

References AppLnk::type().


Member Function Documentation

QString MimeType::id  )  const
 

Returns the MIME type identifier.

Definition at line 167 of file mimetype.cpp.

Referenced by AppLnk::type().

QString MimeType::description  )  const
 

Returns a description of the MIME Type. This is usually based on the application() associated with the type.

Definition at line 176 of file mimetype.cpp.

QPixmap MimeType::pixmap  )  const
 

Returns a small QPixmap appropriate for the MIME type.

Definition at line 185 of file mimetype.cpp.

QPixmap MimeType::bigPixmap  )  const
 

Returns a larger QPixmap appropriate for the MIME type.

Definition at line 214 of file mimetype.cpp.

const AppLnk * MimeType::application  )  const
 

Returns the AppLnk defining the application associated with this MIME type, or 0 if none is associated.

The caller must not retain the pointer, but of course you can dereference it to take a copy if needed.

See also:
Service::binding()

Definition at line 229 of file mimetype.cpp.

Referenced by DocLnk::exec(), and DocLnk::invoke().

QString MimeType::appsFolderName  )  [static]
 

Returns a Qtopia folder containing application definitions.

Definition at line 350 of file mimetype.cpp.

References QPEApplication::qpeDir().

Referenced by updateApplications().

void MimeType::updateApplications  )  [static]
 

Reloads application definitions.

Definition at line 358 of file mimetype.cpp.

References appsFolderName().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for OPIE Version 1.5.5.
Documentation copyright © 1997-2003 the KDE developers. 2003 OPIE developers
Generated on Tue Feb 10 20:24:24 2004 by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2001