Ignore:
Timestamp:
Feb 11, 2010, 11:19:06 PM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.6.1 sources.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/doc/src/examples/musicplayerexample.qdoc

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the documentation of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     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.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    4141
    4242/*!
    43     \example phonon/musicplayer
     43    \example phonon/qmusicplayer
    4444    \title Music Player Example
    4545
     
    9191    implementation.
    9292
    93     \snippet examples/phonon/musicplayer/mainwindow.h 2
     93    \snippet examples/phonon/qmusicplayer/mainwindow.h 2
    9494
    9595    We use the \l{Phonon::}{SeekSlider} to move the current playback
     
    100100    music files. More on this later.
    101101
    102     \snippet examples/phonon/musicplayer/mainwindow.h 1
     102    \snippet examples/phonon/qmusicplayer/mainwindow.h 1
    103103
    104104    The \l{Phonon::}{MediaObject} informs us of the state of the playback and
     
    117117    We start with the constructor:
    118118
    119     \snippet examples/phonon/musicplayer/mainwindow.cpp 0
     119    \snippet examples/phonon/qmusicplayer/mainwindow.cpp 0
    120120
    121121    We start by instantiating our media and audio output objects.
     
    131131    which is part of the Phonon namespace.
    132132
    133     \snippet examples/phonon/musicplayer/mainwindow.cpp 1
     133    \snippet examples/phonon/qmusicplayer/mainwindow.cpp 1
    134134
    135135    We also connect signals of the media object to slots in our \c
    136136    MainWindow. We will examine them shortly.
    137137
    138     \snippet examples/phonon/musicplayer/mainwindow.cpp 2
     138    \snippet examples/phonon/qmusicplayer/mainwindow.cpp 2
    139139
    140140    Finally, we call private helper functions to set up the GUI.
     
    142142    , and volume slider. We move on to \c setupUi():
    143143
    144     \snippet examples/phonon/musicplayer/mainwindow.cpp 3
     144    \snippet examples/phonon/qmusicplayer/mainwindow.cpp 3
    145145    \dots
    146     \snippet examples/phonon/musicplayer/mainwindow.cpp 4
     146    \snippet examples/phonon/qmusicplayer/mainwindow.cpp 4
    147147
    148148    After creating the widgets, they must be supplied with the
     
    153153    pause, and stop tool buttons, to slots of the media object.
    154154
    155     \snippet examples/phonon/musicplayer/mainwindow.cpp 5
    156 
    157     We move on to the the slots of \c MainWindow, starting with \c
     155    \snippet examples/phonon/qmusicplayer/mainwindow.cpp 5
     156
     157    We move on to the slots of \c MainWindow, starting with \c
    158158    addFiles():
    159159
    160     \snippet examples/phonon/musicplayer/mainwindow.cpp 6
     160    \snippet examples/phonon/qmusicplayer/mainwindow.cpp 6
    161161
    162162    In the \c addFiles() slot, we add files selected by the user to
     
    170170    to this signal.
    171171
    172     \snippet examples/phonon/musicplayer/mainwindow.cpp 9
     172    \snippet examples/phonon/qmusicplayer/mainwindow.cpp 9
    173173
    174174    The \l{Phonon::MediaObject::}{errorString()} function gives a
     
    178178    file again.
    179179
    180     \snippet examples/phonon/musicplayer/mainwindow.cpp 10
     180    \snippet examples/phonon/qmusicplayer/mainwindow.cpp 10
    181181
    182182    We update the GUI when the playback state changes, i.e., when it
     
    189189    emitted when the playback position changes:
    190190
    191     \snippet examples/phonon/musicplayer/mainwindow.cpp 11
     191    \snippet examples/phonon/qmusicplayer/mainwindow.cpp 11
    192192
    193193    The \c time is given in milliseconds.
     
    196196    is invoked:
    197197
    198     \snippet examples/phonon/musicplayer/mainwindow.cpp 12
     198    \snippet examples/phonon/qmusicplayer/mainwindow.cpp 12
    199199
    200200    Since we stop the media object, we first check whether it is
     
    203203    can simply use \c row to find the new source.
    204204
    205     \snippet examples/phonon/musicplayer/mainwindow.cpp 13
     205    \snippet examples/phonon/qmusicplayer/mainwindow.cpp 13
    206206
    207207    When the media source changes, we simply need to select the
    208208    corresponding row in the table.
    209209
    210     \snippet examples/phonon/musicplayer/mainwindow.cpp 14
     210    \snippet examples/phonon/qmusicplayer/mainwindow.cpp 14
    211211
    212212    When \c metaStateChanged() is invoked, \c
     
    221221    in which case an empty string is returned.
    222222
    223     \snippet examples/phonon/musicplayer/mainwindow.cpp 15
     223    \snippet examples/phonon/qmusicplayer/mainwindow.cpp 15
    224224
    225225    If we have media sources in \c sources of which meta information
     
    230230    We move on to the \c aboutToFinish() slot:
    231231
    232     \snippet examples/phonon/musicplayer/mainwindow.cpp 16
     232    \snippet examples/phonon/qmusicplayer/mainwindow.cpp 16
    233233
    234234    When a file is finished playing, the Music Player will move on and
     
    245245    D-Bus, which is used by Phonon on Linux systems, demands this.
    246246
    247     \snippet examples/phonon/musicplayer/main.cpp 1
     247    \snippet examples/phonon/qmusicplayer/main.cpp 1
    248248*/
Note: See TracChangeset for help on using the changeset viewer.