1
/****************************************************************************
3
** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
4
** Contact: http://www.qt-project.org/legal
6
** This file is part of the Qt Toolkit.
8
** $QT_BEGIN_LICENSE:LGPL21$
9
** Commercial License Usage
10
** Licensees holding valid commercial Qt licenses may use this file in
11
** accordance with the commercial license agreement provided with the
12
** Software or, alternatively, in accordance with the terms contained in
13
** a written agreement between you and Digia. For licensing terms and
14
** conditions see http://qt.digia.com/licensing. For further information
15
** use the contact form at http://qt.digia.com/contact-us.
17
** GNU Lesser General Public License Usage
18
** Alternatively, this file may be used under the terms of the GNU Lesser
19
** General Public License version 2.1 or version 3 as published by the Free
20
** Software Foundation and appearing in the file LICENSE.LGPLv21 and
21
** LICENSE.LGPLv3 included in the packaging of this file. Please review the
22
** following information to ensure the GNU Lesser General Public License
23
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
24
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
26
** In addition, as a special exception, Digia gives you certain additional
27
** rights. These rights are described in the Digia Qt LGPL Exception
28
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
32
****************************************************************************/
35
#include "qmediaplaylistcontrol_p.h"
36
#include "qmediacontrol_p.h"
41
\class QMediaPlaylistControl
44
\inmodule QtMultimedia
47
\ingroup multimedia_control
50
\brief The QMediaPlaylistControl class provides access to the playlist
51
functionality of a QMediaService.
53
If a QMediaService contains an internal playlist it will implement
54
QMediaPlaylistControl. This control provides access to the contents of the
55
\l {playlistProvider()}{playlist}, as well as the \l
56
{currentIndex()}{position} of the current media, and a means of navigating
57
to the \l {next()}{next} and \l {previous()}{previous} media.
59
The functionality provided by the control is exposed to application code
60
through the QMediaPlaylist class.
62
The interface name of QMediaPlaylistControl is \c org.qt-project.qt.mediaplaylistcontrol/5.0 as
63
defined in QMediaPlaylistControl_iid.
65
\sa QMediaService::requestControl(), QMediaPlayer
69
\macro QMediaPlaylistControl_iid
71
\c org.qt-project.qt.mediaplaylistcontrol/5.0
73
Defines the interface name of the QMediaPlaylistControl class.
75
\relates QMediaPlaylistControl
79
Create a new playlist control object with the given \a parent.
81
QMediaPlaylistControl::QMediaPlaylistControl(QObject *parent):
82
QMediaControl(*new QMediaControlPrivate, parent)
87
Destroys the playlist control.
89
QMediaPlaylistControl::~QMediaPlaylistControl()
95
\fn QMediaPlaylistControl::playlistProvider() const
97
Returns the playlist used by this media player.
101
\fn QMediaPlaylistControl::setPlaylistProvider(QMediaPlaylistProvider *playlist)
103
Set the playlist of this media player to \a playlist.
105
In many cases it is possible just to use the playlist
106
constructed by player, but sometimes replacing the whole
107
playlist allows to avoid copyting of all the items bettween playlists.
109
Returns true if player can use this passed playlist; otherwise returns false.
114
\fn QMediaPlaylistControl::currentIndex() const
116
Returns position of the current media source in the playlist.
120
\fn QMediaPlaylistControl::setCurrentIndex(int position)
122
Jump to the item at the given \a position.
126
\fn QMediaPlaylistControl::nextIndex(int step) const
128
Returns the index of item, which were current after calling next()
131
Returned value depends on the size of playlist, current position
134
\sa QMediaPlaylist::playbackMode
138
\fn QMediaPlaylistControl::previousIndex(int step) const
140
Returns the index of item, which were current after calling previous()
143
\sa QMediaPlaylist::playbackMode
147
\fn QMediaPlaylistControl::next()
149
Moves to the next item in playlist.
153
\fn QMediaPlaylistControl::previous()
155
Returns to the previous item in playlist.
159
\fn QMediaPlaylistControl::playbackMode() const
161
Returns the playlist navigation mode.
163
\sa QMediaPlaylist::PlaybackMode
167
\fn QMediaPlaylistControl::setPlaybackMode(QMediaPlaylist::PlaybackMode mode)
169
Sets the playback \a mode.
171
\sa QMediaPlaylist::PlaybackMode
175
\fn QMediaPlaylistControl::playlistProviderChanged()
177
Signal emitted when the playlist provider has changed.
181
\fn QMediaPlaylistControl::currentIndexChanged(int position)
183
Signal emitted when the playlist \a position is changed.
187
\fn QMediaPlaylistControl::playbackModeChanged(QMediaPlaylist::PlaybackMode mode)
189
Signal emitted when the playback \a mode is changed.
193
\fn QMediaPlaylistControl::currentMediaChanged(const QMediaContent& content)
195
Signal emitted when current media changes to \a content.
198
#include "moc_qmediaplaylistcontrol_p.cpp"