kwave
18.07.70
|
#include <CodecBase.h>
Classes | |
struct | MimeType |
Public Member Functions | |
CodecBase () | |
virtual | ~CodecBase () |
virtual bool | supports (const QMimeType &mimetype) |
virtual bool | supports (const QString &mimetype_name) |
virtual QStringList | extensions (const QString &mimetype_name) const |
virtual const QList< CodecBase::MimeType > | mimeTypes () |
virtual const QList< Kwave::Compression::Type > | compressionTypes () |
virtual void | addMimeType (const char *name, const QString &description, const char *patterns) |
virtual void | addCompression (Kwave::Compression::Type compression) |
virtual QString | mimeTypeOf (const QUrl &url) |
Private Attributes | |
QList< MimeType > | m_supported_mime_types |
QList< Kwave::Compression::Type > | m_supported_compression_types |
Definition at line 36 of file CodecBase.h.
Kwave::CodecBase::CodecBase | ( | ) |
Constructor
Definition at line 34 of file CodecBase.cpp.
|
virtual |
Destructor
Definition at line 40 of file CodecBase.cpp.
References m_supported_compression_types, and m_supported_mime_types.
|
virtual |
Adds a new compression type to the internal list of supported compression types.
compression | the compression type |
Definition at line 90 of file CodecBase.cpp.
References m_supported_compression_types.
|
virtual |
Adds a new mime type to the internal list of supported mime types. First it tries to find the mime type in the system, if none was found, a new mime type is created, using the passed parameters. The system's mime types are always preferred over the passed 'built-ins'.
name | the mime type's name (may also be a comma separated list) |
description | verbose description |
patterns | list of file patterns, passed as a single string, separated by "; " |
Definition at line 47 of file CodecBase.cpp.
References _, Kwave::CodecBase::MimeType::description, m_supported_mime_types, Kwave::CodecBase::MimeType::name, Kwave::CodecBase::MimeType::patterns, and supports().
Referenced by Kwave::AudiofileDecoder::AudiofileDecoder(), and Kwave::OggDecoder::OggDecoder().
|
virtual |
Returns a list of supported compression types
Definition at line 134 of file CodecBase.cpp.
References m_supported_compression_types.
Referenced by Kwave::FileInfoDialog::compressionChanged(), Kwave::FileInfoDialog::setupFileInfoTab(), and Kwave::FileInfoDialog::updateAvailableCompressions().
|
virtual |
Returns a list of supported file extensions
Definition at line 115 of file CodecBase.cpp.
References m_supported_mime_types, Kwave::CodecBase::MimeType::name, and Kwave::CodecBase::MimeType::patterns.
Referenced by Kwave::FileContext::saveFileAs().
|
virtual |
Tries to find the name of a mime type by a URL. If not found, it returns the default mime type, never an empty string.
url | a QUrl, only the filename's extension will be inspected |
Definition at line 140 of file CodecBase.cpp.
References _, m_supported_mime_types, Kwave::CodecBase::MimeType::name, and Kwave::CodecBase::MimeType::patterns.
Referenced by Kwave::CodecManager::mimeTypeOf().
|
virtual |
Returns a list of supported mime types
Definition at line 128 of file CodecBase.cpp.
References m_supported_mime_types.
Referenced by Kwave::CodecManager::decodingFilter(), Kwave::CodecManager::encodingFilter(), and Kwave::CodecManager::encodingMimeTypes().
|
virtual |
Returns true if the given mime type is supported
Definition at line 100 of file CodecBase.cpp.
Referenced by addMimeType(), Kwave::CodecManager::canDecode(), Kwave::CodecManager::decoder(), Kwave::CodecManager::encoder(), and Kwave::FileInfoDialog::setupFileInfoTab().
|
virtual |
Returns true if the given mime type is supported
Definition at line 106 of file CodecBase.cpp.
References m_supported_mime_types, and Kwave::CodecBase::MimeType::name.
|
private |
list of supported compression types
Definition at line 104 of file CodecBase.h.
Referenced by addCompression(), compressionTypes(), and ~CodecBase().
|
private |
list of supported mime types
Definition at line 101 of file CodecBase.h.
Referenced by addMimeType(), extensions(), mimeTypeOf(), mimeTypes(), supports(), and ~CodecBase().