Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.trolltech.qt.phonon
Class Path

    java.lang.Object
      com.trolltech.qt.QSignalEmitter
          com.trolltech.qt.QtJambiObject
              com.trolltech.qt.phonon.Path

All Implemented Interfaces:
  QtJambiInterface, java.lang.Cloneable

    public class Path

extends QtJambiObject
implements java.lang.Cloneable

The Path class describes connections between media objects. Paths objects provide a convenient way to process media data by allowing effects to be inserted between input and output sources.

        MediaObject *media = new MediaObject;
        AudioOutput *output = new AudioOutput(Phonon::MusicCategory);
        Path path = Phonon::createPath(media, output);
        Q_ASSERT(path.isValid()); // for this simple case the path should always be
                                  //valid - there are unit tests to ensure it
        // insert an effect
        QList<EffectDescription> effectList = BackendCapabilities::availableAudioEffects();
        if (!effectList.isEmpty()) {
            Effect *effect = path.insertEffect(effectList.first());
        }

Author: Matthias Kretz <.org> Author: Thierry Bastian <thierry..com>

Nested Class Summary

Nested classes/interfaces inherited from class com.trolltech.qt.QSignalEmitter
`QSignalEmitter.Signal0, QSignalEmitter.Signal1, QSignalEmitter.Signal2, QSignalEmitter.Signal3, QSignalEmitter.Signal4, QSignalEmitter.Signal5, QSignalEmitter.Signal6, QSignalEmitter.Signal7, QSignalEmitter.Signal8, QSignalEmitter.Signal9`

Constructor Summary
`Path()`
`Path(Path arg__1)` Constructs a copy of the other `arg_1` specified.

Method Summary
`Path` | `clone()` This method is reimplemented for internal reasons
`boolean` | `disconnectPath()` Creates an invalid path.
`java.util.List` | `effects()` Returns a list of Effect objects that are currently used as effects.
`static Path` | `fromNativePointer(QNativePointer nativePointer)` This method returns the Path instance pointed to by `nativePointer`.
`boolean` | `insertEffect(Effect newEffect)` Inserts the given `effect` into the path before the effect specified by `insertBefore` and returns true if successful; otherwise returns false.
`Effect` | `insertEffect(EffectDescription desc)` Creates and inserts an effect into the path.
`Effect` | `insertEffect(EffectDescription desc, Effect insertBefore)` Creates and inserts an effect into the path.
`boolean` | `insertEffect(Effect newEffect, Effect insertBefore)` Inserts the given `effect` into the path before the effect specified by `insertBefore` and returns true if successful; otherwise returns false.
`boolean` | `isValid()` Returns true if the backend provides an implementation of this class; otherwise, returns false.
`static QNativePointer` | `nativePointerArray(Path[] array)` This function returns a QNativePointer that is pointing to the specified Path array.
`boolean` | `reconnect(MediaNodeInterface source, MediaNodeInterface sink)` Changes this Path's input and output node to source and sink
`boolean` | `removeEffect(Effect effect)` Removes the given `effect` from the path and returns true; otherwise returns false.

Methods inherited from class com.trolltech.qt.QtJambiObject
`dispose, disposed, equals, finalize, reassignNativeResources, tr, tr, tr`

Methods inherited from class com.trolltech.qt.QSignalEmitter
`blockSignals, disconnect, disconnect, signalsBlocked, signalSender, thread`

