aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTopi Reinio <topi.reinio@digia.com>2013-04-29 15:01:32 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-05-03 23:16:46 +0200
commitad5ae0d751e42a9ca6def5d98b2db740f195c16f (patch)
tree39270a7861f12fb293b621ef51edfa7932a6c2a4
parentddfa42c85b732972f819a2525293a90539d42d38 (diff)
Doc: Move example docs related to QtQml under the correct module
This change moves 'Extending QML' qdoc file and the tutorials from examples/quick to examples/qml, which is the correct location for them. Change-Id: I24bd9dfa75baaab7bc8efe08489f09a7b65d98a6 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com> Reviewed-by: Alan Alpert <aalpert@blackberry.com>
-rw-r--r--examples/qml/doc/src/qml-extending.qdoc (renamed from examples/quick/doc/src/qml-extending.qdoc)32
-rw-r--r--examples/qml/tutorials/extending/chapter1-basics/app.qml (renamed from examples/quick/tutorials/extending/chapter1-basics/app.qml)0
-rw-r--r--examples/qml/tutorials/extending/chapter1-basics/chapter1-basics.pro (renamed from examples/quick/tutorials/extending/chapter1-basics/chapter1-basics.pro)0
-rw-r--r--examples/qml/tutorials/extending/chapter1-basics/main.cpp (renamed from examples/quick/tutorials/extending/chapter1-basics/main.cpp)0
-rw-r--r--examples/qml/tutorials/extending/chapter1-basics/piechart.cpp (renamed from examples/quick/tutorials/extending/chapter1-basics/piechart.cpp)0
-rw-r--r--examples/qml/tutorials/extending/chapter1-basics/piechart.h (renamed from examples/quick/tutorials/extending/chapter1-basics/piechart.h)0
-rw-r--r--examples/qml/tutorials/extending/chapter2-methods/app.qml (renamed from examples/quick/tutorials/extending/chapter2-methods/app.qml)0
-rw-r--r--examples/qml/tutorials/extending/chapter2-methods/chapter2-methods.pro (renamed from examples/quick/tutorials/extending/chapter2-methods/chapter2-methods.pro)0
-rw-r--r--examples/qml/tutorials/extending/chapter2-methods/main.cpp (renamed from examples/quick/tutorials/extending/chapter2-methods/main.cpp)0
-rw-r--r--examples/qml/tutorials/extending/chapter2-methods/piechart.cpp (renamed from examples/quick/tutorials/extending/chapter2-methods/piechart.cpp)0
-rw-r--r--examples/qml/tutorials/extending/chapter2-methods/piechart.h (renamed from examples/quick/tutorials/extending/chapter2-methods/piechart.h)0
-rw-r--r--examples/qml/tutorials/extending/chapter3-bindings/app.qml (renamed from examples/quick/tutorials/extending/chapter3-bindings/app.qml)0
-rw-r--r--examples/qml/tutorials/extending/chapter3-bindings/chapter3-bindings.pro (renamed from examples/quick/tutorials/extending/chapter3-bindings/chapter3-bindings.pro)0
-rw-r--r--examples/qml/tutorials/extending/chapter3-bindings/main.cpp (renamed from examples/quick/tutorials/extending/chapter3-bindings/main.cpp)0
-rw-r--r--examples/qml/tutorials/extending/chapter3-bindings/piechart.cpp (renamed from examples/quick/tutorials/extending/chapter3-bindings/piechart.cpp)0
-rw-r--r--examples/qml/tutorials/extending/chapter3-bindings/piechart.h (renamed from examples/quick/tutorials/extending/chapter3-bindings/piechart.h)0
-rw-r--r--examples/qml/tutorials/extending/chapter4-customPropertyTypes/app.qml (renamed from examples/quick/tutorials/extending/chapter4-customPropertyTypes/app.qml)0
-rw-r--r--examples/qml/tutorials/extending/chapter4-customPropertyTypes/chapter4-customPropertyTypes.pro (renamed from examples/quick/tutorials/extending/chapter4-customPropertyTypes/chapter4-customPropertyTypes.pro)0
-rw-r--r--examples/qml/tutorials/extending/chapter4-customPropertyTypes/main.cpp (renamed from examples/quick/tutorials/extending/chapter4-customPropertyTypes/main.cpp)0
-rw-r--r--examples/qml/tutorials/extending/chapter4-customPropertyTypes/piechart.cpp (renamed from examples/quick/tutorials/extending/chapter4-customPropertyTypes/piechart.cpp)0
-rw-r--r--examples/qml/tutorials/extending/chapter4-customPropertyTypes/piechart.h (renamed from examples/quick/tutorials/extending/chapter4-customPropertyTypes/piechart.h)0
-rw-r--r--examples/qml/tutorials/extending/chapter4-customPropertyTypes/pieslice.cpp (renamed from examples/quick/tutorials/extending/chapter4-customPropertyTypes/pieslice.cpp)0
-rw-r--r--examples/qml/tutorials/extending/chapter4-customPropertyTypes/pieslice.h (renamed from examples/quick/tutorials/extending/chapter4-customPropertyTypes/pieslice.h)0
-rw-r--r--examples/qml/tutorials/extending/chapter5-listproperties/app.qml (renamed from examples/quick/tutorials/extending/chapter5-listproperties/app.qml)0
-rw-r--r--examples/qml/tutorials/extending/chapter5-listproperties/chapter5-listproperties.pro (renamed from examples/quick/tutorials/extending/chapter5-listproperties/chapter5-listproperties.pro)0
-rw-r--r--examples/qml/tutorials/extending/chapter5-listproperties/main.cpp (renamed from examples/quick/tutorials/extending/chapter5-listproperties/main.cpp)0
-rw-r--r--examples/qml/tutorials/extending/chapter5-listproperties/piechart.cpp (renamed from examples/quick/tutorials/extending/chapter5-listproperties/piechart.cpp)0
-rw-r--r--examples/qml/tutorials/extending/chapter5-listproperties/piechart.h (renamed from examples/quick/tutorials/extending/chapter5-listproperties/piechart.h)0
-rw-r--r--examples/qml/tutorials/extending/chapter5-listproperties/pieslice.cpp (renamed from examples/quick/tutorials/extending/chapter5-listproperties/pieslice.cpp)0
-rw-r--r--examples/qml/tutorials/extending/chapter5-listproperties/pieslice.h (renamed from examples/quick/tutorials/extending/chapter5-listproperties/pieslice.h)0
-rw-r--r--examples/qml/tutorials/extending/chapter6-plugins/Charts/qmldir (renamed from examples/quick/tutorials/extending/chapter6-plugins/Charts/qmldir)0
-rw-r--r--examples/qml/tutorials/extending/chapter6-plugins/app.qml (renamed from examples/quick/tutorials/extending/chapter6-plugins/app.qml)0
-rw-r--r--examples/qml/tutorials/extending/chapter6-plugins/chapter6-plugins.pro (renamed from examples/quick/tutorials/extending/chapter6-plugins/chapter6-plugins.pro)0
-rw-r--r--examples/qml/tutorials/extending/chapter6-plugins/chartsplugin.cpp (renamed from examples/quick/tutorials/extending/chapter6-plugins/chartsplugin.cpp)0
-rw-r--r--examples/qml/tutorials/extending/chapter6-plugins/chartsplugin.h (renamed from examples/quick/tutorials/extending/chapter6-plugins/chartsplugin.h)0
-rw-r--r--examples/qml/tutorials/extending/chapter6-plugins/piechart.cpp (renamed from examples/quick/tutorials/extending/chapter6-plugins/piechart.cpp)0
-rw-r--r--examples/qml/tutorials/extending/chapter6-plugins/piechart.h (renamed from examples/quick/tutorials/extending/chapter6-plugins/piechart.h)0
-rw-r--r--examples/qml/tutorials/extending/chapter6-plugins/pieslice.cpp (renamed from examples/quick/tutorials/extending/chapter6-plugins/pieslice.cpp)0
-rw-r--r--examples/qml/tutorials/extending/chapter6-plugins/pieslice.h (renamed from examples/quick/tutorials/extending/chapter6-plugins/pieslice.h)0
-rw-r--r--examples/qml/tutorials/extending/extending.pro (renamed from examples/quick/tutorials/extending/extending.pro)0
-rw-r--r--src/qml/doc/src/cppintegration/extending-tutorial.qdoc96
41 files changed, 64 insertions, 64 deletions
diff --git a/examples/quick/doc/src/qml-extending.qdoc b/examples/qml/doc/src/qml-extending.qdoc
index ee2dd06623..9823a29b65 100644
--- a/examples/quick/doc/src/qml-extending.qdoc
+++ b/examples/qml/doc/src/qml-extending.qdoc
@@ -34,7 +34,7 @@
The Adding Types Example shows how to add a new object type, \c Person, to QML.
The \c Person type can be used from QML like this:
-\snippet qml/referenceexamples/adding/example.qml 0
+\snippet referenceexamples/adding/example.qml 0
\section1 Declare the Person class
@@ -43,11 +43,11 @@ with the two properties we want accessible on the QML type - name and shoeSize.
Although in this example we use the same name for the C++ class as the QML
type, the C++ class can be named differently, or appear in a namespace.
-\snippet qml/referenceexamples/adding/person.h 0
+\snippet referenceexamples/adding/person.h 0
\section1 Define the Person class
-\snippet qml/referenceexamples/adding/person.cpp 0
+\snippet referenceexamples/adding/person.cpp 0
The Person class implementation is quite basic. The property accessors simply
return members of the object instance.
@@ -78,16 +78,16 @@ properties in QML. This example adds a BirthdayParty type that specifies
a birthday party, consisting of a celebrant and a list of guests. People are
specified using the People QML type built in the previous example.
-\snippet qml/referenceexamples/properties/example.qml 0
+\snippet referenceexamples/properties/example.qml 0
\section1 Declare the BirthdayParty
The BirthdayParty class is declared like this:
-\snippet qml/referenceexamples/properties/birthdayparty.h 0
-\snippet qml/referenceexamples/properties/birthdayparty.h 1
-\snippet qml/referenceexamples/properties/birthdayparty.h 2
-\snippet qml/referenceexamples/properties/birthdayparty.h 3
+\snippet referenceexamples/properties/birthdayparty.h 0
+\snippet referenceexamples/properties/birthdayparty.h 1
+\snippet referenceexamples/properties/birthdayparty.h 2
+\snippet referenceexamples/properties/birthdayparty.h 3
The class contains a member to store the celebrant object, and also a
QList<Person *> member.
@@ -104,7 +104,7 @@ scenarios.
The implementation of BirthdayParty property accessors is straight forward.
-\snippet qml/referenceexamples/properties/birthdayparty.cpp 0
+\snippet referenceexamples/properties/birthdayparty.cpp 0
\section1 Running the example
@@ -128,11 +128,11 @@ The Inheritance and Coercion Example shows how to use base classes to assign
types of more than one type to a property. It specializes the Person type
developed in the previous examples into two types - a \c Boy and a \c Girl.
-\snippet qml/referenceexamples/coercion/example.qml 0
+\snippet referenceexamples/coercion/example.qml 0
\section1 Declare Boy and Girl
-\snippet qml/referenceexamples/coercion/person.h 0
+\snippet referenceexamples/coercion/person.h 0
The Person class remains unaltered in this example and the Boy and Girl C++
classes are trivial extensions of it. As an example, the inheritance used here
@@ -147,7 +147,7 @@ previous example. However, as we have repurposed the People class as a common
base for Boy and Girl, we want to prevent it from being instantiated from QML
directly - an explicit Boy or Girl should be instantiated instead.
-\snippet qml/referenceexamples/coercion/main.cpp 0
+\snippet referenceexamples/coercion/main.cpp 0
While we want to disallow instantiating Person from within QML, it still needs
to be registered with the QML engine, so that it can be used as a property type
@@ -157,7 +157,7 @@ and other types can be coerced to it.
The implementation of Boy and Girl are trivial.
-\snippet qml/referenceexamples/coercion/person.cpp 1
+\snippet referenceexamples/coercion/person.cpp 1
All that is necessary is to implement the constructor, and to register the types
and their QML name with the QML engine.
@@ -167,7 +167,7 @@ and their QML name with the QML engine.
The BirthdayParty type has not changed since the previous example. The
celebrant and guests property still use the People type.
-\snippet qml/referenceexamples/coercion/birthdayparty.h 0
+\snippet referenceexamples/coercion/birthdayparty.h 0
However, as all three types, Person, Boy and Girl, have been registered with the
QML system, on assignment QML automatically (and type-safely) converts the Boy
@@ -194,14 +194,14 @@ The Default Property Example is a minor modification of the
\l {Extending QML - Inheritance and Coercion Example} that simplifies the
specification of a BirthdayParty through the use of a default property.
-\snippet qml/referenceexamples/default/example.qml 0
+\snippet referenceexamples/default/example.qml 0
\section1 Declaring the BirthdayParty class
The only difference between this example and the last, is the addition of the
\c DefaultProperty class info annotation.
-\snippet qml/referenceexamples/default/birthdayparty.h 0
+\snippet referenceexamples/default/birthdayparty.h 0
The default property specifies the property to assign to whenever an explicit
property is not specified, in the case of the BirthdayParty type the guest
diff --git a/examples/quick/tutorials/extending/chapter1-basics/app.qml b/examples/qml/tutorials/extending/chapter1-basics/app.qml
index d2f03daf83..d2f03daf83 100644
--- a/examples/quick/tutorials/extending/chapter1-basics/app.qml
+++ b/examples/qml/tutorials/extending/chapter1-basics/app.qml
diff --git a/examples/quick/tutorials/extending/chapter1-basics/chapter1-basics.pro b/examples/qml/tutorials/extending/chapter1-basics/chapter1-basics.pro
index 8ed66f8b66..8ed66f8b66 100644
--- a/examples/quick/tutorials/extending/chapter1-basics/chapter1-basics.pro
+++ b/examples/qml/tutorials/extending/chapter1-basics/chapter1-basics.pro
diff --git a/examples/quick/tutorials/extending/chapter1-basics/main.cpp b/examples/qml/tutorials/extending/chapter1-basics/main.cpp
index d30628fd5a..d30628fd5a 100644
--- a/examples/quick/tutorials/extending/chapter1-basics/main.cpp
+++ b/examples/qml/tutorials/extending/chapter1-basics/main.cpp
diff --git a/examples/quick/tutorials/extending/chapter1-basics/piechart.cpp b/examples/qml/tutorials/extending/chapter1-basics/piechart.cpp
index fa005781d8..fa005781d8 100644
--- a/examples/quick/tutorials/extending/chapter1-basics/piechart.cpp
+++ b/examples/qml/tutorials/extending/chapter1-basics/piechart.cpp
diff --git a/examples/quick/tutorials/extending/chapter1-basics/piechart.h b/examples/qml/tutorials/extending/chapter1-basics/piechart.h
index a6272453ce..a6272453ce 100644
--- a/examples/quick/tutorials/extending/chapter1-basics/piechart.h
+++ b/examples/qml/tutorials/extending/chapter1-basics/piechart.h
diff --git a/examples/quick/tutorials/extending/chapter2-methods/app.qml b/examples/qml/tutorials/extending/chapter2-methods/app.qml
index 06ecb3a09d..06ecb3a09d 100644
--- a/examples/quick/tutorials/extending/chapter2-methods/app.qml
+++ b/examples/qml/tutorials/extending/chapter2-methods/app.qml
diff --git a/examples/quick/tutorials/extending/chapter2-methods/chapter2-methods.pro b/examples/qml/tutorials/extending/chapter2-methods/chapter2-methods.pro
index 8ed66f8b66..8ed66f8b66 100644
--- a/examples/quick/tutorials/extending/chapter2-methods/chapter2-methods.pro
+++ b/examples/qml/tutorials/extending/chapter2-methods/chapter2-methods.pro
diff --git a/examples/quick/tutorials/extending/chapter2-methods/main.cpp b/examples/qml/tutorials/extending/chapter2-methods/main.cpp
index d30628fd5a..d30628fd5a 100644
--- a/examples/quick/tutorials/extending/chapter2-methods/main.cpp
+++ b/examples/qml/tutorials/extending/chapter2-methods/main.cpp
diff --git a/examples/quick/tutorials/extending/chapter2-methods/piechart.cpp b/examples/qml/tutorials/extending/chapter2-methods/piechart.cpp
index ddcb1b3efd..ddcb1b3efd 100644
--- a/examples/quick/tutorials/extending/chapter2-methods/piechart.cpp
+++ b/examples/qml/tutorials/extending/chapter2-methods/piechart.cpp
diff --git a/examples/quick/tutorials/extending/chapter2-methods/piechart.h b/examples/qml/tutorials/extending/chapter2-methods/piechart.h
index 86750197d2..86750197d2 100644
--- a/examples/quick/tutorials/extending/chapter2-methods/piechart.h
+++ b/examples/qml/tutorials/extending/chapter2-methods/piechart.h
diff --git a/examples/quick/tutorials/extending/chapter3-bindings/app.qml b/examples/qml/tutorials/extending/chapter3-bindings/app.qml
index afb9e25c51..afb9e25c51 100644
--- a/examples/quick/tutorials/extending/chapter3-bindings/app.qml
+++ b/examples/qml/tutorials/extending/chapter3-bindings/app.qml
diff --git a/examples/quick/tutorials/extending/chapter3-bindings/chapter3-bindings.pro b/examples/qml/tutorials/extending/chapter3-bindings/chapter3-bindings.pro
index 8ed66f8b66..8ed66f8b66 100644
--- a/examples/quick/tutorials/extending/chapter3-bindings/chapter3-bindings.pro
+++ b/examples/qml/tutorials/extending/chapter3-bindings/chapter3-bindings.pro
diff --git a/examples/quick/tutorials/extending/chapter3-bindings/main.cpp b/examples/qml/tutorials/extending/chapter3-bindings/main.cpp
index d30628fd5a..d30628fd5a 100644
--- a/examples/quick/tutorials/extending/chapter3-bindings/main.cpp
+++ b/examples/qml/tutorials/extending/chapter3-bindings/main.cpp
diff --git a/examples/quick/tutorials/extending/chapter3-bindings/piechart.cpp b/examples/qml/tutorials/extending/chapter3-bindings/piechart.cpp
index a63035033f..a63035033f 100644
--- a/examples/quick/tutorials/extending/chapter3-bindings/piechart.cpp
+++ b/examples/qml/tutorials/extending/chapter3-bindings/piechart.cpp
diff --git a/examples/quick/tutorials/extending/chapter3-bindings/piechart.h b/examples/qml/tutorials/extending/chapter3-bindings/piechart.h
index 25e82d66cc..25e82d66cc 100644
--- a/examples/quick/tutorials/extending/chapter3-bindings/piechart.h
+++ b/examples/qml/tutorials/extending/chapter3-bindings/piechart.h
diff --git a/examples/quick/tutorials/extending/chapter4-customPropertyTypes/app.qml b/examples/qml/tutorials/extending/chapter4-customPropertyTypes/app.qml
index 441b7f9b82..441b7f9b82 100644
--- a/examples/quick/tutorials/extending/chapter4-customPropertyTypes/app.qml
+++ b/examples/qml/tutorials/extending/chapter4-customPropertyTypes/app.qml
diff --git a/examples/quick/tutorials/extending/chapter4-customPropertyTypes/chapter4-customPropertyTypes.pro b/examples/qml/tutorials/extending/chapter4-customPropertyTypes/chapter4-customPropertyTypes.pro
index 23eb222ea3..23eb222ea3 100644
--- a/examples/quick/tutorials/extending/chapter4-customPropertyTypes/chapter4-customPropertyTypes.pro
+++ b/examples/qml/tutorials/extending/chapter4-customPropertyTypes/chapter4-customPropertyTypes.pro
diff --git a/examples/quick/tutorials/extending/chapter4-customPropertyTypes/main.cpp b/examples/qml/tutorials/extending/chapter4-customPropertyTypes/main.cpp
index 5b6e1cf451..5b6e1cf451 100644
--- a/examples/quick/tutorials/extending/chapter4-customPropertyTypes/main.cpp
+++ b/examples/qml/tutorials/extending/chapter4-customPropertyTypes/main.cpp
diff --git a/examples/quick/tutorials/extending/chapter4-customPropertyTypes/piechart.cpp b/examples/qml/tutorials/extending/chapter4-customPropertyTypes/piechart.cpp
index c1e2996e83..c1e2996e83 100644
--- a/examples/quick/tutorials/extending/chapter4-customPropertyTypes/piechart.cpp
+++ b/examples/qml/tutorials/extending/chapter4-customPropertyTypes/piechart.cpp
diff --git a/examples/quick/tutorials/extending/chapter4-customPropertyTypes/piechart.h b/examples/qml/tutorials/extending/chapter4-customPropertyTypes/piechart.h
index 9f0ea47eb9..9f0ea47eb9 100644
--- a/examples/quick/tutorials/extending/chapter4-customPropertyTypes/piechart.h
+++ b/examples/qml/tutorials/extending/chapter4-customPropertyTypes/piechart.h
diff --git a/examples/quick/tutorials/extending/chapter4-customPropertyTypes/pieslice.cpp b/examples/qml/tutorials/extending/chapter4-customPropertyTypes/pieslice.cpp
index 2afe82048f..2afe82048f 100644
--- a/examples/quick/tutorials/extending/chapter4-customPropertyTypes/pieslice.cpp
+++ b/examples/qml/tutorials/extending/chapter4-customPropertyTypes/pieslice.cpp
diff --git a/examples/quick/tutorials/extending/chapter4-customPropertyTypes/pieslice.h b/examples/qml/tutorials/extending/chapter4-customPropertyTypes/pieslice.h
index 4eef9bb6d1..4eef9bb6d1 100644
--- a/examples/quick/tutorials/extending/chapter4-customPropertyTypes/pieslice.h
+++ b/examples/qml/tutorials/extending/chapter4-customPropertyTypes/pieslice.h
diff --git a/examples/quick/tutorials/extending/chapter5-listproperties/app.qml b/examples/qml/tutorials/extending/chapter5-listproperties/app.qml
index a57d1b833f..a57d1b833f 100644
--- a/examples/quick/tutorials/extending/chapter5-listproperties/app.qml
+++ b/examples/qml/tutorials/extending/chapter5-listproperties/app.qml
diff --git a/examples/quick/tutorials/extending/chapter5-listproperties/chapter5-listproperties.pro b/examples/qml/tutorials/extending/chapter5-listproperties/chapter5-listproperties.pro
index 23eb222ea3..23eb222ea3 100644
--- a/examples/quick/tutorials/extending/chapter5-listproperties/chapter5-listproperties.pro
+++ b/examples/qml/tutorials/extending/chapter5-listproperties/chapter5-listproperties.pro
diff --git a/examples/quick/tutorials/extending/chapter5-listproperties/main.cpp b/examples/qml/tutorials/extending/chapter5-listproperties/main.cpp
index f8826f6c31..f8826f6c31 100644
--- a/examples/quick/tutorials/extending/chapter5-listproperties/main.cpp
+++ b/examples/qml/tutorials/extending/chapter5-listproperties/main.cpp
diff --git a/examples/quick/tutorials/extending/chapter5-listproperties/piechart.cpp b/examples/qml/tutorials/extending/chapter5-listproperties/piechart.cpp
index 9fb61d9cd8..9fb61d9cd8 100644
--- a/examples/quick/tutorials/extending/chapter5-listproperties/piechart.cpp
+++ b/examples/qml/tutorials/extending/chapter5-listproperties/piechart.cpp
diff --git a/examples/quick/tutorials/extending/chapter5-listproperties/piechart.h b/examples/qml/tutorials/extending/chapter5-listproperties/piechart.h
index 55488f4900..55488f4900 100644
--- a/examples/quick/tutorials/extending/chapter5-listproperties/piechart.h
+++ b/examples/qml/tutorials/extending/chapter5-listproperties/piechart.h
diff --git a/examples/quick/tutorials/extending/chapter5-listproperties/pieslice.cpp b/examples/qml/tutorials/extending/chapter5-listproperties/pieslice.cpp
index 52b409aa22..52b409aa22 100644
--- a/examples/quick/tutorials/extending/chapter5-listproperties/pieslice.cpp
+++ b/examples/qml/tutorials/extending/chapter5-listproperties/pieslice.cpp
diff --git a/examples/quick/tutorials/extending/chapter5-listproperties/pieslice.h b/examples/qml/tutorials/extending/chapter5-listproperties/pieslice.h
index f324179481..f324179481 100644
--- a/examples/quick/tutorials/extending/chapter5-listproperties/pieslice.h
+++ b/examples/qml/tutorials/extending/chapter5-listproperties/pieslice.h
diff --git a/examples/quick/tutorials/extending/chapter6-plugins/Charts/qmldir b/examples/qml/tutorials/extending/chapter6-plugins/Charts/qmldir
index d9e8471b3c..d9e8471b3c 100644
--- a/examples/quick/tutorials/extending/chapter6-plugins/Charts/qmldir
+++ b/examples/qml/tutorials/extending/chapter6-plugins/Charts/qmldir
diff --git a/examples/quick/tutorials/extending/chapter6-plugins/app.qml b/examples/qml/tutorials/extending/chapter6-plugins/app.qml
index 417fc6651a..417fc6651a 100644
--- a/examples/quick/tutorials/extending/chapter6-plugins/app.qml
+++ b/examples/qml/tutorials/extending/chapter6-plugins/app.qml
diff --git a/examples/quick/tutorials/extending/chapter6-plugins/chapter6-plugins.pro b/examples/qml/tutorials/extending/chapter6-plugins/chapter6-plugins.pro
index 6bf44b4d15..6bf44b4d15 100644
--- a/examples/quick/tutorials/extending/chapter6-plugins/chapter6-plugins.pro
+++ b/examples/qml/tutorials/extending/chapter6-plugins/chapter6-plugins.pro
diff --git a/examples/quick/tutorials/extending/chapter6-plugins/chartsplugin.cpp b/examples/qml/tutorials/extending/chapter6-plugins/chartsplugin.cpp
index fea4c1aa85..fea4c1aa85 100644
--- a/examples/quick/tutorials/extending/chapter6-plugins/chartsplugin.cpp
+++ b/examples/qml/tutorials/extending/chapter6-plugins/chartsplugin.cpp
diff --git a/examples/quick/tutorials/extending/chapter6-plugins/chartsplugin.h b/examples/qml/tutorials/extending/chapter6-plugins/chartsplugin.h
index d768306967..d768306967 100644
--- a/examples/quick/tutorials/extending/chapter6-plugins/chartsplugin.h
+++ b/examples/qml/tutorials/extending/chapter6-plugins/chartsplugin.h
diff --git a/examples/quick/tutorials/extending/chapter6-plugins/piechart.cpp b/examples/qml/tutorials/extending/chapter6-plugins/piechart.cpp
index 295bb8961d..295bb8961d 100644
--- a/examples/quick/tutorials/extending/chapter6-plugins/piechart.cpp
+++ b/examples/qml/tutorials/extending/chapter6-plugins/piechart.cpp
diff --git a/examples/quick/tutorials/extending/chapter6-plugins/piechart.h b/examples/qml/tutorials/extending/chapter6-plugins/piechart.h
index b37bcdd411..b37bcdd411 100644
--- a/examples/quick/tutorials/extending/chapter6-plugins/piechart.h
+++ b/examples/qml/tutorials/extending/chapter6-plugins/piechart.h
diff --git a/examples/quick/tutorials/extending/chapter6-plugins/pieslice.cpp b/examples/qml/tutorials/extending/chapter6-plugins/pieslice.cpp
index 52b409aa22..52b409aa22 100644
--- a/examples/quick/tutorials/extending/chapter6-plugins/pieslice.cpp
+++ b/examples/qml/tutorials/extending/chapter6-plugins/pieslice.cpp
diff --git a/examples/quick/tutorials/extending/chapter6-plugins/pieslice.h b/examples/qml/tutorials/extending/chapter6-plugins/pieslice.h
index 0b488b4835..0b488b4835 100644
--- a/examples/quick/tutorials/extending/chapter6-plugins/pieslice.h
+++ b/examples/qml/tutorials/extending/chapter6-plugins/pieslice.h
diff --git a/examples/quick/tutorials/extending/extending.pro b/examples/qml/tutorials/extending/extending.pro
index 967473fda0..967473fda0 100644
--- a/examples/quick/tutorials/extending/extending.pro
+++ b/examples/qml/tutorials/extending/extending.pro
diff --git a/src/qml/doc/src/cppintegration/extending-tutorial.qdoc b/src/qml/doc/src/cppintegration/extending-tutorial.qdoc
index 763e72447d..d0fb03a03c 100644
--- a/src/qml/doc/src/cppintegration/extending-tutorial.qdoc
+++ b/src/qml/doc/src/cppintegration/extending-tutorial.qdoc
@@ -39,17 +39,17 @@ core QML features, including properties, signals and bindings. It also shows how
extensions can be deployed through plugins.
You can find the source code for this tutorial in \c Qt's
-examples/quick/tutorials/extending directory.
+examples/qml/tutorials/extending directory.
Tutorial chapters:
\list 1
-\li \l{quick/tutorials/extending/chapter1-basics}{Creating a New Type}
-\li \l{quick/tutorials/extending/chapter2-methods}{Connecting to C++ Methods and Signals}
-\li \l{quick/tutorials/extending/chapter3-bindings}{Property Binding}
-\li \l{quick/tutorials/extending/chapter4-customPropertyTypes}{Using Custom Property Types}
-\li \l{quick/tutorials/extending/chapter5-listproperties}{Using List Property Types}
-\li \l{quick/tutorials/extending/chapter6-plugins}{Writing an Extension Plugin}
+\li \l{tutorials/extending/chapter1-basics}{Creating a New Type}
+\li \l{tutorials/extending/chapter2-methods}{Connecting to C++ Methods and Signals}
+\li \l{tutorials/extending/chapter3-bindings}{Property Binding}
+\li \l{tutorials/extending/chapter4-customPropertyTypes}{Using Custom Property Types}
+\li \l{tutorials/extending/chapter5-listproperties}{Using List Property Types}
+\li \l{tutorials/extending/chapter6-plugins}{Writing an Extension Plugin}
\li \l{qml-extending-tutorial7.html}{In Summary}
\endlist
@@ -104,7 +104,7 @@ this new class must:
Here is our \c PieChart class, defined in \c piechart.h:
-\snippet quick/tutorials/extending/chapter1-basics/piechart.h 0
+\snippet tutorials/extending/chapter1-basics/piechart.h 0
The class inherits from QQuickPaintedItem because we want to override
QQuickPaintedItem::paint() in perform drawing operations with the QPainter API.
@@ -120,15 +120,15 @@ simply sets and returns the \c m_name and \c m_color values as appropriate, and
implements \c paint() to draw a simple pie chart. It also turns off the
QGraphicsItem::ItemHasNoContents flag to enable painting:
-\snippet quick/tutorials/extending/chapter1-basics/piechart.cpp 0
+\snippet tutorials/extending/chapter1-basics/piechart.cpp 0
\dots 0
-\snippet quick/tutorials/extending/chapter1-basics/piechart.cpp 1
+\snippet tutorials/extending/chapter1-basics/piechart.cpp 1
Now that we have defined the \c PieChart type, we will use it from QML. The \c app.qml
file creates a \c PieChart item and display the pie chart's details
using a standard QML \l Text item:
-\snippet quick/tutorials/extending/chapter1-basics/app.qml 0
+\snippet tutorials/extending/chapter1-basics/app.qml 0
Notice that although the color is specified as a string in QML, it is automatically
converted to a QColor object for the PieChart \c color property. Automatic conversions are
@@ -142,20 +142,20 @@ you don't register the type, \c app.qml won't be able to create a \c PieChart.
Here is the application \c main.cpp:
-\snippet quick/tutorials/extending/chapter1-basics/main.cpp 0
+\snippet tutorials/extending/chapter1-basics/main.cpp 0
This call to qmlRegisterType() registers the \c PieChart type as a type called "PieChart",
in a type namespace called "Charts", with a version of 1.0.
Lastly, we write a \c .pro project file that includes the files and the \c declarative library:
-\quotefile quick/tutorials/extending/chapter1-basics/chapter1-basics.pro
+\quotefile tutorials/extending/chapter1-basics/chapter1-basics.pro
Now we can build and run the application:
\image extending-tutorial-chapter1.png
-Try it yourself with the code in Qt's \c examples/quick/tutorials/extending/chapter1-basics directory.
+Try it yourself with the code in Qt's \c examples/qml/tutorials/extending/chapter1-basics directory.
*/
@@ -168,20 +168,20 @@ Suppose we want \c PieChart to have a "clearChart()" method that erases the
chart and then emits a "chartCleared" signal. Our \c app.qml would be able
to call \c clearChart() and receive \c chartCleared() signals like this:
-\snippet quick/tutorials/extending/chapter2-methods/app.qml 0
+\snippet tutorials/extending/chapter2-methods/app.qml 0
\image extending-tutorial-chapter2.png
To do this, we add a \c clearChart() method and a \c chartCleared() signal
to our C++ class:
-\snippet quick/tutorials/extending/chapter2-methods/piechart.h 0
+\snippet tutorials/extending/chapter2-methods/piechart.h 0
\dots
-\snippet quick/tutorials/extending/chapter2-methods/piechart.h 1
+\snippet tutorials/extending/chapter2-methods/piechart.h 1
\dots
-\snippet quick/tutorials/extending/chapter2-methods/piechart.h 2
+\snippet tutorials/extending/chapter2-methods/piechart.h 2
\dots
-\snippet quick/tutorials/extending/chapter2-methods/piechart.h 3
+\snippet tutorials/extending/chapter2-methods/piechart.h 3
The use of Q_INVOKABLE makes the \c clearChart() method available to the
Qt Meta-Object system, and in turn, to QML. Note that it could have
@@ -191,7 +191,7 @@ slots are also callable from QML. Both of these approaches are valid.
The \c clearChart() method simply changes the color to Qt::transparent,
repaints the chart, then emits the \c chartCleared() signal:
-\snippet quick/tutorials/extending/chapter2-methods/piechart.cpp 0
+\snippet tutorials/extending/chapter2-methods/piechart.cpp 0
Now when we run the application and click the window, the pie chart
disappears, and the application outputs:
@@ -200,7 +200,7 @@ disappears, and the application outputs:
The chart has been cleared
\endcode
-Try out the example yourself with the updated code in Qt's \c examples/quick/tutorials/extending/chapter2-methods directory.
+Try out the example yourself with the updated code in Qt's \c examples/qml/tutorials/extending/chapter2-methods directory.
*/
@@ -216,7 +216,7 @@ other types' values when property values are changed.
Let's enable property bindings for the \c color property. That means
if we have code like this:
-\snippet quick/tutorials/extending/chapter3-bindings/app.qml 0
+\snippet tutorials/extending/chapter3-bindings/app.qml 0
\image extending-tutorial-chapter3.png
@@ -231,17 +231,17 @@ It's easy to enable property binding for the \c color property.
We add a \l{Qt's Property System}{NOTIFY} feature to its Q_PROPERTY() declaration to indicate that a "colorChanged" signal
is emitted whenever the value changes.
-\snippet quick/tutorials/extending/chapter3-bindings/piechart.h 0
+\snippet tutorials/extending/chapter3-bindings/piechart.h 0
\dots
-\snippet quick/tutorials/extending/chapter3-bindings/piechart.h 1
+\snippet tutorials/extending/chapter3-bindings/piechart.h 1
\dots
-\snippet quick/tutorials/extending/chapter3-bindings/piechart.h 2
+\snippet tutorials/extending/chapter3-bindings/piechart.h 2
\dots
-\snippet quick/tutorials/extending/chapter3-bindings/piechart.h 3
+\snippet tutorials/extending/chapter3-bindings/piechart.h 3
Then, we emit this signal in \c setPieSlice():
-\snippet quick/tutorials/extending/chapter3-bindings/piechart.cpp 0
+\snippet tutorials/extending/chapter3-bindings/piechart.cpp 0
It's important for \c setColor() to check that the color value has actually changed
before emitting \c colorChanged(). This ensures the signal is not emitted unnecessarily and
@@ -299,43 +299,43 @@ For example, let's replace the use of the \c property with a type called
"PieSlice" that has a \c color property. Instead of assigning a color,
we assign an \c PieSlice value which itself contains a \c color:
-\snippet quick/tutorials/extending/chapter4-customPropertyTypes/app.qml 0
+\snippet tutorials/extending/chapter4-customPropertyTypes/app.qml 0
Like \c PieChart, this new \c PieSlice type inherits from QQuickPaintedItem and declares
its properties with Q_PROPERTY():
-\snippet quick/tutorials/extending/chapter4-customPropertyTypes/pieslice.h 0
+\snippet tutorials/extending/chapter4-customPropertyTypes/pieslice.h 0
To use it in \c PieChart, we modify the \c color property declaration
and associated method signatures:
-\snippet quick/tutorials/extending/chapter4-customPropertyTypes/piechart.h 0
+\snippet tutorials/extending/chapter4-customPropertyTypes/piechart.h 0
\dots
-\snippet quick/tutorials/extending/chapter4-customPropertyTypes/piechart.h 1
+\snippet tutorials/extending/chapter4-customPropertyTypes/piechart.h 1
\dots
-\snippet quick/tutorials/extending/chapter4-customPropertyTypes/piechart.h 2
+\snippet tutorials/extending/chapter4-customPropertyTypes/piechart.h 2
\dots
-\snippet quick/tutorials/extending/chapter4-customPropertyTypes/piechart.h 3
+\snippet tutorials/extending/chapter4-customPropertyTypes/piechart.h 3
There is one thing to be aware of when implementing \c setPieSlice(). The \c PieSlice
is a visual item, so it must be set as a child of the \c PieChart using
QQuickItem::setParentItem() so that the \c PieChart knows to paint this child
item when its contents are drawn:
-\snippet quick/tutorials/extending/chapter4-customPropertyTypes/piechart.cpp 0
+\snippet tutorials/extending/chapter4-customPropertyTypes/piechart.cpp 0
Like the \c PieChart type, the \c PieSlice type has to be registered
using qmlRegisterType() to be used from QML. As with \c PieChart, we'll add the
type to the "Charts" type namespace, version 1.0:
-\snippet quick/tutorials/extending/chapter4-customPropertyTypes/main.cpp 0
+\snippet tutorials/extending/chapter4-customPropertyTypes/main.cpp 0
\dots
-\snippet quick/tutorials/extending/chapter4-customPropertyTypes/main.cpp 1
+\snippet tutorials/extending/chapter4-customPropertyTypes/main.cpp 1
\dots
-\snippet quick/tutorials/extending/chapter4-customPropertyTypes/main.cpp 2
+\snippet tutorials/extending/chapter4-customPropertyTypes/main.cpp 2
-Try it out with the code in Qt's \c examples/quick/tutorials/extending/chapter4-customPropertyTypes directory.
+Try it out with the code in Qt's \c examples/qml/tutorials/extending/chapter4-customPropertyTypes directory.
*/
@@ -349,7 +349,7 @@ Right now, a \c PieChart can only have one \c PieSlice. Ideally a chart would
have multiple slices, with different colors and sizes. To do this, we could
have a \c slices property that accepts a list of \c PieSlice items:
-\snippet quick/tutorials/extending/chapter5-listproperties/app.qml 0
+\snippet tutorials/extending/chapter5-listproperties/app.qml 0
\image extending-tutorial-chapter5.png
@@ -360,11 +360,11 @@ function with a \c slices() function that returns a list of slices, and add
an internal \c append_slice() function (discussed below). We also use a QList to
store the internal list of slices as \c m_slices:
-\snippet quick/tutorials/extending/chapter5-listproperties/piechart.h 0
+\snippet tutorials/extending/chapter5-listproperties/piechart.h 0
\dots
-\snippet quick/tutorials/extending/chapter5-listproperties/piechart.h 1
+\snippet tutorials/extending/chapter5-listproperties/piechart.h 1
\dots
-\snippet quick/tutorials/extending/chapter5-listproperties/piechart.h 2
+\snippet tutorials/extending/chapter5-listproperties/piechart.h 2
Although the \c slices property does not have an associated \c WRITE function,
it is still modifiable because of the way QQmlListProperty works.
@@ -373,7 +373,7 @@ return a QQmlListProperty value and indicate that the internal
\c PieChart::append_slice() function is to be called whenever a request is made from QML
to add items to the list:
-\snippet quick/tutorials/extending/chapter5-listproperties/piechart.cpp 0
+\snippet tutorials/extending/chapter5-listproperties/piechart.cpp 0
The \c append_slice() function simply sets the parent item as before,
and adds the new item to the \c m_slices list. As you can see, the append function for a
@@ -384,7 +384,7 @@ The \c PieSlice class has also been modified to include \c fromAngle and \c angl
properties and to draw the slice according to these values. This is a straightforward
modification if you have read the previous pages in this tutorial, so the code is not shown here.
-The complete code can be seen in the updated \c examples/quick/tutorials/extending/chapter5-listproperties directory.
+The complete code can be seen in the updated \c examples/qml/tutorials/extending/chapter5-listproperties directory.
*/
@@ -407,22 +407,22 @@ and registers our QML types in the inherited \l{QQmlExtensionPlugin::}{registerT
Here is the \c ChartsPlugin definition in \c chartsplugin.h:
-\snippet quick/tutorials/extending/chapter6-plugins/chartsplugin.h 0
+\snippet tutorials/extending/chapter6-plugins/chartsplugin.h 0
And its implementation in \c chartsplugin.cpp:
-\snippet quick/tutorials/extending/chapter6-plugins/chartsplugin.cpp 0
+\snippet tutorials/extending/chapter6-plugins/chartsplugin.cpp 0
Then, we write a \c .pro project file that defines the project as a plugin library
and specifies with DESTDIR that library files should be built into a "lib" subdirectory:
-\quotefile quick/tutorials/extending/chapter6-plugins/chapter6-plugins.pro
+\quotefile tutorials/extending/chapter6-plugins/chapter6-plugins.pro
Finally, we add a \l{qtqml-modules-qmldir.html}{qmldir} file that is
parsed by the QML engine. In this file, we specify that a plugin named
"chapter6-plugin" (the name of the example project) can be found in the "lib" subdirectory:
-\quotefile quick/tutorials/extending/chapter6-plugins/Charts/qmldir
+\quotefile tutorials/extending/chapter6-plugins/Charts/qmldir
Now we have a plugin, and instead of having a main.cpp and an executable, we can build
the project and then load the QML file using the \l{Prototyping with qmlscene}{qmlscene tool},