From 087f3d86fccb0195e017c6ce8dfca710a94b723b Mon Sep 17 00:00:00 2001 From: Christian Kamm Date: Thu, 10 Sep 2009 11:53:57 +0200 Subject: Fix extending examples by inserting the appropriate import. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: owolff Reviewed-by: Thorbjørn Lindeijer --- examples/declarative/extending/adding/example.qml | 1 + examples/declarative/extending/attached/example.qml | 1 + examples/declarative/extending/binding/example.qml | 1 + examples/declarative/extending/coercion/example.qml | 1 + examples/declarative/extending/default/example.qml | 1 + examples/declarative/extending/extended/example.qml | 1 + examples/declarative/extending/grouped/example.qml | 1 + examples/declarative/extending/properties/example.qml | 1 + examples/declarative/extending/signal/example.qml | 1 + examples/declarative/extending/valuesource/example.qml | 1 + 10 files changed, 10 insertions(+) diff --git a/examples/declarative/extending/adding/example.qml b/examples/declarative/extending/adding/example.qml index ba7af7a..b8fee26 100644 --- a/examples/declarative/extending/adding/example.qml +++ b/examples/declarative/extending/adding/example.qml @@ -1,4 +1,5 @@ import Qt 4.6 +import People 1.0 // ![0] Person { diff --git a/examples/declarative/extending/attached/example.qml b/examples/declarative/extending/attached/example.qml index 20233f6..6cf3e39 100644 --- a/examples/declarative/extending/attached/example.qml +++ b/examples/declarative/extending/attached/example.qml @@ -1,4 +1,5 @@ import Qt 4.6 +import People 1.0 BirthdayParty { celebrant: Boy { diff --git a/examples/declarative/extending/binding/example.qml b/examples/declarative/extending/binding/example.qml index cedb8bd..7ab0d62 100644 --- a/examples/declarative/extending/binding/example.qml +++ b/examples/declarative/extending/binding/example.qml @@ -1,4 +1,5 @@ import Qt 4.6 +import People 1.0 // ![0] BirthdayParty { diff --git a/examples/declarative/extending/coercion/example.qml b/examples/declarative/extending/coercion/example.qml index 5090782..ce2c32d 100644 --- a/examples/declarative/extending/coercion/example.qml +++ b/examples/declarative/extending/coercion/example.qml @@ -1,4 +1,5 @@ import Qt 4.6 +import People 1.0 // ![0] BirthdayParty { diff --git a/examples/declarative/extending/default/example.qml b/examples/declarative/extending/default/example.qml index 5fe693a..051a9d2 100644 --- a/examples/declarative/extending/default/example.qml +++ b/examples/declarative/extending/default/example.qml @@ -1,4 +1,5 @@ import Qt 4.6 +import People 1.0 // ![0] BirthdayParty { diff --git a/examples/declarative/extending/extended/example.qml b/examples/declarative/extending/extended/example.qml index a276211..8311c8e 100644 --- a/examples/declarative/extending/extended/example.qml +++ b/examples/declarative/extending/extended/example.qml @@ -1,4 +1,5 @@ import Qt 4.6 +import People 1.0 // ![0] QLineEdit { diff --git a/examples/declarative/extending/grouped/example.qml b/examples/declarative/extending/grouped/example.qml index 1be7abe..622e204 100644 --- a/examples/declarative/extending/grouped/example.qml +++ b/examples/declarative/extending/grouped/example.qml @@ -1,4 +1,5 @@ import Qt 4.6 +import People 1.0 // ![0] BirthdayParty { diff --git a/examples/declarative/extending/properties/example.qml b/examples/declarative/extending/properties/example.qml index 326105a..976baf2 100644 --- a/examples/declarative/extending/properties/example.qml +++ b/examples/declarative/extending/properties/example.qml @@ -1,4 +1,5 @@ import Qt 4.6 +import People 1.0 // ![0] BirthdayParty { diff --git a/examples/declarative/extending/signal/example.qml b/examples/declarative/extending/signal/example.qml index 1cbaab4..dc3a61a 100644 --- a/examples/declarative/extending/signal/example.qml +++ b/examples/declarative/extending/signal/example.qml @@ -1,4 +1,5 @@ import Qt 4.6 +import People 1.0 // ![0] BirthdayParty { diff --git a/examples/declarative/extending/valuesource/example.qml b/examples/declarative/extending/valuesource/example.qml index aba2796..c536061 100644 --- a/examples/declarative/extending/valuesource/example.qml +++ b/examples/declarative/extending/valuesource/example.qml @@ -1,4 +1,5 @@ import Qt 4.6 +import People 1.0 // ![0] BirthdayParty { -- cgit v0.12 From 754c3ac2598a7c2b0f212f8aa3e281d63be6578e Mon Sep 17 00:00:00 2001 From: Christian Kamm Date: Thu, 10 Sep 2009 13:10:42 +0200 Subject: Fix QML_DEFINE_EXTENDED_TYPE use in extending/extended example. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Thorbjørn Lindeijer --- examples/declarative/extending/extended/lineedit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/declarative/extending/extended/lineedit.cpp b/examples/declarative/extending/extended/lineedit.cpp index fe4fdc3..f11d22e 100644 --- a/examples/declarative/extending/extended/lineedit.cpp +++ b/examples/declarative/extending/extended/lineedit.cpp @@ -63,4 +63,4 @@ int LineEditExtension::setBottomMargin(int m) } QML_DECLARE_TYPE(QLineEdit); -QML_DEFINE_EXTENDED_TYPE(QLineEdit, QLineEdit, LineEditExtension); +QML_DEFINE_EXTENDED_TYPE(People, 1, 0, 0, QLineEdit, QLineEdit, LineEditExtension); -- cgit v0.12 From 93340b47b14605fb54a6d74f07af8d3c4d6a1777 Mon Sep 17 00:00:00 2001 From: Christian Kamm Date: Thu, 10 Sep 2009 13:12:19 +0200 Subject: Remove unused imports from examples for extending. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Thorbjørn Lindeijer --- examples/declarative/extending/adding/example.qml | 1 - examples/declarative/extending/attached/example.qml | 1 - examples/declarative/extending/binding/example.qml | 1 - examples/declarative/extending/coercion/example.qml | 1 - examples/declarative/extending/default/example.qml | 1 - examples/declarative/extending/extended/example.qml | 1 - examples/declarative/extending/grouped/example.qml | 1 - examples/declarative/extending/properties/example.qml | 1 - examples/declarative/extending/signal/example.qml | 1 - examples/declarative/extending/valuesource/example.qml | 1 - 10 files changed, 10 deletions(-) diff --git a/examples/declarative/extending/adding/example.qml b/examples/declarative/extending/adding/example.qml index b8fee26..c608f94 100644 --- a/examples/declarative/extending/adding/example.qml +++ b/examples/declarative/extending/adding/example.qml @@ -1,4 +1,3 @@ -import Qt 4.6 import People 1.0 // ![0] diff --git a/examples/declarative/extending/attached/example.qml b/examples/declarative/extending/attached/example.qml index 6cf3e39..952eb93 100644 --- a/examples/declarative/extending/attached/example.qml +++ b/examples/declarative/extending/attached/example.qml @@ -1,4 +1,3 @@ -import Qt 4.6 import People 1.0 BirthdayParty { diff --git a/examples/declarative/extending/binding/example.qml b/examples/declarative/extending/binding/example.qml index 7ab0d62..1651b7a 100644 --- a/examples/declarative/extending/binding/example.qml +++ b/examples/declarative/extending/binding/example.qml @@ -1,4 +1,3 @@ -import Qt 4.6 import People 1.0 // ![0] diff --git a/examples/declarative/extending/coercion/example.qml b/examples/declarative/extending/coercion/example.qml index ce2c32d..64d26b0 100644 --- a/examples/declarative/extending/coercion/example.qml +++ b/examples/declarative/extending/coercion/example.qml @@ -1,4 +1,3 @@ -import Qt 4.6 import People 1.0 // ![0] diff --git a/examples/declarative/extending/default/example.qml b/examples/declarative/extending/default/example.qml index 051a9d2..58035f9 100644 --- a/examples/declarative/extending/default/example.qml +++ b/examples/declarative/extending/default/example.qml @@ -1,4 +1,3 @@ -import Qt 4.6 import People 1.0 // ![0] diff --git a/examples/declarative/extending/extended/example.qml b/examples/declarative/extending/extended/example.qml index 8311c8e..985ce20 100644 --- a/examples/declarative/extending/extended/example.qml +++ b/examples/declarative/extending/extended/example.qml @@ -1,4 +1,3 @@ -import Qt 4.6 import People 1.0 // ![0] diff --git a/examples/declarative/extending/grouped/example.qml b/examples/declarative/extending/grouped/example.qml index 622e204..55912ed 100644 --- a/examples/declarative/extending/grouped/example.qml +++ b/examples/declarative/extending/grouped/example.qml @@ -1,4 +1,3 @@ -import Qt 4.6 import People 1.0 // ![0] diff --git a/examples/declarative/extending/properties/example.qml b/examples/declarative/extending/properties/example.qml index 976baf2..9594a84 100644 --- a/examples/declarative/extending/properties/example.qml +++ b/examples/declarative/extending/properties/example.qml @@ -1,4 +1,3 @@ -import Qt 4.6 import People 1.0 // ![0] diff --git a/examples/declarative/extending/signal/example.qml b/examples/declarative/extending/signal/example.qml index dc3a61a..e46bf32 100644 --- a/examples/declarative/extending/signal/example.qml +++ b/examples/declarative/extending/signal/example.qml @@ -1,4 +1,3 @@ -import Qt 4.6 import People 1.0 // ![0] diff --git a/examples/declarative/extending/valuesource/example.qml b/examples/declarative/extending/valuesource/example.qml index c536061..6d47350 100644 --- a/examples/declarative/extending/valuesource/example.qml +++ b/examples/declarative/extending/valuesource/example.qml @@ -1,4 +1,3 @@ -import Qt 4.6 import People 1.0 // ![0] -- cgit v0.12 From abfa26ff5be47edcf38a48bacb4bd310badca09e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorbj=C3=B8rn=20Lindeijer?= Date: Thu, 10 Sep 2009 13:37:49 +0200 Subject: Fixed references to QFxPainted, which got replaced by QFxPaintedItem See commit 415708f85341448c6f30bbca6e31e48dbfde72a5, and later renaming of QFxImageItem to QFxPaintedItem in commit d1bb572b9fb5b0286df992c8ae560d91c9dc3388. Also added a table of contents to the QML for C++ Programmers page. --- doc/src/declarative/cppitem.qdoc | 6 +++--- doc/src/declarative/qmlforcpp.qdoc | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/doc/src/declarative/cppitem.qdoc b/doc/src/declarative/cppitem.qdoc index 4543156..38da0fb 100644 --- a/doc/src/declarative/cppitem.qdoc +++ b/doc/src/declarative/cppitem.qdoc @@ -94,7 +94,7 @@ You can create a new type of QML item by: To add a new type, you first must add a new C++ class derived from QFxItem. You may of course extend existing QFxItem subclasses. -One existing subclass is QFxPainted, which provides +One existing subclass is QFxPaintedItem, which provides a simple cached-image painting model. \section2 Reimplementing paint functions @@ -105,11 +105,11 @@ Two alternative painters are available, offering different levels of performance and functionality: QPainter, GLPainter. -You can choose to subclass QFxPainted rather than QFxItem, +You can choose to subclass QFxPaintedItem rather than QFxItem, and then implement the virtual method: \code - void paint(QPainter *painter); + void drawContents(QPainter *painter, const QRect &rect); \endcode This paints into an offscreen pixmap which is then painted to the display (transformed, diff --git a/doc/src/declarative/qmlforcpp.qdoc b/doc/src/declarative/qmlforcpp.qdoc index 5838df7..ab456e5 100644 --- a/doc/src/declarative/qmlforcpp.qdoc +++ b/doc/src/declarative/qmlforcpp.qdoc @@ -15,6 +15,8 @@ either for the first time at startup or subsequently thereafter - the property is automatically updated with the new value. + \tableofcontents + \section1 Loading and using QML Files QmlComponent is used to load a QML file and to create object instances. -- cgit v0.12