summaryrefslogtreecommitdiffstats
path: root/examples/widgets/doc/orderform.qdoc
diff options
context:
space:
mode:
Diffstat (limited to 'examples/widgets/doc/orderform.qdoc')
-rw-r--r--examples/widgets/doc/orderform.qdoc60
1 files changed, 30 insertions, 30 deletions
diff --git a/examples/widgets/doc/orderform.qdoc b/examples/widgets/doc/orderform.qdoc
index ed40c65093..062cc52547 100644
--- a/examples/widgets/doc/orderform.qdoc
+++ b/examples/widgets/doc/orderform.qdoc
@@ -26,7 +26,7 @@
****************************************************************************/
/*!
- \example richtext/orderform
+ \example widgets/richtext/orderform
\title Order Form Example
The Order Form example shows how to generate rich text documents by
@@ -43,7 +43,7 @@
\c verify() to allow contents of the \c DetailsDialog to be verified later.
This is further explained in \c DetailsDialog Implementation.
- \snippet richtext/orderform/detailsdialog.h 0
+ \snippet widgets/richtext/orderform/detailsdialog.h 0
The constructor of \c DetailsDialog accepts parameters \a title and
\a parent. The class defines four \e{getter} functions: \c orderItems(),
@@ -72,11 +72,11 @@
\c rejected() signals are connected to the \c verify() and \c reject()
slots in \c DetailsDialog.
- \snippet richtext/orderform/detailsdialog.cpp 0
+ \snippet widgets/richtext/orderform/detailsdialog.cpp 0
A QGridLayout is used to place all the objects on the \c DetailsDialog.
- \snippet richtext/orderform/detailsdialog.cpp 1
+ \snippet widgets/richtext/orderform/detailsdialog.cpp 1
The \c setupItemsTable() function instantiates the QTableWidget object,
\c itemsTable, and sets the number of rows based on the QStringList
@@ -88,29 +88,29 @@
\c itemsTable have this value for quantity; but this can be modified by
editing the contents of the cells at run time.
- \snippet richtext/orderform/detailsdialog.cpp 2
+ \snippet widgets/richtext/orderform/detailsdialog.cpp 2
The \c orderItems() function extracts data from the \c itemsTable and
returns it in the form of a QList<QPair<QString,int>> where each QPair
corresponds to an item and the quantity ordered.
- \snippet richtext/orderform/detailsdialog.cpp 3
+ \snippet widgets/richtext/orderform/detailsdialog.cpp 3
The \c senderName() function is used to return the value of the QLineEdit
used to store the name field for the order form.
- \snippet richtext/orderform/detailsdialog.cpp 4
+ \snippet widgets/richtext/orderform/detailsdialog.cpp 4
The \c senderAddress() function is used to return the value of the
QTextEdit containing the address for the order form.
- \snippet richtext/orderform/detailsdialog.cpp 5
+ \snippet widgets/richtext/orderform/detailsdialog.cpp 5
The \c sendOffers() function is used to return a \c true or \c false
value that is used to determine if the customer in the order form
wishes to receive more information on the company's offers and promotions.
- \snippet richtext/orderform/detailsdialog.cpp 6
+ \snippet widgets/richtext/orderform/detailsdialog.cpp 6
The \c verify() function is an additionally implemented slot used to
verify the details entered by the user into the \c DetailsDialog. If
@@ -118,7 +118,7 @@
providing the user the option to discard the \c DetailsDialog. Otherwise,
the details are accepted and the \c accept() function is invoked.
- \snippet richtext/orderform/detailsdialog.cpp 7
+ \snippet widgets/richtext/orderform/detailsdialog.cpp 7
\section1 MainWindow Definition
@@ -126,7 +126,7 @@
slots - \c openDialog() and \c printFile(). It also contains a private
instance of QTabWidget, \c letters.
- \snippet richtext/orderform/mainwindow.h 0
+ \snippet widgets/richtext/orderform/mainwindow.h 0
\section1 MainWindow Implementation
@@ -136,20 +136,20 @@
and the default close() slot. The QTabWidget, \c letters, is
instantiated and set as the window's central widget.
- \snippet richtext/orderform/mainwindow.cpp 0
+ \snippet widgets/richtext/orderform/mainwindow.cpp 0
The \c createLetter() function creates a new QTabWidget with a QTextEdit,
\c editor, as the parent. This function accepts four parameters that
correspond to we obtained through \c DetailsDialog, in order to "fill"
the \c editor.
- \snippet richtext/orderform/mainwindow.cpp 1
+ \snippet widgets/richtext/orderform/mainwindow.cpp 1
We then obtain the cursor for the \c editor using QTextEdit::textCursor().
The \c cursor is then moved to the start of the document using
QTextCursor::Start.
- \snippet richtext/orderform/mainwindow.cpp 2
+ \snippet widgets/richtext/orderform/mainwindow.cpp 2
Recall the structure of a \l{Rich Text Document Structure}
{Rich Text Document}, where sequences of frames and
@@ -180,7 +180,7 @@
This is accomplished with the following code:
- \snippet richtext/orderform/mainwindow.cpp 3
+ \snippet widgets/richtext/orderform/mainwindow.cpp 3
Note that \c topFrame is the \c {editor}'s top-level frame and is not shown
in the document structure.
@@ -189,7 +189,7 @@
\c topFrame and fill in the customer's name (provided by the constructor)
and address - using a \c foreach loop to traverse the QString, \c address.
- \snippet richtext/orderform/mainwindow.cpp 4
+ \snippet widgets/richtext/orderform/mainwindow.cpp 4
The \c cursor is now back in \c topFrame and the document structure for
the above portion of code is:
@@ -209,12 +209,12 @@
{setWidth()} to increase the width of \c bodyFrameFormat and we insert
a new frame with that width.
- \snippet richtext/orderform/mainwindow.cpp 5
+ \snippet widgets/richtext/orderform/mainwindow.cpp 5
The following code inserts standard text into the order form.
- \snippet richtext/orderform/mainwindow.cpp 6
- \snippet richtext/orderform/mainwindow.cpp 7
+ \snippet widgets/richtext/orderform/mainwindow.cpp 6
+ \snippet widgets/richtext/orderform/mainwindow.cpp 7
This part of the document structure now contains the date, a frame with
\c bodyFrameFormat, as well as the standard text.
@@ -241,17 +241,17 @@
A QTextTableFormat object, \c orderTableFormat, is used to hold the type
of item and the quantity ordered.
- \snippet richtext/orderform/mainwindow.cpp 8
+ \snippet widgets/richtext/orderform/mainwindow.cpp 8
We use \l{QTextTable::cellAt()}{cellAt()} to set the headers for the
\c orderTable.
- \snippet richtext/orderform/mainwindow.cpp 9
+ \snippet widgets/richtext/orderform/mainwindow.cpp 9
Then, we iterate through the QList of QPair objects to populate
\c orderTable.
- \snippet richtext/orderform/mainwindow.cpp 10
+ \snippet widgets/richtext/orderform/mainwindow.cpp 10
The resulting document structure for this section is:
@@ -284,13 +284,13 @@
\l{QTextFrame::lastPosition()}{lastPosition()} and more standard text
is inserted.
- \snippet richtext/orderform/mainwindow.cpp 11
- \snippet richtext/orderform/mainwindow.cpp 12
+ \snippet widgets/richtext/orderform/mainwindow.cpp 11
+ \snippet widgets/richtext/orderform/mainwindow.cpp 12
Another QTextTable is inserted, to display the customer's
preference regarding offers.
- \snippet richtext/orderform/mainwindow.cpp 13
+ \snippet widgets/richtext/orderform/mainwindow.cpp 13
The document structure for this portion is:
@@ -315,7 +315,7 @@
name. More blocks are inserted for spacing purposes. The \c printAction
is enabled to indicate that an order form can now be printed.
- \snippet richtext/orderform/mainwindow.cpp 14
+ \snippet widgets/richtext/orderform/mainwindow.cpp 14
The bottom portion of the document structure is:
@@ -337,18 +337,18 @@
The \c createSample() function is used for illustration purposes, to create
a sample order form.
- \snippet richtext/orderform/mainwindow.cpp 15
+ \snippet widgets/richtext/orderform/mainwindow.cpp 15
The \c openDialog() function opens a \c DetailsDialog object. If the
details in \c dialog are accepted, the \c createLetter() function is
invoked using the parameters extracted from \c dialog.
- \snippet richtext/orderform/mainwindow.cpp 16
+ \snippet widgets/richtext/orderform/mainwindow.cpp 16
In order to print out the order form, a \c printFile() function is
included, as shown below:
- \snippet richtext/orderform/mainwindow.cpp 17
+ \snippet widgets/richtext/orderform/mainwindow.cpp 17
This function also allows the user to print a selected area with
QTextCursor::hasSelection(), instead of printing the entire document.
@@ -359,6 +359,6 @@
640x480 pixels before invoking the \c show() function and
\c createSample() function.
- \snippet richtext/orderform/main.cpp 0
+ \snippet widgets/richtext/orderform/main.cpp 0
*/