diff --git a/doc/addressbook-sdk.qdoc b/doc/addressbook-sdk.qdoc index 3194ad70b2f3d60e55b4519f993f496c763ce77d..1af405fbbd9f726e1e1622eaac161afbd9cdf29f 100644 --- a/doc/addressbook-sdk.qdoc +++ b/doc/addressbook-sdk.qdoc @@ -734,7 +734,7 @@ which we subclass in this chapter, to implement a FindDialog class. - \section1 Designing \c FindDialog + \section1 Designing The FindDialog #image @@ -751,7 +751,7 @@ vertical. - \section1 Implementing \c FindDialog + \section1 Implementing The FindDialog Class Let's look at \c{FindDialog}'s header file. Here, we need to provide private members for the class so that we can access the widgets freely @@ -791,6 +791,18 @@ we clear the contents of \c lineEdit and hide the dialog. \snippet examples/addressbook-sdk/part5/finddialog.cpp findClicked + + The \c findText variable has a public getter function, \c getFindText(), + associated with it. Since we only ever set \c findText directly in both + the constructor and in hte \c findClicked() function, we do not create a + setter function to accompany \c getFindText(). Because \c getFindText() is + public, classes instantiating and using \c FindDialog can always access the + search string that the user has entered and accepted. + + \snippet examples/addressbook-sdk/part5/finddialog.cpp getFindText + + + \section1 The AddressBook Class */ diff --git a/doc/examples/addressbook-sdk/part5/finddialog.cpp b/doc/examples/addressbook-sdk/part5/finddialog.cpp index 1a464b70903511d3680df80657f1cdc42a30d8d1..63e04a5103978344cd2d599a0898b784655cd6b6 100644 --- a/doc/examples/addressbook-sdk/part5/finddialog.cpp +++ b/doc/examples/addressbook-sdk/part5/finddialog.cpp @@ -43,7 +43,9 @@ void FindDialog::findClicked() } //! [findClicked] +//! [getFindText] QString FindDialog::getFindText() { return findText; } +//! [getFindText]