diff options
author | Kai Köhne <kai.koehne@qt.io> | 2023-01-31 11:21:29 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2023-02-01 09:12:26 +0000 |
commit | ffa837e9caea845eb6edeffc7bfb187d639406c8 (patch) | |
tree | 25ac0f6f2f5c6c6b5ca8c7761d74eb65f61def37 | |
parent | 393eb7e88a3cb0c83d31ec961c1bfd2169fe6498 (diff) | |
download | qtmultimedia-ffa837e9caea845eb6edeffc7bfb187d639406c8.tar.gz |
Document new playing property
This also invalidates the need to document the accessor or signal
separately.
Change-Id: Ib2798a3a93fcdeb95994e75ba00dcc34b8bcab77
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
Reviewed-by: Lars Knoll <lars@knoll.priv.no>
(cherry picked from commit eec9e86965b6d4e7501e030876064cbdc10757b8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | src/multimedia/playback/qmediaplayer.cpp | 41 |
1 files changed, 27 insertions, 14 deletions
diff --git a/src/multimedia/playback/qmediaplayer.cpp b/src/multimedia/playback/qmediaplayer.cpp index 94a068fe9..600a56c42 100644 --- a/src/multimedia/playback/qmediaplayer.cpp +++ b/src/multimedia/playback/qmediaplayer.cpp @@ -289,6 +289,8 @@ const QIODevice *QMediaPlayer::sourceDevice() const \property QMediaPlayer::playbackState Returns the \l{QMediaPlayer::}{PlaybackState}. + + \sa playing */ QMediaPlayer::PlaybackState QMediaPlayer::playbackState() const { @@ -411,9 +413,6 @@ bool QMediaPlayer::isSeekable() const return d->control && d->control->isSeekable(); } -/*! - Returns true if the media is currently playing. -*/ bool QMediaPlayer::isPlaying() const { Q_D(const QMediaPlayer); @@ -500,7 +499,8 @@ QString QMediaPlayer::errorString() const Starts or resumes playback of the media. - Sets the \l playbackState property to PlayingState. + Sets the \l playbackState property to PlayingState, and changes + \l playing to \c true. */ /*! @@ -527,7 +527,8 @@ void QMediaPlayer::play() Pauses playback of the media. - Sets the \l playbackState property to PausedState. + Sets the \l playbackState property to PausedState, + and changes \l playing to \c false. */ /*! @@ -548,7 +549,8 @@ void QMediaPlayer::pause() Stops playback of the media. - Sets the \l playbackState property to StoppedState. + Sets the \l playbackState property to StoppedState, + and changes \l playing to \c false. */ /*! @@ -1001,7 +1003,7 @@ QMediaMetaData QMediaPlayer::metaData() const \value StoppedState The media player is not playing content, playback will begin from the start of the current track. - \value PlayingState The media player is currently playing content. + \value PlayingState The media player is currently playing content. This indicates the same as the \l playing property. \value PausedState The media player has paused playback, playback of the current track will resume from the position the player was paused at. */ @@ -1015,7 +1017,7 @@ QMediaMetaData QMediaPlayer::metaData() const \header \li Property value \li Description \row \li PlayingState - \li The media is currently playing. + \li The media is currently playing. This indicates the same as the \l playing property. \row \li PausedState \li Playback of the media has been suspended. \row \li StoppedState @@ -1030,12 +1032,6 @@ QMediaMetaData QMediaPlayer::metaData() const */ /*! - \qmlsignal QtMultimedia::MediaPlayer::playingChanged() - - This signal is emitted when the media playback starts or stops. -*/ - -/*! \enum QMediaPlayer::MediaStatus Defines the status of a media player's current media. @@ -1281,6 +1277,23 @@ QMediaMetaData QMediaPlayer::metaData() const */ /*! + \qmlproperty bool QtMultimedia::MediaPlayer::playing + \since 6.5 + + Indicates whether the media is currently playing. + + \sa playbackState +*/ + +/*! + \property QMediaPlayer::playing + \brief Whether the media is playing. + \since 6.5 + + \sa playbackState, PlayingState +*/ + +/*! \qmlproperty real QtMultimedia::MediaPlayer::playbackRate This property holds the rate at which audio is played at as a multiple of |