ObjectDescription Class Reference(Phonon::ObjectDescription)The ObjectDescription class provides information about Phonon objects. Далее... #include <Phonon/ObjectDescription> Этот класс был введён в Qt 4.4. Открытые функции
Связанные нечлены класса
Подробное описаниеThe ObjectDescription class provides information about Phonon objects. Phonon currently uses this class to describe audio effects and audio output devices - using the typedefs AudioOutputDevice and EffectDescription. The type of an ObjectDescription is also described through the ObjectDescriptionType enum. Objects of the same type are uniquely identified by an index(). The class gives a description() and a name() of the object, both of which are strings appropriate for end users of a Phonon application. You can also check whether the device or effect described is valid. This does not guarantee that the device or effect functions as expected, but that the ObjectDescription describes an existing device or effect. Audio output devices and effect descriptions are used to select the audio output device to be used for playback and to create effects; we show examples of this in the snippet below. The available descriptions can be fetched with availableAudioOutputDevices() and availableAudioEffects() static functions in the Phonon::BackendCapabilities namespace QList<Phonon::EffectDescription> effectDescriptions = Phonon::BackendCapabilities::availableAudioEffects(); QList<Phonon::AudioOutputDevice> audioOutputDevices = Phonon::BackendCapabilities::availableAudioOutputDevices(); foreach (Phonon::EffectDescription effectDescription, effectDescriptions) { Phonon::Effect *effect = new Phonon::Effect(effectDescription); // ... Do something with the effect, like insert it into a media graph } Phonon::AudioOutput *audioOutput = new Phonon::AudioOutput; audioOutput->setOutputDevice(audioOutputDevices[0]); Other types of ObjectDescriptions might be possible in the future, e.g., descriptions of audio capture devices, such as microphones. See also Phonon::AudioOutputDevice, Phonon::EffectDescription, Capabilities Example, and Phonon Module. Описание функций-членовQString ObjectDescription::description () constReturns a more extensive description than the name() function. For example, in the case of AudioOutputDevices, this text should make clear which sound source is described; this is sometimes hard to describe or understand from just the name. The text is appropriate to present to an end user in for example tool tips of items, with the name()'s as text, in a QComboBox. int ObjectDescription::index () constReturns a unique identifier for this ObjectDescription. Used internally to distinguish between the descriptions. Notice that the identifiers are only unique to the type of description, e.g., AudioOutputDevice or EffectDescription. bool ObjectDescription::isValid () constReturns true if the device or effect described exists. An ObjectDescription that is invalid, will also have an index() of -1. See also index(). QString ObjectDescription::name () constReturns a string appropriate for a user to select between object descriptions, e.g., from a QComboBox. Смотрите также description(). QVariant ObjectDescription::property ( const char * name ) constReturns the property named name. A property can be used for extended information, such as the manufacturer of a sound card. The information will usually be given as text. If the property is not set an invalid QVariant is returned. Qt's backends do not use properties at the time of this writing. See also propertyNames(). QList<QByteArray> ObjectDescription::propertyNames () constProperties can be used for extended information about a ObjectDescription, e.g., a manufacturer of a sound card. The information will usually be given text. This function returns all names that return valid data when property() is called. Currently, Qt backends do not use properties for their object descriptions. See also property(). bool ObjectDescription::operator!= ( const ObjectDescription & otherDescription ) constReturns false if this ObjectDescription describes the same as otherDescription; otherwise, returns true. bool ObjectDescription::operator== ( const ObjectDescription & otherDescription ) constReturns true if this ObjectDescription describes the same object as otherDescription; otherwise, returns false. Связанные нечлены классаtypedef Phonon::AudioOutputDeviceThis typedef of ObjectDescription describes an audio output device, such as soundcards (with different drivers), sound servers, or other virtual outputs like playback on a different computer on the network. A list of available devices is given by the backend with Backendcapabilities::availableAudioOutputDevices() QList<Phonon::AudioOutputDevice> audioOutputDevices = Phonon::BackendCapabilities::availableAudioOutputDevices(); typedef Phonon::EffectDescriptionEffectDescription gives a description of an audio effect. It is a typedef of the ObjectDescription class. Please see its class description for details. EffectDescription is used to create audio Effects, which can be inserted into a media graph, altering an audio stream. Смотрите также Phonon::ObjectDescription, Пример "Capabilities" и "Media Player". enum Phonon::ObjectDescriptionTypeThis enum defines the type of information that is contained in a ObjectDescription object.
|
Попытка перевода Qt документации. Если есть желание присоединиться, или если есть замечания или пожелания, то заходите на форум: Перевод Qt документации на русский язык... Люди внесшие вклад в перевод: Команда переводчиков |