summaryrefslogtreecommitdiffstats
path: root/examples/xmlpatterns/schema
diff options
context:
space:
mode:
authorTobias Koenig <tokoe@kde.org>2009-05-20 19:11:14 (GMT)
committerTobias Koenig <tokoe@kde.org>2009-05-20 19:11:14 (GMT)
commit676d97d56a96c46cd9b9a2d6ba5d5f535f974d42 (patch)
treedb0d166616100d53b923927337c2bdb0ad3bd278 /examples/xmlpatterns/schema
parentf66a475a236649c94a47f668ba3461bdc325c308 (diff)
downloadQt-676d97d56a96c46cd9b9a2d6ba5d5f535f974d42.zip
Qt-676d97d56a96c46cd9b9a2d6ba5d5f535f974d42.tar.gz
Qt-676d97d56a96c46cd9b9a2d6ba5d5f535f974d42.tar.bz2
Complete documentation of schema example and reference it from api docs
Diffstat (limited to 'examples/xmlpatterns/schema')
-rw-r--r--examples/xmlpatterns/schema/mainwindow.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/examples/xmlpatterns/schema/mainwindow.cpp b/examples/xmlpatterns/schema/mainwindow.cpp
index 98276a3..bee7407 100644
--- a/examples/xmlpatterns/schema/mainwindow.cpp
+++ b/examples/xmlpatterns/schema/mainwindow.cpp
@@ -45,6 +45,7 @@
#include "mainwindow.h"
#include "xmlsyntaxhighlighter.h"
+//! [4]
class MessageHandler : public QAbstractMessageHandler
{
public:
@@ -85,7 +86,9 @@ class MessageHandler : public QAbstractMessageHandler
QString m_description;
QSourceLocation m_sourceLocation;
};
+//! [4]
+//! [0]
MainWindow::MainWindow()
{
setupUi(this);
@@ -110,7 +113,9 @@ MainWindow::MainWindow()
schemaSelected(0);
instanceSelected(0);
}
+//! [0]
+//! [1]
void MainWindow::schemaSelected(int index)
{
instanceSelection->clear();
@@ -133,7 +138,9 @@ void MainWindow::schemaSelected(int index)
validate();
}
+//! [1]
+//! [2]
void MainWindow::instanceSelected(int index)
{
QFile instanceFile(QString(":/instance_%1.xml").arg((2*schemaSelection->currentIndex()) + index));
@@ -143,7 +150,9 @@ void MainWindow::instanceSelected(int index)
validate();
}
+//! [2]
+//! [3]
void MainWindow::validate()
{
const QByteArray schemaData = schemaView->toPlainText().toUtf8();
@@ -177,6 +186,7 @@ void MainWindow::validate()
QColor(Qt::green).lighter(160).name());
validationStatus->setStyleSheet(styleSheet);
}
+//! [3]
void MainWindow::textChanged()
{