src/multimedia/qmediaplaylistcontrol.cpp
changeset 0 876b1a06bc25
equal deleted inserted replaced
-1:000000000000 0:876b1a06bc25
       
     1 /****************************************************************************
       
     2 **
       
     3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
       
     4 ** All rights reserved.
       
     5 ** Contact: Nokia Corporation (qt-info@nokia.com)
       
     6 **
       
     7 ** This file is part of the Qt Mobility Components.
       
     8 **
       
     9 ** $QT_BEGIN_LICENSE:LGPL$
       
    10 ** No Commercial Usage
       
    11 ** This file contains pre-release code and may not be distributed.
       
    12 ** You may use this file in accordance with the terms and conditions
       
    13 ** contained in the Technology Preview License Agreement accompanying
       
    14 ** this package.
       
    15 **
       
    16 ** GNU Lesser General Public License Usage
       
    17 ** Alternatively, this file may be used under the terms of the GNU Lesser
       
    18 ** General Public License version 2.1 as published by the Free Software
       
    19 ** Foundation and appearing in the file LICENSE.LGPL included in the
       
    20 ** packaging of this file.  Please review the following information to
       
    21 ** ensure the GNU Lesser General Public License version 2.1 requirements
       
    22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
       
    23 **
       
    24 ** In addition, as a special exception, Nokia gives you certain additional
       
    25 ** rights.  These rights are described in the Nokia Qt LGPL Exception
       
    26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
       
    27 **
       
    28 ** If you have questions regarding the use of this file, please contact
       
    29 ** Nokia at qt-info@nokia.com.
       
    30 **
       
    31 **
       
    32 **
       
    33 **
       
    34 **
       
    35 **
       
    36 **
       
    37 **
       
    38 ** $QT_END_LICENSE$
       
    39 **
       
    40 ****************************************************************************/
       
    41 
       
    42 
       
    43 #include "qmediaplaylistcontrol.h"
       
    44 #include "qmediacontrol_p.h"
       
    45 
       
    46 QT_BEGIN_NAMESPACE
       
    47 
       
    48 /*!
       
    49     \class QMediaPlaylistControl
       
    50     \ingroup multimedia
       
    51 
       
    52     \preliminary
       
    53     \brief The QMediaPlaylistControl class provides access to the playlist
       
    54     functionality of a QMediaService.
       
    55 
       
    56     If a QMediaService contains an internal playlist it will implement
       
    57     QMediaPlaylistControl.  This control provides access to the contents of the
       
    58     \l {playlistProvider()}{playlist}, as well as the \l
       
    59     {currentIndex()}{position} of the current media, and a means of navigating
       
    60     to the \l {next()}{next} and \l {previous()}{previous} media.
       
    61 
       
    62     The functionality provided by the control is exposed to application code
       
    63     through the QMediaPlaylist class.
       
    64 
       
    65     The interface name of QMediaPlaylistControl is \c com.nokia.Qt.QMediaPlaylistControl/1.0 as
       
    66     defined in QMediaPlaylistControl_iid.
       
    67 
       
    68     \sa QMediaService::requestControl(), QMediaPlayer
       
    69 */
       
    70 
       
    71 /*!
       
    72     \macro QMediaPlaylistControl_iid
       
    73 
       
    74     \c com.nokia.Qt.QMediaPlaylistControl/1.0
       
    75 
       
    76     Defines the interface name of the QMediaPlaylistControl class.
       
    77 
       
    78     \relates QMediaPlaylistControl
       
    79 */
       
    80 
       
    81 /*!
       
    82   Create a new playlist control object with the given \a parent.
       
    83 */
       
    84 QMediaPlaylistControl::QMediaPlaylistControl(QObject *parent):
       
    85     QMediaControl(*new QMediaControlPrivate, parent)
       
    86 {
       
    87 }
       
    88 
       
    89 /*!
       
    90   Destroys the playlist control.
       
    91 */
       
    92 QMediaPlaylistControl::~QMediaPlaylistControl()
       
    93 {
       
    94 }
       
    95 
       
    96 
       
    97 /*!
       
    98   \fn QMediaPlaylistControl::playlistProvider() const
       
    99 
       
   100   Returns the playlist used by this media player.
       
   101 */
       
   102 
       
   103 /*!
       
   104   \fn QMediaPlaylistControl::setPlaylistProvider(QMediaPlaylistProvider *playlist)
       
   105 
       
   106   Set the playlist of this media player to \a playlist.
       
   107 
       
   108   In many cases it is possible just to use the playlist
       
   109   constructed by player, but sometimes replacing the whole
       
   110   playlist allows to avoid copyting of all the items bettween playlists.
       
   111 
       
   112   Returns true if player can use this passed playlist; otherwise returns false.
       
   113 
       
   114 */
       
   115 
       
   116 /*!
       
   117   \fn QMediaPlaylistControl::currentIndex() const
       
   118 
       
   119   Returns position of the current media source in the playlist.
       
   120 */
       
   121 
       
   122 /*!
       
   123   \fn QMediaPlaylistControl::setCurrentIndex(int position)
       
   124 
       
   125   Jump to the item at the given \a position.
       
   126 */
       
   127 
       
   128 /*!
       
   129   \fn QMediaPlaylistControl::nextIndex(int step) const
       
   130 
       
   131   Returns the index of item, which were current after calling next()
       
   132   \a step times.
       
   133 
       
   134   Returned value depends on the size of playlist, current position
       
   135   and playback mode.
       
   136 
       
   137   \sa QMediaPlaylist::playbackMode
       
   138 */
       
   139 
       
   140 /*!
       
   141   \fn QMediaPlaylistControl::previousIndex(int step) const
       
   142 
       
   143   Returns the index of item, which were current after calling previous()
       
   144   \a step times.
       
   145 
       
   146   \sa QMediaPlaylist::playbackMode
       
   147 */
       
   148 
       
   149 /*!
       
   150   \fn QMediaPlaylistControl::next()
       
   151 
       
   152   Moves to the next item in playlist.
       
   153 */
       
   154 
       
   155 /*!
       
   156   \fn QMediaPlaylistControl::previous()
       
   157 
       
   158   Returns to the previous item in playlist.
       
   159 */
       
   160 
       
   161 /*!
       
   162   \fn QMediaPlaylistControl::playbackMode() const
       
   163 
       
   164   Returns the playlist navigation mode.
       
   165 
       
   166   \sa QMediaPlaylist::PlaybackMode
       
   167 */
       
   168 
       
   169 /*!
       
   170   \fn QMediaPlaylistControl::setPlaybackMode(QMediaPlaylist::PlaybackMode mode)
       
   171 
       
   172   Sets the playback \a mode.
       
   173 
       
   174   \sa QMediaPlaylist::PlaybackMode
       
   175 */
       
   176 
       
   177 /*!
       
   178   \fn QMediaPlaylistControl::playlistProviderChanged()
       
   179 
       
   180   Signal emited when the playlist provider has changed.
       
   181 */
       
   182 
       
   183 /*!
       
   184   \fn QMediaPlaylistControl::currentIndexChanged(int position)
       
   185 
       
   186   Signal emited when the playlist \a position is changed.
       
   187 */
       
   188 
       
   189 /*!
       
   190   \fn QMediaPlaylistControl::playbackModeChanged(QMediaPlaylist::PlaybackMode mode)
       
   191 
       
   192   Signal emited when the playback \a mode is changed.
       
   193 */
       
   194 
       
   195 /*!
       
   196   \fn QMediaPlaylistControl::currentMediaChanged(const QMediaContent& content)
       
   197 
       
   198   Signal emitted when current media changes to \a content.
       
   199 */
       
   200 
       
   201 #include "moc_qmediaplaylistcontrol.cpp"
       
   202 QT_END_NAMESPACE
       
   203