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/ftp.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 network/ftp
     43    \example network/qftp
    4444    \title FTP Example
    4545
     
    7979    of current commands, and information about files on the server.
    8080
    81     \snippet examples/network/ftp/ftpwindow.h 0
     81    \snippet examples/network/qftp/ftpwindow.h 0
    8282
    8383    We will look at each slot when we examine the \c FtpWindow
     
    8585    private variables:
    8686
    87     \snippet examples/network/ftp/ftpwindow.h 1
     87    \snippet examples/network/qftp/ftpwindow.h 1
    8888
    8989    The \c isDirectory hash keeps a history of all entries explored on
     
    9191    directory or a file. We use the QFile object to download files
    9292    from the FTP server.
    93  
     93
    9494    \section1 FtpWindow Class Implementation
    9595
    9696    We skip the \c FtpWindow constructor as it only contains code for
    9797    setting up the GUI, which is explained in other examples.
    98    
     98
    9999    We move on to the slots, starting with \c connectOrDisconnect().
    100100
    101     \snippet examples/network/ftp/ftpwindow.cpp 0
     101    \snippet examples/network/qftp/ftpwindow.cpp 0
    102102
    103103    If \c ftp is already pointing to a QFtp object, we QFtp::Close its
     
    107107
    108108    \dots
    109     \snippet examples/network/ftp/ftpwindow.cpp 1
     109    \snippet examples/network/qftp/ftpwindow.cpp 1
    110110
    111111    If we get here, \c connectOrDisconnect() was called to establish a
     
    119119    progress reports.
    120120
    121     \snippet examples/network/ftp/ftpwindow.cpp 2
     121    \snippet examples/network/qftp/ftpwindow.cpp 2
    122122
    123123    The \gui {Ftp Server} line edit contains the IP address or
     
    135135    We move on to the \c downloadFile() slot:
    136136
    137     \snippet examples/network/ftp/ftpwindow.cpp 3
     137    \snippet examples/network/qftp/ftpwindow.cpp 3
    138138    \dots
    139     \snippet examples/network/ftp/ftpwindow.cpp 4
    140    
     139    \snippet examples/network/qftp/ftpwindow.cpp 4
     140
    141141    We first fetch the name of the file, which we find in the selected
    142142    item of \c fileList. We then start the download by using
     
    144144    and a signal when the download is completed. 
    145145
    146     \snippet examples/network/ftp/ftpwindow.cpp 5
     146    \snippet examples/network/qftp/ftpwindow.cpp 5
    147147
    148148    QFtp supports canceling the download of files.
    149149
    150     \snippet examples/network/ftp/ftpwindow.cpp 6
     150    \snippet examples/network/qftp/ftpwindow.cpp 6
    151151
    152152    The \c ftpCommandFinished() slot is called when QFtp has
     
    154154    command, QFtp will set \c error to one of the values in
    155155    the QFtp::Error enum; otherwise, \c error is zero.
    156    
    157     \snippet examples/network/ftp/ftpwindow.cpp 7
     156
     157    \snippet examples/network/qftp/ftpwindow.cpp 7
    158158
    159159    After login, the QFtp::list() function will list the top-level
     
    162162    directory.
    163163
    164     \snippet examples/network/ftp/ftpwindow.cpp 8
     164    \snippet examples/network/qftp/ftpwindow.cpp 8
    165165
    166166    When a \l{QFtp::}{Get} command is finished, a file has finished
    167167    downloading (or an error occurred during the download).
    168    
    169     \snippet examples/network/ftp/ftpwindow.cpp 9
     168
     169    \snippet examples/network/qftp/ftpwindow.cpp 9
    170170
    171171    After a \l{QFtp::}{List} command is performed, we have to check if
     
    173173    would not have been called).
    174174
    175     Let's continue with the the \c addToList() slot:
    176 
    177     \snippet examples/network/ftp/ftpwindow.cpp 10
     175    Let's continue with the \c addToList() slot:
     176
     177    \snippet examples/network/qftp/ftpwindow.cpp 10
    178178
    179179    When a new file has been resolved during a QFtp::List command,
     
    183183    current item.
    184184
    185     \snippet examples/network/ftp/ftpwindow.cpp 11
     185    \snippet examples/network/qftp/ftpwindow.cpp 11
    186186
    187187    The \c processItem() slot is called when an item is double clicked
     
    189189    want to load the contents of that directory with QFtp::list().
    190190
    191     \snippet examples/network/ftp/ftpwindow.cpp 12
    192 
    193     \c cdToParent() is invoked when the the user requests to go to the
     191    \snippet examples/network/qftp/ftpwindow.cpp 12
     192
     193    \c cdToParent() is invoked when the user requests to go to the
    194194    parent directory of the one displayed in the file list. After
    195195    changing the directory, we QFtp::List its contents.
    196196
    197     \snippet examples/network/ftp/ftpwindow.cpp 13
     197    \snippet examples/network/qftp/ftpwindow.cpp 13
    198198
    199199    The \c updateDataTransferProgress() slot is called regularly by
     
    202202    user.
    203203
    204     \snippet examples/network/ftp/ftpwindow.cpp 14
     204    \snippet examples/network/qftp/ftpwindow.cpp 14
    205205
    206206    The \c enableDownloadButton() is called whenever the current item
Note: See TracChangeset for help on using the changeset viewer.