summaryrefslogtreecommitdiffstats
path: root/examples/widgets/doc/syntaxhighlighter.qdoc
diff options
context:
space:
mode:
authorAndy Nichols <andy.nichols@nokia.com>2012-08-21 16:13:49 +0200
committerQt by Nokia <qt-info@nokia.com>2012-08-23 11:20:37 +0200
commitfc924ae47e73a5b41e274a723d8f7cdefe921c4f (patch)
tree560b0969b970c262c5ebbc9eaa4d23157f103e19 /examples/widgets/doc/syntaxhighlighter.qdoc
parent8e0bac89d4b0f01b71c57f79a3b98a6ecb7f20ae (diff)
Doc: Fix snippet and example referencing widget examples
Widget examples were moved into a widgets subfolder, but qdoc references were not updated. Change-Id: Id2a4573e723745b9827c664c852807d6116f8f6d Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
Diffstat (limited to 'examples/widgets/doc/syntaxhighlighter.qdoc')
-rw-r--r--examples/widgets/doc/syntaxhighlighter.qdoc34
1 files changed, 17 insertions, 17 deletions
diff --git a/examples/widgets/doc/syntaxhighlighter.qdoc b/examples/widgets/doc/syntaxhighlighter.qdoc
index 272152a3a1..e74cc342a4 100644
--- a/examples/widgets/doc/syntaxhighlighter.qdoc
+++ b/examples/widgets/doc/syntaxhighlighter.qdoc
@@ -26,7 +26,7 @@
****************************************************************************/
/*!
- \example richtext/syntaxhighlighter
+ \example widgets/richtext/syntaxhighlighter
\title Syntax Highlighter Example
The Syntax Highlighter example shows how to perform simple syntax
@@ -53,7 +53,7 @@
\section1 Highlighter Class Definition
- \snippet richtext/syntaxhighlighter/highlighter.h 0
+ \snippet widgets/richtext/syntaxhighlighter/highlighter.h 0
To provide your own syntax highlighting, you must subclass
QSyntaxHighlighter, reimplement the \l
@@ -79,8 +79,8 @@
applied. In this example, we have also chosen to define our
highlighting rules in the constructor:
- \snippet richtext/syntaxhighlighter/highlighter.cpp 0
- \snippet richtext/syntaxhighlighter/highlighter.cpp 1
+ \snippet widgets/richtext/syntaxhighlighter/highlighter.cpp 0
+ \snippet widgets/richtext/syntaxhighlighter/highlighter.cpp 1
First we define a keyword rule which recognizes the most common
C++ keywords. We give the \c keywordFormat a bold, dark blue
@@ -88,11 +88,11 @@
format to a HighlightingRule object and append the object to our
list of rules.
- \snippet richtext/syntaxhighlighter/highlighter.cpp 2
+ \snippet widgets/richtext/syntaxhighlighter/highlighter.cpp 2
\codeline
- \snippet richtext/syntaxhighlighter/highlighter.cpp 4
+ \snippet widgets/richtext/syntaxhighlighter/highlighter.cpp 4
\codeline
- \snippet richtext/syntaxhighlighter/highlighter.cpp 5
+ \snippet widgets/richtext/syntaxhighlighter/highlighter.cpp 5
Then we create a format that we will apply to Qt class names. The
class names will be rendered with a dark magenta color and a bold
@@ -106,9 +106,9 @@
expressions and are stored in HighlightingRule objects with the
associated format.
- \snippet richtext/syntaxhighlighter/highlighter.cpp 3
+ \snippet widgets/richtext/syntaxhighlighter/highlighter.cpp 3
\codeline
- \snippet richtext/syntaxhighlighter/highlighter.cpp 6
+ \snippet widgets/richtext/syntaxhighlighter/highlighter.cpp 6
The C++ language has two variations of comments: The single line
comment (\c //) and the multiline comment (\c{/*...}\starslash). The single
@@ -126,7 +126,7 @@
function. At this point we only specify the multiline comment's
color.
- \snippet richtext/syntaxhighlighter/highlighter.cpp 7
+ \snippet widgets/richtext/syntaxhighlighter/highlighter.cpp 7
The highlightBlock() function is called automatically whenever it
is necessary by the rich text engine, i.e. when there are text
@@ -154,7 +154,7 @@
This process is repeated until the last occurrence of the pattern
in the current text block is found.
- \snippet richtext/syntaxhighlighter/highlighter.cpp 8
+ \snippet widgets/richtext/syntaxhighlighter/highlighter.cpp 8
To deal with constructs that can span several text blocks (like
the C++ multiline comment), it is necessary to know the end state
@@ -180,7 +180,7 @@
syntax highlighting rules are applied we initialize the current
block state to 0.
- \snippet richtext/syntaxhighlighter/highlighter.cpp 9
+ \snippet widgets/richtext/syntaxhighlighter/highlighter.cpp 9
If the previous block state was "in comment" (\c
{previousBlockState() == 1}), we start the search for an end
@@ -188,8 +188,8 @@
previousBlockState() returns 0, we start the search at the
location of the first occurrence of a start expression.
- \snippet richtext/syntaxhighlighter/highlighter.cpp 10
- \snippet richtext/syntaxhighlighter/highlighter.cpp 11
+ \snippet widgets/richtext/syntaxhighlighter/highlighter.cpp 10
+ \snippet widgets/richtext/syntaxhighlighter/highlighter.cpp 11
When an end expression is found, we calculate the length of the
comment and apply the multiline comment format. Then we search for
@@ -206,7 +206,7 @@
application with an instance of the class and pass it the document
upon which you want the highlighting to be applied.
- \snippet richtext/syntaxhighlighter/mainwindow.h 0
+ \snippet widgets/richtext/syntaxhighlighter/mainwindow.h 0
In this example we declare a pointer to a \c Highlighter instance
which we later will initialize in the private \c setupEditor()
@@ -219,12 +219,12 @@
central widget of the application. Finally we set the main
window's title.
- \snippet richtext/syntaxhighlighter/mainwindow.cpp 0
+ \snippet widgets/richtext/syntaxhighlighter/mainwindow.cpp 0
We initialize and install the \c Highlighter object in the private
setupEditor() convenience function:
- \snippet richtext/syntaxhighlighter/mainwindow.cpp 1
+ \snippet widgets/richtext/syntaxhighlighter/mainwindow.cpp 1
First we create the font we want to use in the editor, then we
create the editor itself which is an instance of the QTextEdit