diff options
author | Leena Miettinen <riitta-leena.miettinen@digia.com> | 2014-10-17 15:55:53 +0200 |
---|---|---|
committer | Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> | 2015-01-05 16:59:36 +0100 |
commit | 060cc3c47062a35e8127413ece57573d1aca067f (patch) | |
tree | f470e22b330ae41026949b3491a1f5e241564139 /examples/xmlpatterns/recipes/doc/src | |
parent | 64dcf54e06556f951dff277feb9a9b6aa7767cf8 (diff) | |
download | qtxmlpatterns-060cc3c47062a35e8127413ece57573d1aca067f.tar.gz |
- Add \brief commands to example docs to show descriptions
- Add an examples page with the \group command
- Link to the examples page from the module index page
- Edit the .qdocconf file
- Edit the .gitignore file to allow pushing changes to examples
- Add a generic thumbnail image for C++ Code Analyzer example
Change-Id: I1a313ae26664ce9fc50ef8962f0facd57dea546b
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Diffstat (limited to 'examples/xmlpatterns/recipes/doc/src')
-rw-r--r-- | examples/xmlpatterns/recipes/doc/src/recipes.qdoc | 19 |
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; |