summaryrefslogtreecommitdiff
path: root/examples/xmlpatterns/recipes/doc/src/recipes.qdoc
diff options
context:
space:
mode:
Diffstat (limited to 'examples/xmlpatterns/recipes/doc/src/recipes.qdoc')
-rw-r--r--examples/xmlpatterns/recipes/doc/src/recipes.qdoc19
1 files changed, 10 insertions, 9 deletions
diff --git a/examples/xmlpatterns/recipes/doc/src/recipes.qdoc b/examples/xmlpatterns/recipes/doc/src/recipes.qdoc
index 3e8b396..e989359 100644
--- a/examples/xmlpatterns/recipes/doc/src/recipes.qdoc
+++ b/examples/xmlpatterns/recipes/doc/src/recipes.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the documentation of the Qt Toolkit.
@@ -26,9 +26,10 @@
****************************************************************************/
/*!
- \example xmlpatterns/recipes
+ \example recipes
\title Recipes Example
\ingroup xmlpattern_examples
+ \brief Using Qt XML Patterns to query XML data loaded from a file.
The Recipes example shows how to use Qt XML Patterns to query XML data
loaded from a file.
@@ -67,7 +68,7 @@
\c{main.cpp} (\c{Q_INIT_RESOURCE(recipes);}). It lists the XQuery
files (\c{.xq}) that can be selected in the combobox.
- \quotefromfile xmlpatterns/recipes/recipes.qrc
+ \quotefromfile recipes/recipes.qrc
\printuntil
To add your own queries to the example's combobox, store your
@@ -80,7 +81,7 @@
QApplication. Then it creates an instance of the UI class, shows it,
and starts the Qt event loop:
- \snippet xmlpatterns/recipes/main.cpp 0
+ \snippet recipes/main.cpp 0
\section2 The UI Class: QueryMainWindow
@@ -88,7 +89,7 @@
QMainWindow and the class generated by \l{Qt Designer Manual} {Qt
Designer}:
- \snippet xmlpatterns/recipes/querymainwindow.h 0
+ \snippet recipes/querymainwindow.h 0
The constructor finds the window's \l{QComboBox} {combo box} child
widget and connects its \l{QComboBox::currentIndexChanged()}
@@ -98,7 +99,7 @@
viewer} . Finally, it finds the XQuery files (\c{.xq}) and adds each
one to the \l{QComboBox} {combo box} menu.
- \snippet xmlpatterns/recipes/querymainwindow.cpp 0
+ \snippet recipes/querymainwindow.cpp 0
The work is done in the \l{displayQuery() slot} {displayQuery()}
slot and the \l{evaluate() function} {evaluate()} function it
@@ -107,7 +108,7 @@
function} {evaluate()}.
\target displayQuery() slot
- \snippet xmlpatterns/recipes/querymainwindow.cpp 1
+ \snippet recipes/querymainwindow.cpp 1
\l{evaluate() function} {evaluate()} demonstrates the standard
Qt XML Patterns usage pattern. First, an instance of QXmlQuery is
@@ -125,7 +126,7 @@
called to ensure that the XQuery was correctly parsed.
\target evaluate() function
- \snippet xmlpatterns/recipes/querymainwindow.cpp 2
+ \snippet recipes/querymainwindow.cpp 2
If the XQuery is valid, an instance of QXmlFormatter is created to
format the query result as XML into a QBuffer. To evaluate the
@@ -137,7 +138,7 @@
\note Each XQuery \c{.xq} file must declare the \c{$inputDocument}
variable to represent the \c cookbook.xml document:
- \code
+ \badcode
(: All ingredients for Mushroom Soup. :)
declare variable $inputDocument external;