BluezQt::MediaPlayer Class

class BluezQt::MediaPlayer

Media player. More...

Header: #include <BluezQt/MediaPlayer>
CMake: find_package(KF6 REQUIRED COMPONENTS BluezQt)
target_link_libraries(mytarget PRIVATE KF6::BluezQt)
Inherits: QObject

Public Types

enum Equalizer { EqualizerOn, EqualizerOff }
enum Repeat { RepeatOff, RepeatSingleTrack, RepeatAllTracks, RepeatGroup }
enum Shuffle { ShuffleOff, ShuffleAllTracks, ShuffleGroup }

Properties

Public Functions

BluezQt::MediaPlayer::Equalizer equalizer() const
QString name() const
quint32 position() const
BluezQt::MediaPlayer::Repeat repeat() const
BluezQt::PendingCall *setEqualizer(BluezQt::MediaPlayer::Equalizer equalizer)
BluezQt::PendingCall *setRepeat(BluezQt::MediaPlayer::Repeat repeat)
BluezQt::PendingCall *setShuffle(BluezQt::MediaPlayer::Shuffle shuffle)
BluezQt::MediaPlayer::Shuffle shuffle() const
BluezQt::MediaPlayer::Status status() const
BluezQt::MediaPlayerPtr toSharedPtr() const
BluezQt::MediaPlayerTrack track() const

Public Slots

BluezQt::PendingCall *fastForward()
BluezQt::PendingCall *next()
BluezQt::PendingCall *pause()
BluezQt::PendingCall *play()
BluezQt::PendingCall *previous()
BluezQt::PendingCall *rewind()
BluezQt::PendingCall *stop()

Signals

void equalizerChanged(BluezQt::MediaPlayer::Equalizer equalizer)
void nameChanged(const QString &name)
void positionChanged(quint32 position)
void repeatChanged(BluezQt::MediaPlayer::Repeat repeat)
void shuffleChanged(BluezQt::MediaPlayer::Shuffle shuffle)
void statusChanged(BluezQt::MediaPlayer::Status status)
void trackChanged(BluezQt::MediaPlayerTrack track)

Detailed Description

This class represents a media player interface.

Member Type Documentation

enum MediaPlayer::Equalizer

ConstantValue
BluezQt::MediaPlayer::EqualizerOn0
BluezQt::MediaPlayer::EqualizerOff1

enum MediaPlayer::Repeat

ConstantValue
BluezQt::MediaPlayer::RepeatOff0
BluezQt::MediaPlayer::RepeatSingleTrack1
BluezQt::MediaPlayer::RepeatAllTracks2
BluezQt::MediaPlayer::RepeatGroup3

enum MediaPlayer::Shuffle

ConstantValue
BluezQt::MediaPlayer::ShuffleOff0
BluezQt::MediaPlayer::ShuffleAllTracks1
BluezQt::MediaPlayer::ShuffleGroup2

Property Documentation

equalizer : Equalizer

Access functions:

BluezQt::MediaPlayer::Equalizer equalizer() const
BluezQt::PendingCall *setEqualizer(BluezQt::MediaPlayer::Equalizer equalizer)

Notifier signal:

void equalizerChanged(BluezQt::MediaPlayer::Equalizer equalizer)

[read-only] name : const QString

Access functions:

QString name() const

Notifier signal:

void nameChanged(const QString &name)

[read-only] position : const quint32

Access functions:

quint32 position() const

Notifier signal:

void positionChanged(quint32 position)

repeat : Repeat

Access functions:

BluezQt::MediaPlayer::Repeat repeat() const
BluezQt::PendingCall *setRepeat(BluezQt::MediaPlayer::Repeat repeat)

Notifier signal:

void repeatChanged(BluezQt::MediaPlayer::Repeat repeat)

shuffle : Shuffle

Access functions:

BluezQt::MediaPlayer::Shuffle shuffle() const
BluezQt::PendingCall *setShuffle(BluezQt::MediaPlayer::Shuffle shuffle)

Notifier signal:

void shuffleChanged(BluezQt::MediaPlayer::Shuffle shuffle)

[read-only] status : const Status

Access functions:

BluezQt::MediaPlayer::Status status() const

Notifier signal:

