Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Tobias Hunger
qt-creator
Commits
df04fd06
Commit
df04fd06
authored
Jun 30, 2009
by
Kavindra Devi Palaraja
Browse files
Doc - More of Part 5
Reviewed-By: TrustMe
parent
9549205c
Changes
2
Hide whitespace changes
Inline
Side-by-side
doc/addressbook-sdk.qdoc
View file @
df04fd06
...
@@ -734,7 +734,7 @@
...
@@ -734,7 +734,7 @@
which we subclass in this chapter, to implement a FindDialog class.
which we subclass in this chapter, to implement a FindDialog class.
\section1 Designing
\c
FindDialog
\section1 Designing
The
FindDialog
#image
#image
...
@@ -751,7 +751,7 @@
...
@@ -751,7 +751,7 @@
vertical.
vertical.
\section1 Implementing
\c
FindDialog
\section1 Implementing
The
FindDialog
Class
Let's look at \c{FindDialog}'s header file. Here, we need to provide
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
private members for the class so that we can access the widgets freely
...
@@ -791,6 +791,18 @@
...
@@ -791,6 +791,18 @@
we clear the contents of \c lineEdit and hide the dialog.
we clear the contents of \c lineEdit and hide the dialog.
\snippet examples/addressbook-sdk/part5/finddialog.cpp findClicked
\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
*/
*/
...
...
doc/examples/addressbook-sdk/part5/finddialog.cpp
View file @
df04fd06
...
@@ -43,7 +43,9 @@ void FindDialog::findClicked()
...
@@ -43,7 +43,9 @@ void FindDialog::findClicked()
}
}
//! [findClicked]
//! [findClicked]
//! [getFindText]
QString
FindDialog
::
getFindText
()
QString
FindDialog
::
getFindText
()
{
{
return
findText
;
return
findText
;
}
}
//! [getFindText]
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment