|  | Home · All Classes · Main Classes · Grouped Classes · Modules · Functions |

# MediaController Class Reference
(Phonon::MediaController)
[Phonon module]

Controls optional features of a media file/device like title, chapter, angle. More...

Inherits QObject.

- List of all members, including inherited members

### Public Types

- enum Feature { Angles, Chapters, Titles }
- flags Features

### Public Functions

- MediaController ( MediaObject * parent )
- ~MediaController ()
- bool autoplayTitles () const
- int availableAngles () const
- int availableChapters () const
- int availableTitles () const
- int currentAngle () const
- int currentChapter () const
- int currentTitle () const
- Features supportedFeatures () const

- 29 public functions inherited from QObject

### Public Slots

- void nextTitle ()
- void previousTitle ()
- void setAutoplayTitles ( bool enable )
- void setCurrentAngle ( int angleNumber )
- void setCurrentChapter ( int chapterNumber )
- void setCurrentTitle ( int titleNumber )

- 1 public slot inherited from QObject

### Signals

- void angleChanged ( int angleNumber )
- void availableAnglesChanged ( int availableAngles )
- void availableChaptersChanged ( int availableChapters )
- void availableTitlesChanged ( int availableTitles )
- void chapterChanged ( int chapterNumber )
- void titleChanged ( int titleNumber )

- 1 signal inherited from QObject

### Additional Inherited Members

- 1 property inherited from QObject
- 5 static public members inherited from QObject
- 7 protected functions inherited from QObject

## Detailed Description

Controls optional features of a media file/device like title, chapter, angle.

Author: Matthias Kretz <kretz@kde.org>

## Member Type Documentation

### enum MediaController::Feature
flags MediaController::Features

Constant | Value
--- | ---
`Phonon::MediaController::Angles` | `1`
`Phonon::MediaController::Chapters` | `2`
`Phonon::MediaController::Titles` | `4`

The Features type is a typedef for QFlags<Feature>. It stores an OR combination of Feature values.

## Member Function Documentation

### MediaController::MediaController ( MediaObject * parent )

Constructs a new MediaController with the specified parent.

### MediaController::~MediaController ()

### void MediaController::angleChanged ( int angleNumber ) `[signal]`

This signal is emitted whenever the current angle changes. The new angle number is given by angleNumber.

### bool MediaController::autoplayTitles () const

Returns true if titles will automatically be played when the media is played; otherwise returns false.

See also setAutoplayTitles().

### int MediaController::availableAngles () const

### void MediaController::availableAnglesChanged ( int availableAngles ) `[signal]`

This signal is emitted whenever the number of available angles changes. The new number of available angles is given by availableAngles.

### int MediaController::availableChapters () const

### void MediaController::availableChaptersChanged ( int availableChapters ) `[signal]`

This signal is emitted whenever the number of available chapters changes. The new number of available chapters is given by availableChapters.

### int MediaController::availableTitles () const

### void MediaController::availableTitlesChanged ( int availableTitles ) `[signal]`

This signal is emitted whenever the number of available titles changes. The new number of available titles is given by availableTitles.

### void MediaController::chapterChanged ( int chapterNumber ) `[signal]`

This signal is emitted whenever the current chapter changes. The new chapter number is given by chapterNumber.

### int MediaController::currentAngle () const

See also setCurrentAngle().

### int MediaController::currentChapter () const

See also setCurrentChapter().

### int MediaController::currentTitle () const

See also setCurrentTitle().

### void MediaController::nextTitle () `[slot]`

Skips to the next title.

If it was playing before the title change it will start playback on the next title if autoplayTitles is enabled.

### void MediaController::previousTitle () `[slot]`

Skips to the previous title.

If it was playing before the title change it will start playback on the previous title if autoplayTitles is enabled.

### void MediaController::setAutoplayTitles ( bool enable ) `[slot]`

Sets the titles to play automatically when the media is played if enable is true; otherwise disables the feature.

See also autoplayTitles().

### void MediaController::setCurrentAngle ( int angleNumber ) `[slot]`

Sets the current chapter to the given chapterNumber if the media file or device supports navigation by angle number.

See also currentAngle() and Feature.

### void MediaController::setCurrentChapter ( int chapterNumber ) `[slot]`

Sets the current chapter to the given chapterNumber if the media file or device supports navigation by chapter number.

See also currentChapter() and Feature.

### void MediaController::setCurrentTitle ( int titleNumber ) `[slot]`

Skips to the given title titleNumber.

If it was playing before the title change it will start playback on the new title if autoplayTitles is enabled.

See also currentTitle().

### Features MediaController::supportedFeatures () const

### void MediaController::titleChanged ( int titleNumber ) `[signal]`

This signal is emitted whenever the current title changes. The new title number is given by titleNumber.