diff options
Diffstat (limited to 'doc/src/tutorials/addressbook.qdoc')
-rw-r--r-- | doc/src/tutorials/addressbook.qdoc | 63 |
1 files changed, 33 insertions, 30 deletions
diff --git a/doc/src/tutorials/addressbook.qdoc b/doc/src/tutorials/addressbook.qdoc index ec5ea67..33832da 100644 --- a/doc/src/tutorials/addressbook.qdoc +++ b/doc/src/tutorials/addressbook.qdoc @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the documentation of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -697,10 +697,11 @@ \snippet tutorials/addressbook/part5/finddialog.h FindDialog header - We define a public function, \c getFindText() for use by classes that - instantiate \c FindDialog, which allows them to obtain the text - entered by the user. A public slot, \c findClicked(), is defined to - handle the search string when the user clicks the \gui Find button. + We define a public function, \c getFindText(), to be used by classes that + instantiate \c FindDialog. This function allows these classes to obtain the + search string entered by the user. A public slot, \c findClicked(), is also + defined to handle the search string when the user clicks the \gui Find + button. Lastly, we define the private variables, \c findButton, \c lineEdit and \c findText, corresponding to the \gui Find button, the line edit @@ -715,15 +716,15 @@ \snippet tutorials/addressbook/part5/finddialog.cpp constructor - We set the layout and window title, as well as connect the signals - to their respective slots. Notice that \c{findButton}'s - \l{QPushButton::clicked()}{clicked()} signal is connected to to - \c findClicked() and \l{QDialog::accept()}{accept()}. The - \l{QDialog::accept()}{accept()} slot provided by QDialog hides - the dialog and sets the result code to \l{QDialog::}{Accepted}. - We use this function to help \c{AddressBook}'s \c findContact() function - know when the \c FindDialog object has been closed. This will be - further explained when discussing the \c findContact() function. + We set the layout and window title, as well as connect the signals to their + respective slots. Notice that \c{findButton}'s \l{QPushButton::clicked()} + {clicked()} signal is connected to to \c findClicked() and + \l{QDialog::accept()}{accept()}. The \l{QDialog::accept()}{accept()} slot + provided by QDialog hides the dialog and sets the result code to + \l{QDialog::}{Accepted}. We use this function to help \c{AddressBook}'s + \c findContact() function know when the \c FindDialog object has been + closed. We will explain this logic in further detail when discussing the + \c findContact() function. \image addressbook-tutorial-part5-signals-and-slots.png @@ -817,21 +818,23 @@ \image addressbook-tutorial-part6-screenshot.png - Although browsing and searching for contacts are useful features, our address - book is not really fully ready for use until we can saving existing contacts - and load them again at a later time. - Qt provides a number of classes for \l{Input/Output and Networking}{input and output}, - but we have chosen to use two which are simple to use in combination: QFile and - QDataStream. - - A QFile object represents a file on disk that can be read from and written to. - QFile is a subclass of the more general QIODevice class which represents many - different kinds of devices. - - A QDataStream object is used to serialize binary data so that it can be stored - in a QIODevice and retrieved again later. Reading from a QIODevice and writing - to it is as simple as opening the stream - with the respective device as a - parameter - and reading from or writing to it. + Although browsing and searching for contacts are useful features, our + address book is not ready for use until we can save existing contacts and + load them again at a later time. + + Qt provides a number of classes for \l{Input/Output and Networking} + {input and output}, but we have chosen to use two which are simple to use + in combination: QFile and QDataStream. + + A QFile object represents a file on disk that can be read from and written + to. QFile is a subclass of the more general QIODevice class which + represents many different kinds of devices. + + A QDataStream object is used to serialize binary data so that it can be + stored in a QIODevice and retrieved again later. Reading from a QIODevice + and writing to it is as simple as opening the stream - with the respective + device as a parameter - and reading from or writing to it. + \section1 Defining the AddressBook Class |