kwave
18.07.70
|
#include <TypesMap.h>
Public Member Functions | |
TypesMap () | |
virtual | ~TypesMap () |
virtual void | fill ()=0 |
virtual void | append (IDX index, DATA data, const QString &name, const QString &description) |
unsigned int | count () const |
IDX | findFromData (const DATA &data) const |
IDX | findFromName (const QString &name) const |
DATA | data (IDX type) const |
QString | name (IDX type) const |
QString | description (IDX type, bool localized) const |
QStringList | allNames () const |
QList< IDX > | keys () const |
Private Types | |
typedef QMap< IDX, Kwave::Triple< DATA, QString, QString > > | TripleMap |
Private Attributes | |
TripleMap | m_list |
Definition at line 37 of file TypesMap.h.
|
private |
Definition at line 40 of file TypesMap.h.
|
inline |
Default constructor. Must be overwritten to initialize the list with useful values.
Definition at line 47 of file TypesMap.h.
|
inlinevirtual |
Destructor
Definition at line 53 of file TypesMap.h.
|
inline |
|
inlinevirtual |
Appends a new type into the map.
index | unique index within the map |
data | the data associated with the entry |
name | string representation of the type, for internal usage in Kwave commands. |
description | text for the user interface |
Definition at line 72 of file TypesMap.h.
|
inline |
Returns the number of types.
Definition at line 81 of file TypesMap.h.
Referenced by Kwave::Functions::count(), Kwave::Interpolation::descriptions(), Kwave::Functions::function(), Kwave::Functions::name(), Kwave::PlayBackDialog::PlayBackDialog(), and Kwave::RecordDialog::RecordDialog().
|
inline |
Returns the data item of a type.
Definition at line 110 of file TypesMap.h.
Referenced by Kwave::TypesMap< window_function_t, unsigned int >::findFromData(), Kwave::Functions::function(), Kwave::RecordDialog::methodSelected(), Kwave::PlayBackDialog::PlayBackDialog(), and Kwave::FileInfoDialog::setupFileInfoTab().
|
inline |
Returns the description of a type.
type | index of the type |
localized | if true, the returned description is localized |
Definition at line 128 of file TypesMap.h.
Referenced by Kwave::RecordPlugin::changeSampleFormat(), Kwave::Interpolation::descriptions(), Kwave::RecordPulseAudio::detectSupportedFormats(), Kwave::RecordALSA::initialize(), Kwave::RecordPulseAudio::initialize(), Kwave::AudiofileDecoder::open(), Kwave::PlayBackDialog::PlayBackDialog(), Kwave::RecordDialog::RecordDialog(), Kwave::RecordDialog::setSupportedSampleFormats(), and Kwave::FileInfoDialog::setupFileInfoTab().
|
pure virtual |
This function is abstract and must be overwritten to initially fill the map if it was empty.
Implemented in Kwave::FileInfo::PropertyTypesMap, Kwave::Interpolation::InterpolationMap, Kwave::WindowFunction::InitializedTypesMap, Kwave::SampleFormat::Map, Kwave::Functions::FunctionTypesMap, Kwave::PlayBackTypesMap, and Kwave::RecordTypesMap.
Referenced by Kwave::TypesMap< window_function_t, unsigned int >::~TypesMap().
|
inline |
Try to find the type from the data. If the data item is not found, the return value is the default value of the type (casted from 0).
Definition at line 89 of file TypesMap.h.
Referenced by Kwave::RecordPlugin::changeSampleFormat(), Kwave::PlaybackController::checkMethod(), Kwave::PlayBackPlugin::createDevice(), Kwave::Interpolation::descriptions(), Kwave::RecordPulseAudio::detectSupportedFormats(), Kwave::SampleFormat::fromInt(), Kwave::RecordALSA::initialize(), Kwave::RecordPulseAudio::initialize(), Kwave::PlayBackDialog::methodSelected(), Kwave::PlayBackDialog::setMethod(), Kwave::RecordDialog::setMethod(), and Kwave::RecordDialog::setSupportedSampleFormats().
|
inline |
Try to find the type from a name. If the name is not found, the return value is the default value of the type (casted from 0).
Definition at line 101 of file TypesMap.h.
|
inline |
Returns a list with all keys
Definition at line 150 of file TypesMap.h.
Referenced by Kwave::FileInfo::contains(), Kwave::FileInfo::dump(), Kwave::FileInfo::FileInfo(), Kwave::FileInfo::get(), Kwave::FileInfo::properties(), Kwave::FileInfo::set(), and Kwave::FileInfoDialog::setupFileInfoTab().
|
inline |
Returns the name of a type.
Definition at line 117 of file TypesMap.h.
Referenced by Kwave::PlaybackController::checkMethod(), Kwave::FileInfo::contains(), Kwave::PlayBackPlugin::createDevice(), Kwave::FileInfo::dump(), Kwave::FileInfo::FileInfo(), Kwave::TypesMap< window_function_t, unsigned int >::findFromName(), Kwave::FileInfo::get(), Kwave::PlayBackDialog::methodSelected(), Kwave::Functions::name(), Kwave::Interpolation::name(), Kwave::FileInfo::set(), and Kwave::PlayBackDialog::setMethod().
|
private |
map with index and triples of data, name and description
Definition at line 158 of file TypesMap.h.
Referenced by Kwave::TypesMap< window_function_t, unsigned int >::allNames(), Kwave::TypesMap< window_function_t, unsigned int >::append(), Kwave::TypesMap< window_function_t, unsigned int >::count(), Kwave::TypesMap< window_function_t, unsigned int >::data(), Kwave::TypesMap< window_function_t, unsigned int >::description(), Kwave::TypesMap< window_function_t, unsigned int >::findFromData(), Kwave::TypesMap< window_function_t, unsigned int >::findFromName(), Kwave::TypesMap< window_function_t, unsigned int >::keys(), Kwave::TypesMap< window_function_t, unsigned int >::name(), and Kwave::TypesMap< window_function_t, unsigned int >::~TypesMap().