Skip to content
Snippets Groups Projects
Commit 3264878f authored by Kavindra Devi Palaraja's avatar Kavindra Devi Palaraja
Browse files

Doc - More on Part 5

Reviewed-By: TrustMe
parent 2de887ea
No related branches found
No related tags found
No related merge requests found
...@@ -803,6 +803,22 @@ ...@@ -803,6 +803,22 @@
\section1 The AddressBook Class \section1 The AddressBook Class
To ensure that we can use \c FindDialog from within our \c AddressBook
class, we include \c finddialog.h in the \c addressbook.h file.
\snippet examples/addressbook-sdk/part5/addressbook.cpp include
So far, all our address book features have a QPushButton and a
corresponding slot. Similarly, for the \gui Find feature, we have
\c findButton and \c findContact().
Within the \c AddressBook class's constructor, we instantiate our private
objects, \c findButton and \c findDialog:
\snippet examples/addressbook-sdk/part5/addressbook.cpp
*/ */
......
...@@ -243,6 +243,7 @@ void AddressBook::updateInterface(Mode mode) ...@@ -243,6 +243,7 @@ void AddressBook::updateInterface(Mode mode)
} }
} }
//! [findContact]
void AddressBook::findContact() void AddressBook::findContact()
{ {
dialog->show(); dialog->show();
...@@ -262,3 +263,4 @@ void AddressBook::findContact() ...@@ -262,3 +263,4 @@ void AddressBook::findContact()
updateInterface(NavigationMode); updateInterface(NavigationMode);
} }
//! [findContact]
...@@ -6,8 +6,9 @@ ...@@ -6,8 +6,9 @@
#include <QtGui/QLineEdit> #include <QtGui/QLineEdit>
#include <QtGui/QTextEdit> #include <QtGui/QTextEdit>
#include <QtGui/QMessageBox> #include <QtGui/QMessageBox>
//! [include]
#include "finddialog.h" #include "finddialog.h"
//! [include]
namespace Ui namespace Ui
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment