diff options
Diffstat (limited to 'examples/xmlpatterns/schema/doc/src/schema.qdoc')
-rw-r--r-- | examples/xmlpatterns/schema/doc/src/schema.qdoc | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/examples/xmlpatterns/schema/doc/src/schema.qdoc b/examples/xmlpatterns/schema/doc/src/schema.qdoc index b628bca..63c8418 100644 --- a/examples/xmlpatterns/schema/doc/src/schema.qdoc +++ b/examples/xmlpatterns/schema/doc/src/schema.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/schema + \example schema \title XML Schema Validation Example \ingroup xmlpattern_examples + \brief Using Qt XML Patterns to validate XML with a W3C XML Schema. The XML Schema Validation example shows how to use Qt XML Patterns to validate XML with a W3C XML Schema. @@ -69,7 +70,7 @@ QApplication. Then it creates an instance of the mainwindow class, shows it, and starts the Qt event loop: - \snippet xmlpatterns/schema/main.cpp 0 + \snippet schema/main.cpp 0 \section2 The UI Class: MainWindow @@ -77,7 +78,7 @@ QMainWindow and the class generated by \l{Qt Designer Manual} {Qt Designer}: - \snippet xmlpatterns/schema/mainwindow.h 0 + \snippet schema/mainwindow.h 0 The constructor fills the schema and instance \l{QComboBox} selections with the predefined schemas and instances and connects their \l{QComboBox::currentIndexChanged()} {currentIndexChanged()} @@ -88,20 +89,20 @@ The call to \c{schemaSelected(0)} and \c{instanceSelected(0)} will trigger the validation of the initial Contact Schema example. - \snippet xmlpatterns/schema/mainwindow.cpp 0 + \snippet schema/mainwindow.cpp 0 In the \c{schemaSelected()} slot the content of the instance \l{QComboBox} {selection} is adapted to the selected schema and the corresponding schema is loaded from the \l{The Qt Resource System} {resource file} and displayed in the schema \l{QTextBrowser} {viewer}. At the end of the method a revalidation is triggered. - \snippet xmlpatterns/schema/mainwindow.cpp 1 + \snippet schema/mainwindow.cpp 1 In the \c{instanceSelected()} slot the selected instance is loaded from the \l{The Qt Resource System} {resource file} and loaded into the instance \l{QTextEdit} {editor} an the revalidation is triggered again. - \snippet xmlpatterns/schema/mainwindow.cpp 2 + \snippet schema/mainwindow.cpp 2 The \c{validate()} slot does the actual work in this example. At first it stores the content of the schema \l{QTextBrowser} {viewer} and the @@ -110,7 +111,7 @@ \l{QAbstractMessageHandler} {QAbstractMessageHandler} and is a convenience class to store error messages from the XmlPatterns system. - \snippet xmlpatterns/schema/mainwindow.cpp 4 + \snippet schema/mainwindow.cpp 4 After the \l{QXmlSchema} {QXmlSchema} is instanciated and the message handler set on it, the \l{QXmlSchema::load()} {load()} method is called with the schema data as argument. @@ -126,5 +127,5 @@ The rest of the code does only some fancy coloring and eyecandy. - \snippet xmlpatterns/schema/mainwindow.cpp 3 + \snippet schema/mainwindow.cpp 3 */ |