void statusChanged(BluezQt::MediaPlayer::Status status)

[read-only] track : const MediaPlayerTrack

Access functions:

BluezQt::MediaPlayerTrack track() const

Notifier signal:

void trackChanged(BluezQt::MediaPlayerTrack track)

Member Function Documentation

BluezQt::MediaPlayer::Equalizer MediaPlayer::equalizer() const

Returns the equalizer state of the player.

Note: Getter function for property equalizer.

See also setEqualizer().

[signal] void MediaPlayer::equalizerChanged(BluezQt::MediaPlayer::Equalizer equalizer)

Indicates that the player's equalizer state has changed.

Note: Notifier signal for property equalizer.

[slot] BluezQt::PendingCall *MediaPlayer::fastForward()

Fast forwards playback.

Possible errors:

Returns void pending call.

QString MediaPlayer::name() const

Returns the name of the player.

Note: Getter function for property name.

[signal] void MediaPlayer::nameChanged(const QString &name)

Indicates that the player's name has changed.

Note: Notifier signal for property name.

[slot] BluezQt::PendingCall *MediaPlayer::next()

Switches to the next track.

Possible errors:

Returns void pending call.

[slot] BluezQt::PendingCall *MediaPlayer::pause()

Pauses playback.

Possible errors:

Returns void pending call.

[slot] BluezQt::PendingCall *MediaPlayer::play()

Resumes playback.

Possible errors:

Returns void pending call.

quint32 MediaPlayer::position() const

Returns the playback position in milliseconds.

Note: Getter function for property position.

[signal] void MediaPlayer::positionChanged(quint32 position)

Indicates that the player's playback position has changed.

Note: Notifier signal for property position.

[slot] BluezQt::PendingCall *MediaPlayer::previous()

Switch to previous track.

Possible errors:

Returns void pending call.

BluezQt::MediaPlayer::Repeat MediaPlayer::repeat() const

Returns the repeat state of the player.

Note: Getter function for property repeat.

See also setRepeat().

[signal] void MediaPlayer::repeatChanged(BluezQt::MediaPlayer::Repeat repeat)

Indicates that the player's repeat state has changed.

Note: Notifier signal for property repeat.

[slot] BluezQt::PendingCall *MediaPlayer::rewind()

Rewinds playback.

Possible errors:

Returns void pending call.

BluezQt::PendingCall *MediaPlayer::setEqualizer(BluezQt::MediaPlayer::Equalizer equalizer)

Sets the equalizer state of the player.

Returns void pending call.

Note: Setter function for property equalizer.

See also equalizer().

BluezQt::PendingCall *MediaPlayer::setRepeat(BluezQt::MediaPlayer::Repeat repeat)

Sets the repeat state of the player.

Returns void pending call.

Note: Setter function for property repeat.

See also repeat().

BluezQt::PendingCall *MediaPlayer::setShuffle(BluezQt::MediaPlayer::Shuffle shuffle)

Sets the shuffle state of the player.

Returns void pending call.

Note: Setter function for property shuffle.

See also shuffle().

BluezQt::MediaPlayer::Shuffle MediaPlayer::shuffle() const

Returns the shuffle state of the player.

Note: Getter function for property shuffle.

See also setShuffle().

[signal] void MediaPlayer::shuffleChanged(BluezQt::MediaPlayer::Shuffle shuffle)

Indicates that the player's shuffle state has changed.

Note: Notifier signal for property shuffle.

BluezQt::MediaPlayer::Status MediaPlayer::status() const

Returns the status of the player.

Note: Getter function for property status.

[signal] void MediaPlayer::statusChanged(BluezQt::MediaPlayer::Status status)

Indicates that the player's status has changed.

Note: Notifier signal for property status.

[slot] BluezQt::PendingCall *MediaPlayer::stop()

Stops playback.

Possible errors:

Returns void pending call.

BluezQt::MediaPlayerPtr MediaPlayer::toSharedPtr() const

Returns a shared pointer from this.

BluezQt::MediaPlayerTrack MediaPlayer::track() const

Returns the current track.

Note: Getter function for property track.

[signal] void MediaPlayer::trackChanged(BluezQt::MediaPlayerTrack track)

Indicates that the player's current track has changed.

Note: Notifier signal for property track.