summaryrefslogtreecommitdiffstats
path: root/doc/src/declarative
diff options
context:
space:
mode:
authorYann Bodson <yann.bodson@nokia.com>2009-08-19 06:34:44 (GMT)
committerYann Bodson <yann.bodson@nokia.com>2009-08-19 08:15:20 (GMT)
commit21e87b18698c50bcfe0800509563e71c79aae0bb (patch)
tree4567cb8a5bd3127fe98d7ce5a5042550bca48b7b /doc/src/declarative
parent51555ed45f6397fa7cdfae771ee6275733bce615 (diff)
downloadQt-21e87b18698c50bcfe0800509563e71c79aae0bb.zip
Qt-21e87b18698c50bcfe0800509563e71c79aae0bb.tar.gz
Qt-21e87b18698c50bcfe0800509563e71c79aae0bb.tar.bz2
Renaming Rect -> Rectangle
Diffstat (limited to 'doc/src/declarative')
-rw-r--r--doc/src/declarative/anchor-layout.qdoc22
-rw-r--r--doc/src/declarative/animation.qdoc4
-rw-r--r--doc/src/declarative/basictypes.qdoc8
-rw-r--r--doc/src/declarative/binding.qdoc4
-rw-r--r--doc/src/declarative/elements.qdoc2
-rw-r--r--doc/src/declarative/extending.qdoc22
-rw-r--r--doc/src/declarative/focus.qdoc18
-rw-r--r--doc/src/declarative/qmlforcpp.qdoc24
-rw-r--r--doc/src/declarative/qmlintro.qdoc10
-rw-r--r--doc/src/declarative/tutorial1.qdoc14
-rw-r--r--doc/src/declarative/tutorial2.qdoc6
-rw-r--r--doc/src/declarative/tutorial3.qdoc2
12 files changed, 68 insertions, 68 deletions
diff --git a/doc/src/declarative/anchor-layout.qdoc b/doc/src/declarative/anchor-layout.qdoc
index 9ff902ee..69e2eda 100644
--- a/doc/src/declarative/anchor-layout.qdoc
+++ b/doc/src/declarative/anchor-layout.qdoc
@@ -10,8 +10,8 @@ In additional to the more traditional Fx layouts GridLayout, HorizontalLayout, a
The Fx anchoring system allows you to define relationships between the anchor lines of different items. For example, you can write:
\code
-Rect { id: rect1; ... }
-Rect { id: rect2; anchors.left: rect1.right; ... }
+Rectangle { id: rect1; ... }
+Rectangle { id: rect2; anchors.left: rect1.right; ... }
\endcode
In this case, the left edge of \e rect2 is bound to the right edge of rect1, producing the following:
@@ -25,8 +25,8 @@ The anchoring system also allows you to specify margins and offsets. Margins spe
The following example specifies a left margin:
\code
-Rect { id: rect1; ... }
-Rect { id: rect2; anchors.left: rect1.right; anchors.leftMargin: 5; ... }
+Rectangle { id: rect1; ... }
+Rectangle { id: rect2; anchors.left: rect1.right; anchors.leftMargin: 5; ... }
\endcode
In this case, a margin of 5 pixels is reserved to the left of \e rect2, producing the following:
@@ -36,8 +36,8 @@ In this case, a margin of 5 pixels is reserved to the left of \e rect2, producin
You can specify multiple anchors. For example:
\code
-Rect { id: rect1; ... }
-Rect { id: rect2; anchors.left: rect1.right; anchors.top: rect1.bottom; ... }
+Rectangle { id: rect1; ... }
+Rectangle { id: rect2; anchors.left: rect1.right; anchors.top: rect1.bottom; ... }
\endcode
\image edge3.png
@@ -45,9 +45,9 @@ Rect { id: rect2; anchors.left: rect1.right; anchors.top: rect1.bottom; ... }
By specifying multiple horizontal or vertical anchors you can control the size of an item. For example:
\code
-Rect { id: rect1; x: 0; ... }
-Rect { id: rect2; anchors.left: rect1.right; anchors.right: rect3.left; ... }
-Rect { id: rect3; x: 150; ... }
+Rectangle { id: rect1; x: 0; ... }
+Rectangle { id: rect2; anchors.left: rect1.right; anchors.right: rect3.left; ... }
+Rectangle { id: rect3; x: 150; ... }
\endcode
\image edge4.png
@@ -58,10 +58,10 @@ For performance reasons, you can only anchor an item to its siblings and direct
\code
Item { id: group1 }
- Rect { id: rect1; ... }
+ Rectangle { id: rect1; ... }
}
Item id: group2">
- Rect { id: rect2; anchors.left: rect1.right; ... } // invalid anchor!
+ Rectangle { id: rect2; anchors.left: rect1.right; ... } // invalid anchor!
}
\endcode
diff --git a/doc/src/declarative/animation.qdoc b/doc/src/declarative/animation.qdoc
index 57881a8..eea0fc3 100644
--- a/doc/src/declarative/animation.qdoc
+++ b/doc/src/declarative/animation.qdoc
@@ -29,7 +29,7 @@ The simplest form of animation is using \l NumberAnimation
The following example creates a bouncing effect:
\code
-Rect {
+Rectangle {
id: rect
width: 120; height: 200; color: "white"
Image {
@@ -81,7 +81,7 @@ The following example shows a simple use of states. In the default state \c myre
\code
Item {
- Rect {
+ Rectangle {
id: myrect
width: 100
height: 100
diff --git a/doc/src/declarative/basictypes.qdoc b/doc/src/declarative/basictypes.qdoc
index 684fd0d..092501f 100644
--- a/doc/src/declarative/basictypes.qdoc
+++ b/doc/src/declarative/basictypes.qdoc
@@ -121,9 +121,9 @@
Setting a color looks like this:
\code
- Rect { color: "steelblue" }
- Rect { color: "#FF0000" }
- Rect { color: "#800000FF" }
+ Rectangle { color: "steelblue" }
+ Rectangle { color: "#FF0000" }
+ Rectangle { color: "#800000FF" }
\endcode
\target basicqmlpoint
@@ -275,7 +275,7 @@
Item {
children [
Item { id: child1 },
- Rect { id: child2 },
+ Rectangle { id: child2 },
Text { id: child3 }
]
}
diff --git a/doc/src/declarative/binding.qdoc b/doc/src/declarative/binding.qdoc
index e74e4b1..36a7e77 100644
--- a/doc/src/declarative/binding.qdoc
+++ b/doc/src/declarative/binding.qdoc
@@ -7,8 +7,8 @@ Data binding provides a declarative way of specifying the data associated with o
Bindings are created in Qml when an expression is assigned to a property. For example, the following produces two Rects of equal size (\c rect2 is bound to the size of \c rect1):
\code
-Rect { id: rect1; width: 100; height: 100 }
-Rect { id: rect2; width: rect1.width; height: rect1.height }
+Rectangle { id: rect1; width: 100; height: 100 }
+Rectangle { id: rect2; width: rect1.width; height: rect1.height }
\endcode
There is also a special \l Bind element, which is typically used to bind from the UI to the underlying UI model (see \l {Passing Data Between C++ and Qml} for an example of this). The bindings above could be expressed using the \l Bind element as:
diff --git a/doc/src/declarative/elements.qdoc b/doc/src/declarative/elements.qdoc
index c71ac1b..8eeacdf 100644
--- a/doc/src/declarative/elements.qdoc
+++ b/doc/src/declarative/elements.qdoc
@@ -71,7 +71,7 @@ The following table lists the Qml elements provided by the Qt Declarative module
\o
\list
\o \l Item
-\o \l Rect
+\o \l Rectangle
\o \l Image
\o \l BorderImage
\o \l Text
diff --git a/doc/src/declarative/extending.qdoc b/doc/src/declarative/extending.qdoc
index 27c473e..833a5db 100644
--- a/doc/src/declarative/extending.qdoc
+++ b/doc/src/declarative/extending.qdoc
@@ -611,11 +611,11 @@ The following example shows how to declare a new "innerColor" property that
controls the color of the inner rectangle.
\code
- Rect {
+ Rectangle {
property color innerColor: "black"
color: "red"; width: 100; height: 100
- Rect {
+ Rectangle {
anchors.centerIn: parent
width: parent.width - 10
height: parent.height - 10
@@ -655,11 +655,11 @@ alias reference syntax may become more flexibly in future releases.
Here is the property definition example rewritten to use property aliases.
\code
-Rect {
+Rectangle {
property alias innerColor: InnerRect.color
color: "red"; width: 100; height: 100
- Rect {
+ Rectangle {
id: InnerRect
anchors.centerIn: parent
width: parent.width - 10
@@ -690,11 +690,11 @@ the external rectangle's color as "red" and redefine the "color" property to
refer to the inner rectangle, like this:
\code
-Rect {
+Rectangle {
property alias color: InnerRect.color
color: "red"; width: 100; height: 100
- Rect {
+ Rectangle {
id: InnerRect
anchors.centerIn: parent
width: parent.width - 10
@@ -802,7 +802,7 @@ multiple times by an application.
\row
\o application.qml
\code
-Rect {
+Rectangle {
width: 100; height: 400;
Box { x: 0; y: 0 }
Box { x: 0; y: 150 }
@@ -811,7 +811,7 @@ Rect {
\endcode
\o Box.qml
\code
-Rect {
+Rectangle {
width: 100; height: 100;
color: "blue"
}
@@ -833,7 +833,7 @@ Rect. As the Rect type has a "color" property, this property is accessible to
users of the Box component. For example, the application.qml can be modified
to show three different colored boxes like this:
\code
-Rect {
+Rectangle {
width: 100; height: 400;
Box { x: 0; y: 0; color: "red"; }
Box { x: 0; y: 150; color: "yellow"; }
@@ -848,7 +848,7 @@ available externally. Here we add a "text" property:
\row
\o application.qml
\code
-Rect {
+Rectangle {
width: 100; height: 400;
Box { x: 0; y: 0; color: "red"; text: "stop" }
Box { x: 0; y: 150; color: "yellow"; text: "slow" }
@@ -857,7 +857,7 @@ Rect {
\endcode
\o Box.qml
\code
-Rect {
+Rectangle {
property alias text: MyText.text
width: 100; height: 100;
color: "blue"
diff --git a/doc/src/declarative/focus.qdoc b/doc/src/declarative/focus.qdoc
index 60311da..5c53483 100644
--- a/doc/src/declarative/focus.qdoc
+++ b/doc/src/declarative/focus.qdoc
@@ -23,7 +23,7 @@ If the \c {Rect} element in the following example has active focus and the \e A
Item {
KeyActions {
keyA: "print('Key A was pressed')"
- Rect {}
+ Rectangle {}
}
}
\endcode
@@ -56,7 +56,7 @@ the \c {KeyActions} element has \e {active focus} and pressing the
\table
\row
\o \code
- Rect {
+ Rectangle {
color: "lightsteelblue"; width: 240; height: 25
Text { id: MyText }
KeyActions {
@@ -81,16 +81,16 @@ reponds accordingly.
\table
\row
\o \code
-Rect {
+Rectangle {
color: "red"; width: 240; height: 55
MyWidget {}
MyWidget { y: 30; focus: true }
}
\endcode
\o \code
-Rect {
+Rectangle {
color: "red"; width: 240; height: 55
- Rect {
+ Rectangle {
color: "lightsteelblue"; width: 240; height: 25
Text { id: MyText }
KeyActions {
@@ -100,7 +100,7 @@ Rect {
keyC: "MyText.text = 'Key C was pressed'"
}
}
- Rect {
+ Rectangle {
y: 30; focus: true
color: "lightsteelblue"; width: 240; height: 25
Text { id: MyText }
@@ -147,7 +147,7 @@ result shown.
\o \code
FocusScope {
width: 240; height: 25
- Rect {
+ Rectangle {
color: "lightsteelblue"; width: 240; height: 25
Text { id: MyText }
KeyActions {
@@ -178,7 +178,7 @@ then on clicking the either one gives it focus.
\table
\row
\o \code
-Rect {
+Rectangle {
color: "red"; width: 240; height: 55
MyClickableWidget {}
MyClickableWidget { y: 30; focus: true }
@@ -217,7 +217,7 @@ print the name of the current list item.
\table
\row
\o \code
-Rect {
+Rectangle {
color: "lightsteelblue"; width: 240; height: 320
ListView {
diff --git a/doc/src/declarative/qmlforcpp.qdoc b/doc/src/declarative/qmlforcpp.qdoc
index 53af252..5838df7 100644
--- a/doc/src/declarative/qmlforcpp.qdoc
+++ b/doc/src/declarative/qmlforcpp.qdoc
@@ -29,7 +29,7 @@
\code
QmlEngine engine;
- QmlComponent redRectangle(&engine, "Rect { color: \"red\"; width: 100; height: 100 }");
+ QmlComponent redRectangle(&engine, "Rectangle { color: \"red\"; width: 100; height: 100 }");
for (int ii = 0; ii < 100; ++ii) {
QObject *rectangle = redRectangle.create();
// ... do something with the rectangle ...
@@ -127,7 +127,7 @@
added to the parent's \c children property.
\code
- Rect {
+ Rectangle {
Image {}
Text {}
}
@@ -208,14 +208,14 @@
rectangles height would be updated automatically.
\code
- Rect {
+ Rectangle {
color: "red"
width: 100
- Rect {
+ Rectangle {
color: "blue"
width: 50
height: parent.height
- Rect {
+ Rectangle {
color: "green"
width: 25
height: parent.height
@@ -283,14 +283,14 @@
example rewritten to do just that.
\code
- Rect {
+ Rectangle {
color: "red"
width: 100
- Rect {
+ Rectangle {
color: "blue"
width: 50
height: parent.height
- Rect {
+ Rectangle {
color: "green"
width: 25
height: parent.parent.height
@@ -313,15 +313,15 @@
a component. By convention, id's should start with an uppercase letter.
\code
- Rect {
+ Rectangle {
id: Root
color: "red"
width: GreenRect.width + 75
height: Root.height
- Rect {
+ Rectangle {
color: "blue"
width: GreenRect.width + 25
- Rect {
+ Rectangle {
id: GreenRect
color: "green"
width: 25
@@ -554,7 +554,7 @@
Consider the following example.
\code
- Rect {
+ Rectangle {
x: NumberAnimation { running: true; repeat; true; from: 0; to: 100; }
}
\endcode
diff --git a/doc/src/declarative/qmlintro.qdoc b/doc/src/declarative/qmlintro.qdoc
index 783d077..77aa3e2 100644
--- a/doc/src/declarative/qmlintro.qdoc
+++ b/doc/src/declarative/qmlintro.qdoc
@@ -23,7 +23,7 @@ technologies like HTML and CSS, but not required.
Qml looks like this:
\code
-Rect {
+Rectangle {
width: 200
height: 200
color: "white"
@@ -36,7 +36,7 @@ Rect {
Objects are specified by their type, followed by a pair of braces. Object
types always begin with a capital letter. In the above example, there are
-two objects, a \l Rect, and an \l Image. Between the braces, we can specify
+two objects, a \l Rectangle, and an \l Image. Between the braces, we can specify
information about the object, such as its properties.
Properties are specified as \c {property: value} (much like CSS). In the above
@@ -47,7 +47,7 @@ separated by a colon.
Properties can be specified one-per-line:
\code
-Rect {
+Rectangle {
width: 100
height: 100
}
@@ -56,7 +56,7 @@ Rect {
or you can put multiple properties on a single line:
\code
-Rect { width: 100; height: 100 }
+Rectangle { width: 100; height: 100 }
\endcode
When multiple property/value pairs are specified on a single line, they
@@ -189,7 +189,7 @@ list, you can omit the square brackets:
\code
Image {
- children: Rect {}
+ children: Rectangle {}
}
\endcode
diff --git a/doc/src/declarative/tutorial1.qdoc b/doc/src/declarative/tutorial1.qdoc
index d38dc54..d4f1095 100644
--- a/doc/src/declarative/tutorial1.qdoc
+++ b/doc/src/declarative/tutorial1.qdoc
@@ -1,4 +1,4 @@
-/*!
+/*!
\page tutorial1.html
\title Tutorial 1 - Hello World!
\target tutorial1
@@ -10,7 +10,7 @@ This first program is a simple "Hello world" example. The picture below is a scr
Here is the QML code for the application:
\code
-Rect {
+Rectangle {
id: Page
width: 480
height: 200
@@ -28,10 +28,10 @@ Rect {
\section1 Walkthrough
-\section2 Rect element
+\section2 Rectangle element
\code
-Rect {
+Rectangle {
id: Page
width: 480
height: 200
@@ -39,9 +39,9 @@ Rect {
}
\endcode
-First, we declare a root element of type \l Rect. It is one of the basic building blocks you can use to create an application in QML.
-We give it an id to be able to refer to it later. In this case, we call it \e Page. We also set the \c width, \c height and \c color properties.
-The \l Rect element contains many other properties (such as \c x and \c y), but these are left at their default values.
+First, we declare a root element of type \l Rectangle. It is one of the basic building blocks you can use to create an application in QML.
+We give it an id to be able to refer to it later. In this case, we call it \e Page. We also set the \c width, \c height and \c color properties.
+The \l Rectangle element contains many other properties (such as \c x and \c y), but these are left at their default values.
\section2 Text element
diff --git a/doc/src/declarative/tutorial2.qdoc b/doc/src/declarative/tutorial2.qdoc
index 4be0702..410d119 100644
--- a/doc/src/declarative/tutorial2.qdoc
+++ b/doc/src/declarative/tutorial2.qdoc
@@ -19,7 +19,7 @@ Item {
width: 40
height: 25
- Rect {
+ Rectangle {
anchors.fill: parent
color: CellContainer.color
}
@@ -33,7 +33,7 @@ Item {
Then, we use our \c Cell component to create the color picker in the QML code for the application:
\code
-Rect {
+Rectangle {
id: Page
width: 480
height: 200
@@ -83,7 +83,7 @@ property var color
We declare a \c color property. This property is accessible from \e outside our component, this allows us to instantiate the cells with different colors.
\code
-Rect {
+Rectangle {
anchors.fill: parent
color: CellContainer.color
}
diff --git a/doc/src/declarative/tutorial3.qdoc b/doc/src/declarative/tutorial3.qdoc
index 0f9dac2..3517f97 100644
--- a/doc/src/declarative/tutorial3.qdoc
+++ b/doc/src/declarative/tutorial3.qdoc
@@ -12,7 +12,7 @@ We want our text to jump at the bottom of the screen and become red when clicked
Here is the QML code:
\code
-Rect {
+Rectangle {
id: Page
width: 480
height: 200