Methods inherited from class java.lang.Object
`getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface com.trolltech.qt.QtJambiInterface
`disableGarbageCollection, nativeId, nativePointer, reenableGarbageCollection, setJavaOwnership`

Constructor Detail

### Path

    public Path()

### Path

    public Path(Path arg__1)

  Constructs a copy of the other `arg_1` specified.

  This constructor is fast thanks to explicit sharing.

Method Detail

### disconnectPath

    public final boolean disconnectPath()

  Creates an invalid path.

  You can still make it a valid path by calling reconnect. To create a path you should use createPath, though.

See also:
  Phonon::createPath(), and `isValid()`.

### effects

    public final java.util.List effects()

  Returns a list of Effect objects that are currently used as effects. The order in the list determines the order the signal is sent through the effects.

  Returns A list with all current effects.

See also:
  `insertEffect()`, and `removeEffect()`.

### insertEffect

    public final boolean insertEffect(Effect newEffect)

  Inserts the given `effect` into the path before the effect specified by `insertBefore` and returns true if successful; otherwise returns false.

  If `insertBefore` is zero, the effect is appended to the processing list.

  You may insert effects of the same class as often as you like, but if you insert the same object, the call will fail.

  `newEffect` will be inserted right before `insertBefore`. If `insertBefore` is `null`, the effect is appended at the end of the processing list. If the effect has not been inserted before the method will do nothing and return `false`.

  Returns whether the effect could be inserted at the specified position. If `false` is returned the effect was not inserted.

See also:
  `removeEffect()`, and `effects()`.

### insertEffect

    public final boolean insertEffect(Effect newEffect,
                                      Effect insertBefore)

  Inserts the given `effect` into the path before the effect specified by `insertBefore` and returns true if successful; otherwise returns false.

  If `insertBefore` is zero, the effect is appended to the processing list.

  You may insert effects of the same class as often as you like, but if you insert the same object, the call will fail.

  `newEffect` will be inserted right before `insertBefore`. If `insertBefore` is `null`, the effect is appended at the end of the processing list. If the effect has not been inserted before the method will do nothing and return `false`.

  Returns whether the effect could be inserted at the specified position. If `false` is returned the effect was not inserted.

See also:
  `removeEffect()`, and `effects()`.

### insertEffect

    public final Effect insertEffect(EffectDescription desc)

  Creates and inserts an effect into the path.

  You may insert effects of the same class as often as you like, but if you insert the same object, the call will fail.

  `desc` is the EffectDescription object for the effect to be inserted.

  If you already inserted an effect you can tell with `insertBefore` in which order the data gets processed. If this is `null` the effect is appended at the end of the processing list. If the effect has not been inserted before the method will do nothing and return `false`.

  Returns a pointer to the effect object if it could be inserted at the specified position. If `0` is returned, the effect was not inserted.

  Below is a code example for inserting an effect into a path:
  The following code example is written in c++.

          QList<Phonon::EffectDescription> effectDescriptions =
                  Phonon::BackendCapabilities::availableAudioEffects();
          Phonon::EffectDescription effectDescription = effectDescriptions.at(4);

          Phonon::Path path = Phonon::createPath(mediaObject, audioOutput);

          Phonon::Effect *effect = new Phonon::Effect(effectDescription);
          path.insertEffect(effect);

See also:
  `removeEffect()`, and `effects()`.

### insertEffect

    public final Effect insertEffect(EffectDescription desc,
                                     Effect insertBefore)

  Creates and inserts an effect into the path.

  You may insert effects of the same class as often as you like, but if you insert the same object, the call will fail.

  `desc` is the EffectDescription object for the effect to be inserted.

  If you already inserted an effect you can tell with `insertBefore` in which order the data gets processed. If this is `null` the effect is appended at the end of the processing list. If the effect has not been inserted before the method will do nothing and return `false`.

  Returns a pointer to the effect object if it could be inserted at the specified position. If `0` is returned, the effect was not inserted.

  Below is a code example for inserting an effect into a path:
  The following code example is written in c++.

          QList<Phonon::EffectDescription> effectDescriptions =
                  Phonon::BackendCapabilities::availableAudioEffects();
          Phonon::EffectDescription effectDescription = effectDescriptions.at(4);

          Phonon::Path path = Phonon::createPath(mediaObject, audioOutput);

          Phonon::Effect *effect = new Phonon::Effect(effectDescription);
          path.insertEffect(effect);

See also:
  `removeEffect()`, and `effects()`.

### isValid

    public final boolean isValid()

  Returns true if the backend provides an implementation of this class; otherwise, returns false.

### reconnect

    public final boolean reconnect(MediaNodeInterface source,
                                   MediaNodeInterface sink)

  Changes this Path's input and output node to source and sink

### removeEffect

    public final boolean removeEffect(Effect effect)

  Removes the given `effect` from the path and returns true; otherwise returns false.

  Removes an `effect` from the path.

  If the effect is deleted while it is still connected, the effect will be removed automatically.

See also:
  `insertEffect()`, and `effects()`.

### fromNativePointer

    public static Path fromNativePointer(QNativePointer nativePointer)

  This method returns the Path instance pointed to by `nativePointer`.

### nativePointerArray

    public static QNativePointer nativePointerArray(Path[] array)

  This function returns a QNativePointer that is pointing to the specified Path array.

### clone

    public Path clone()

  This method is reimplemented for internal reasons

  Overrides:
    `clone` in class `java.lang.Object`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD