Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
qt-creator
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tobias Hunger
qt-creator
Commits
fe0d0999
Commit
fe0d0999
authored
15 years ago
by
Daniel Molkentin
Browse files
Options
Downloads
Patches
Plain Diff
Remove accidentially committed file.
parent
2f944855
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
doc/eike_doc.patch
+0
-138
0 additions, 138 deletions
doc/eike_doc.patch
with
0 additions
and
138 deletions
doc/eike_doc.patch
deleted
100644 → 0
+
0
−
138
View file @
2f944855
diff --git a/doc/addressbook-sdk.qdoc b/doc/addressbook-sdk.qdoc
index 0441666..7012ea6 100644
--- a/doc/addressbook-sdk.qdoc
+++ b/doc/addressbook-sdk.qdoc
@@ -139,7 +139,7 @@
\section1 Placing Widgets on The Form
In the \gui{Project Sidebar}, double-click on the \c{addressbook.ui} file.
- The \QD plugin will be launched, allowing you to design your program's user
+ The \QD form editor will be launched, allowing you to design your program's user
interface.
We require two \l{QLabel}s to label the input fields as well as a QLineEdit
@@ -156,6 +156,7 @@
diagram below shows the layout cells and the position of our widgets. Place
your widgets accordingly and save the form by choosing
\gui{File | Save} or using the \key{Ctrl+S} shortcut.
+ (We have to actually layout the widgets in a grid layout, this step seems to be missing to me?)
\image addressbook-tutorial-part1-labeled-screenshot.png
@@ -311,7 +312,7 @@
\snippet examples/addressbook-sdk/part2/addressbook.h slot definition
Since the \c AddressBook class is a subclass of QWidget, Qt Creator
- includes QWidget in the hedaer file.
+ includes QWidget in the header file.
\snippet examples/addressbook-sdk/part2/addressbook.h include
@@ -323,7 +324,7 @@
\snippet examples/addressbook-sdk/part2/addressbook.h members
We also declare two private QString objects, \c oldName and \c oldAddress.
- These objects are needed to hold the name and address of hte contact that
+ These objects are needed to hold the name and address of the contact that
was last displayed, before the user clicked \gui Add. So, when the user
clicks \gui Cancel, we can revert to displaying the details of the last
contact.
@@ -499,7 +500,7 @@
\snippet examples/addressbook-sdk/part3/addressbook.cpp enable navigation
- We also include these lins of code in the \c cancel() function.
+ We also include these lines of code in the \c cancel() function.
Recall that we intend to emulate a circularly-linked list with our QMap
object, \c contacts. So in the \c next() function, we obtain an iterator
@@ -722,11 +723,12 @@
#image
- We begin by adding a new \c{.ui} file to our project. Right click on your
+ We begin by adding a new \c{.ui} file and a corresponding class to our project. Right click on your
project and select \gui{Add New...}. In the \gui{New File} dialog, select
- \gui{Qt Designer Form}. In the \gui{Qt Designer Form} dialog, select
- \e{Dialog without buttons}. Name it \c{finddialog.ui} and add it to your
- project. The \QD plugin within Qt Creator will now display your new form.
+ \gui{Qt Designer Form Class}. In the \gui{Qt Designer Form Class} dialog, select
+ \e{Dialog without buttons}. Name the class \c{FindDialog} and add the files it to your
+ project. Open your new form in the \QD form editor within Qt Creator by
+ double-clicking on the \c{finddialog.ui} file in the \gui{Project Sidebar}.
To replicate the screenshot above, we need a label, a line edit, and a push
button. Drag these onto your form. Set their text accordingly and name them
@@ -759,6 +761,9 @@
\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.
+ (The above paragraph is not up to date, since clicked() is not connected
+ to accept(). The description of accept() can move below to the implementation
+ of findClicked().)
\image addressbook-tutorial-part5-signals-and-slots.png
@@ -766,17 +771,17 @@
\gui Find button without entering a contact's name. Then, we set
\c findText to the search string, extracted from \c lineEdit. After that,
we clear the contents of \c lineEdit and hide the dialog.
+ (There is no findText member. The description of accept() should move here, together
+ with words about reject.)
\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
+ The \c text of the find dialog's line edit has a public getter function, \c findText(),
+ associated with it. Because \c findText() 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
+ \snippet examples/addressbook-sdk/part5/finddialog.cpp findText
\section1 The AddressBook Class
@@ -788,23 +793,9 @@
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().
+ \c {ui->findButton} and \c findContact().
\snippet examples/addressbook-sdk/part5/addressbook.h slot definition
- \dots
- \snippet examples/addressbook-sdk/part5/addressbook.h private members
-
- Lastly, we declare the private variable, \c dialog, which we will use to
- refer to an instance of \c FindDialog.
-
- Once we have instantiated a dialog, we might want to use it more than once;
- using a private variable allows us to refer to it from more than one place
- in the class.
-
- Within the \c AddressBook class's constructor, we insantiate our private
- objects, \c findButton and \c dialog:
-
- \snippet examples/addressbook-sdk/part5/addressbook.cpp private members
Next, we connect the \c{findButton}'s \l{QPushButton::}{clicked()} signal
to \c findContact().
@@ -818,10 +809,12 @@
We start out by displaying the \c FindDialog instance, \c dialog. This is
when the user enters a contact name to look up. Once the user clicks the
dialog's \c findButton, the dialog is hidden and the result code is set to
- QDialog::Accepted. THis ensures that our \c if statement is always true.
+ either QDialog::Accepted or QDialog::Rejected by the FindDialog's
+ \c findClicked() method. This ensures that we only search for a contact
+ if the user typed something in the FindDialog's line edit.
We then proceed to extract the search string, which in this case is
- \c contactName, using \c{FindDialog}'s \c getFindText() function. If the
+ \c contactName, using \c{FindDialog}'s \c findText() function. If the
contact exists in our address book, we display it immediately. Otherwise,
we display the QMessageBox shown below to indicate that their search
failed.
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment