summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@theqtcompany.com>2015-01-19 14:07:23 +0100
committerFrederik Gladhorn <frederik.gladhorn@theqtcompany.com>2015-01-19 14:07:23 +0100
commit760a3fde6b4b9cfad93d1978540d74418ee9d23c (patch)
tree4c714ee6f9fb84b737268a38f2f183b9b1059e29
parente2d4b998db7b9f12d47f9ae83e411e4c66fdd49f (diff)
parentc3d78665b7720aa692173410146db3182e981c87 (diff)
downloadqtsvg-760a3fde6b4b9cfad93d1978540d74418ee9d23c.tar.gz
Merge remote-tracking branch 'origin/5.4' into dev
Conflicts: .qmake.conf Change-Id: I309781379da78578437ecb83a9b878c69c90f559
-rw-r--r--examples/svg/richtext/textobject/doc/images/textobject-example.png (renamed from doc/src/images/textobject-example.png)bin16591 -> 16591 bytes
-rw-r--r--examples/svg/richtext/textobject/doc/src/textobject.qdoc (renamed from doc/src/examples/textobject.qdoc)14
-rw-r--r--src/svg/doc/qtsvg.qdocconf2
3 files changed, 8 insertions, 8 deletions
diff --git a/doc/src/images/textobject-example.png b/examples/svg/richtext/textobject/doc/images/textobject-example.png
index 626c102..626c102 100644
--- a/doc/src/images/textobject-example.png
+++ b/examples/svg/richtext/textobject/doc/images/textobject-example.png
Binary files differ
diff --git a/doc/src/examples/textobject.qdoc b/examples/svg/richtext/textobject/doc/src/textobject.qdoc
index fee3a55..79c90e1 100644
--- a/doc/src/examples/textobject.qdoc
+++ b/examples/svg/richtext/textobject/doc/src/textobject.qdoc
@@ -71,7 +71,7 @@
Let's take a look at the header file of \c {SvgTextObject}:
- \snippet examples/richtext/textobject/svgtextobject.h 0
+ \snippet richtext/textobject/svgtextobject.h 0
A text object is a QObject that implements QTextObjectInterface.
Note that the first class inherited must be QObject, and that
@@ -92,7 +92,7 @@
We start of by taking a look at the
\l{QTextObjectInterface::}{intrinsicSize()} function:
- \snippet examples/richtext/textobject/svgtextobject.cpp 0
+ \snippet richtext/textobject/svgtextobject.cpp 0
\c intrinsicSize() is called by the layout to calculate the size
of the text object. Notice that we have drawn the SVG image on a
@@ -100,7 +100,7 @@
example would lag seriously for large images if we drew them
with a QSvgRenderer each time.
- \snippet examples/richtext/textobject/svgtextobject.cpp 1
+ \snippet richtext/textobject/svgtextobject.cpp 1
In \c drawObject(), we paint the SVG image using the QPainter
provided by the layout.
@@ -110,7 +110,7 @@
The \c Window class is a self-contained window that has a
QTextEdit in which SVG images can be inserted.
- \snippet examples/richtext/textobject/window.h 0
+ \snippet richtext/textobject/window.h 0
The \c insertTextObject() slot inserts an SVG image at the current
cursor position, while \c setupTextObject() creates and registers
@@ -126,7 +126,7 @@
to our text object, starting with the \c setupTextObject()
function.
- \snippet examples/richtext/textobject/window.cpp 3
+ \snippet richtext/textobject/window.cpp 3
\c {SvgTextFormat}'s value is the number of our object type. It is
used to identify object types by the document layout.
@@ -137,12 +137,12 @@
Let's move on to the \c insertTextObject() function:
- \snippet examples/richtext/textobject/window.cpp 1
+ \snippet richtext/textobject/window.cpp 1
First, the \c .svg file is opened and its contents are read
into the \c svgData array.
- \snippet examples/richtext/textobject/window.cpp 2
+ \snippet richtext/textobject/window.cpp 2
To speed things up, we buffer the SVG image in a QImage. We use
\l{QTextFormat::}{setProperty()} to store the QImage in the in the
diff --git a/src/svg/doc/qtsvg.qdocconf b/src/svg/doc/qtsvg.qdocconf
index f1775a9..81a4359 100644
--- a/src/svg/doc/qtsvg.qdocconf
+++ b/src/svg/doc/qtsvg.qdocconf
@@ -33,7 +33,7 @@ headerdirs += .. \
../../plugins/svg
sourcedirs += .. \
- ../../plugins/svg
+ ../../plugins/svg
exampledirs += ../../../examples/svg \
snippets/