diff options
author | Yann Bodson <yann.bodson@nokia.com> | 2009-08-19 06:34:44 (GMT) |
---|---|---|
committer | Yann Bodson <yann.bodson@nokia.com> | 2009-08-19 08:15:20 (GMT) |
commit | 21e87b18698c50bcfe0800509563e71c79aae0bb (patch) | |
tree | 4567cb8a5bd3127fe98d7ce5a5042550bca48b7b /src/declarative/fx | |
parent | 51555ed45f6397fa7cdfae771ee6275733bce615 (diff) | |
download | Qt-21e87b18698c50bcfe0800509563e71c79aae0bb.zip Qt-21e87b18698c50bcfe0800509563e71c79aae0bb.tar.gz Qt-21e87b18698c50bcfe0800509563e71c79aae0bb.tar.bz2 |
Renaming Rect -> Rectangle
Diffstat (limited to 'src/declarative/fx')
-rw-r--r-- | src/declarative/fx/qfxcomponentinstance.cpp | 2 | ||||
-rw-r--r-- | src/declarative/fx/qfxflickable.cpp | 2 | ||||
-rw-r--r-- | src/declarative/fx/qfxgridview.cpp | 2 | ||||
-rw-r--r-- | src/declarative/fx/qfxitem.cpp | 46 | ||||
-rw-r--r-- | src/declarative/fx/qfxmouseregion.cpp | 4 | ||||
-rw-r--r-- | src/declarative/fx/qfxpositioners.cpp | 22 | ||||
-rw-r--r-- | src/declarative/fx/qfxrect.cpp | 68 | ||||
-rw-r--r-- | src/declarative/fx/qfxvisualitemmodel.cpp | 6 |
8 files changed, 76 insertions, 76 deletions
diff --git a/src/declarative/fx/qfxcomponentinstance.cpp b/src/declarative/fx/qfxcomponentinstance.cpp index f38d170..def7a9f 100644 --- a/src/declarative/fx/qfxcomponentinstance.cpp +++ b/src/declarative/fx/qfxcomponentinstance.cpp @@ -63,7 +63,7 @@ QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,ComponentInstance,QFxComponentIn Item { Component { id: RedSquare - Rect { color: "red"; width: 10; height: 10 } + Rectangle { color: "red"; width: 10; height: 10 } } ComponentInstance { component: RedSquare } diff --git a/src/declarative/fx/qfxflickable.cpp b/src/declarative/fx/qfxflickable.cpp index 1cb8336..428815a 100644 --- a/src/declarative/fx/qfxflickable.cpp +++ b/src/declarative/fx/qfxflickable.cpp @@ -445,7 +445,7 @@ bool QFxFlickable::isAtYBeginning() const These properties are typically used to draw a scrollbar, for example: \code - Rect { + Rectangle { opacity: 0.5; anchors.right: MyListView.right-2; width: 6 y: MyListView.pageYPosition * MyListView.height height: MyListView.pageHeight * MyListView.height diff --git a/src/declarative/fx/qfxgridview.cpp b/src/declarative/fx/qfxgridview.cpp index 28f2219..b445e49 100644 --- a/src/declarative/fx/qfxgridview.cpp +++ b/src/declarative/fx/qfxgridview.cpp @@ -878,7 +878,7 @@ void QFxGridView::setHighlight(QmlComponent *highlight) \code Component { id: Highlight - Rect { + Rectangle { id: Wrapper; color: "lightsteelblue"; radius: 4; width: 320; height: 60 > y: Follow { source: Wrapper.GridView.view.current.y; spring: 3; damping: 0.2 } x: Follow { source: Wrapper.GridView.view.current.x; spring: 3; damping: 0.2 } diff --git a/src/declarative/fx/qfxitem.cpp b/src/declarative/fx/qfxitem.cpp index 4ec0a85..83b4eb5 100644 --- a/src/declarative/fx/qfxitem.cpp +++ b/src/declarative/fx/qfxitem.cpp @@ -90,7 +90,7 @@ QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Rotation,QGraphicsRotation) The following example scales the X axis of the Rect, relative to its interior point 25, 25: \qml - Rect { + Rectangle { width: 100; height: 100 color: "blue" transform: Scale { origin.x: 25; origin.y: 25; xScale: 3} @@ -123,7 +123,7 @@ QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Rotation,QGraphicsRotation) The following example rotates a Rect around its interior point 25, 25: \qml - Rect { + Rectangle { width: 100; height: 100 color: "blue" transform: Rotation { origin.x: 25; origin.y: 25; angle: 45} @@ -1026,7 +1026,7 @@ QFxItem *QFxItem::parentItem() const Item { children: [ Text {}, - Rect {} + Rectangle {} ] resources: [ Component { @@ -1230,7 +1230,7 @@ void QFxItemPrivate::transform_clear() \qml Item { Text {} - Rect {} + Rectangle {} Script {} } \endqml @@ -1240,7 +1240,7 @@ void QFxItemPrivate::transform_clear() Item { children: [ Text {}, - Rect {} + Rectangle {} ] resources: [ Script {} @@ -1339,11 +1339,11 @@ void QFxItem::setClip(bool c) \o Same \c z - later children above earlier children: \qml Item { - Rect { + Rectangle { color: "red" width: 100; height: 100 } - Rect { + Rectangle { color: "blue" x: 50; y: 50; width: 100; height: 100 } @@ -1354,12 +1354,12 @@ void QFxItem::setClip(bool c) \o Higher \c z on top: \qml Item { - Rect { + Rectangle { z: 1 color: "red" width: 100; height: 100 } - Rect { + Rectangle { color: "blue" x: 50; y: 50; width: 100; height: 100 } @@ -1370,10 +1370,10 @@ void QFxItem::setClip(bool c) \o Same \c z - children above parents: \qml Item { - Rect { + Rectangle { color: "red" width: 100; height: 100 - Rect { + Rectangle { color: "blue" x: 50; y: 50; width: 100; height: 100 } @@ -1385,10 +1385,10 @@ void QFxItem::setClip(bool c) \o Lower \c z below: \qml Item { - Rect { + Rectangle { color: "red" width: 100; height: 100 - Rect { + Rectangle { z: -1 color: "blue" x: 50; y: 50; width: 100; height: 100 @@ -1717,14 +1717,14 @@ void QFxItem::setBaselineOffset(qreal offset) \o \image declarative-rotation.png \o \qml - Rect { + Rectangle { color: "blue" width: 100; height: 100 - Rect { + Rectangle { color: "green" width: 25; height: 25 } - Rect { + Rectangle { color: "red" x: 25; y: 25; width: 50; height: 50 rotation: 30 @@ -1753,14 +1753,14 @@ void QFxItem::setBaselineOffset(qreal offset) \o \image declarative-scale.png \o \qml - Rect { + Rectangle { color: "blue" width: 100; height: 100 - Rect { + Rectangle { color: "green" width: 25; height: 25 } - Rect { + Rectangle { color: "red" x: 25; y: 25; width: 50; height: 50 scale: 1.4 @@ -1787,10 +1787,10 @@ void QFxItem::setBaselineOffset(qreal offset) \o \qml Item { - Rect { + Rectangle { color: "red" width: 100; height: 100 - Rect { + Rectangle { color: "blue" x: 50; y: 50; width: 100; height: 100 } @@ -1802,11 +1802,11 @@ void QFxItem::setBaselineOffset(qreal offset) \o \qml Item { - Rect { + Rectangle { opacity: 0.5 color: "red" width: 100; height: 100 - Rect { + Rectangle { color: "blue" x: 50; y: 50; width: 100; height: 100 } diff --git a/src/declarative/fx/qfxmouseregion.cpp b/src/declarative/fx/qfxmouseregion.cpp index 858764a..011ee43 100644 --- a/src/declarative/fx/qfxmouseregion.cpp +++ b/src/declarative/fx/qfxmouseregion.cpp @@ -126,8 +126,8 @@ void QFxDrag::setYmax(qreal m) A MouseRegion is typically used in conjunction with a visible item, where the MouseRegion effectively 'proxies' mouse handling for that - item. For example, we can put a MouseRegion in a Rect that changes - the Rect color to red when clicked: + item. For example, we can put a MouseRegion in a Rectangle that changes + the Rectangle color to red when clicked: \snippet doc/src/snippets/declarative/mouseregion.qml 0 Many MouseRegion signals pass a \l {MouseEvent}{mouse} parameter that contains diff --git a/src/declarative/fx/qfxpositioners.cpp b/src/declarative/fx/qfxpositioners.cpp index 1eb88fe..7f731cf 100644 --- a/src/declarative/fx/qfxpositioners.cpp +++ b/src/declarative/fx/qfxpositioners.cpp @@ -335,9 +335,9 @@ QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,VerticalPositioner,QFxVerticalPo \qml VerticalPositioner { spacing: 2 - Rect { color: "red"; width: 50; height: 50 } - Rect { color: "green"; width: 20; height: 50 } - Rect { color: "blue"; width: 50; height: 20 } + Rectangle { color: "red"; width: 50; height: 50 } + Rectangle { color: "green"; width: 20; height: 50 } + Rectangle { color: "blue"; width: 50; height: 20 } } \endqml \endtable @@ -519,9 +519,9 @@ QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,HorizontalPositioner,QFxHorizont \qml HorizontalPositioner { spacing: 2 - Rect { color: "red"; width: 50; height: 50 } - Rect { color: "green"; width: 20; height: 50 } - Rect { color: "blue"; width: 50; height: 20 } + Rectangle { color: "red"; width: 50; height: 50 } + Rectangle { color: "green"; width: 20; height: 50 } + Rectangle { color: "blue"; width: 50; height: 20 } } \endqml \image horizontalpositioner_example.png @@ -684,11 +684,11 @@ QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,GridPositioner,QFxGridPositioner GridPositioner { columns: 3 spacing: 2 - Rect { color: "red"; width: 50; height: 50 } - Rect { color: "green"; width: 20; height: 50 } - Rect { color: "blue"; width: 50; height: 20 } - Rect { color: "cyan"; width: 50; height: 50 } - Rect { color: "magenta"; width: 10; height: 10 } + Rectangle { color: "red"; width: 50; height: 50 } + Rectangle { color: "green"; width: 20; height: 50 } + Rectangle { color: "blue"; width: 50; height: 20 } + Rectangle { color: "cyan"; width: 50; height: 50 } + Rectangle { color: "magenta"; width: 10; height: 10 } } \endqml \endtable diff --git a/src/declarative/fx/qfxrect.cpp b/src/declarative/fx/qfxrect.cpp index 3a7e350..a9418e2 100644 --- a/src/declarative/fx/qfxrect.cpp +++ b/src/declarative/fx/qfxrect.cpp @@ -52,7 +52,7 @@ QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Gradient,QFxGradient) /*! \internal \class QFxPen - \brief The QFxPen class provides a pen used for drawing rect borders on a QFxView. + \brief The QFxPen class provides a pen used for drawing rectangle borders on a QFxView. By default, the pen is invalid and nothing is drawn. You must either set a color (then the default width is 1) or a width (then the default color is black). @@ -61,7 +61,7 @@ QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Gradient,QFxGradient) Example: \qml - Rect { border.width: 2; border.color: "red" ... } + Rectangle { border.width: 2; border.color: "red" ... } \endqml */ @@ -107,8 +107,8 @@ void QFxGradientStop::updateGradient() A gradient is defined by two or more colors, which will be blended seemlessly. The colors are specified at their position in the range 0.0 - 1.0 via the GradientStop item. For example, the following code paints a - Rect with a gradient starting with red, blending to yellow at 1/3 of the - size of the Rect, and ending with Green: + rectangle with a gradient starting with red, blending to yellow at 1/3 of the + size of the rectangle, and ending with Green: \table \row @@ -145,18 +145,18 @@ void QFxGradient::doUpdate() emit updated(); } -QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Rect,QFxRect) +QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Rectangle,QFxRect) /*! - \qmlclass Rect QFxRect - \brief The Rect item allows you to add rectangles to a scene. + \qmlclass Rectangle QFxRect + \brief The Rectangle item allows you to add rectangles to a scene. \inherits Item - A Rect is painted having a solid fill (color) and an optional border (pen). + A Rectangle is painted having a solid fill (color) and an optional border. You can also create rounded rectangles using the radius property. \qml - Rect { + Rectangle { width: 100 height: 100 color: "red" @@ -172,7 +172,7 @@ QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Rect,QFxRect) /*! \internal \class QFxRect - \brief The QFxRect class provides a rect item that you can add to a QFxView. + \brief The QFxRect class provides a rectangle item that you can add to a QFxView. */ QFxRect::QFxRect(QFxItem *parent) : QFxItem(*(new QFxRectPrivate), parent) @@ -200,14 +200,14 @@ void QFxRect::doUpdate() } /*! - \qmlproperty int Rect::border.width - \qmlproperty color Rect::border.color + \qmlproperty int Rectangle::border.width + \qmlproperty color Rectangle::border.color - The width and color used to draw the border of the rect. + The width and color used to draw the border of the rectangle. A width of 1 creates a thin line. For no line, use a width of 0 or a transparent color. - To keep the border smooth (rather than blurry), odd widths cause the rect to be painted at + To keep the border smooth (rather than blurry), odd widths cause the rectangle to be painted at a half-pixel offset; */ QFxPen *QFxRect::border() @@ -217,26 +217,26 @@ QFxPen *QFxRect::border() } /*! - \qmlproperty Gradient Rect::gradient + \qmlproperty Gradient Rectangle::gradient - The gradient to use to fill the rect. + The gradient to use to fill the rectangle. This property allows for the construction of simple vertical gradients. - Other gradients may by formed by adding rotation to the rect. + Other gradients may by formed by adding rotation to the rectangle. \table \row \o \image declarative-rect_gradient.png \o \qml - Rect { y: 0; width: 80; height: 80; color: "lightsteelblue" } - Rect { y: 100; width: 80; height: 80 + Rectangle { y: 0; width: 80; height: 80; color: "lightsteelblue" } + Rectangle { y: 100; width: 80; height: 80 gradient: Gradient { GradientStop { position: 0.0; color: "lightsteelblue" } GradientStop { position: 1.0; color: "blue" } } } - Rect { rotation: 90; x: 80; y: 200; width: 80; height: 80 + Rectangle { rotation: 90; x: 80; y: 200; width: 80; height: 80 gradient: Gradient { GradientStop { position: 0.0; color: "lightsteelblue" } GradientStop { position: 1.0; color: "blue" } @@ -271,10 +271,10 @@ void QFxRect::setGradient(QFxGradient *gradient) /*! - \qmlproperty real Rect::radius - This property holds the corner radius used to draw a rounded rect. + \qmlproperty real Rectangle::radius + This property holds the corner radius used to draw a rounded rectangle. - If radius is non-zero, the rect will be painted as a rounded rectangle, otherwise it will be + If radius is non-zero, the rectangle will be painted as a rounded rectangle, otherwise it will be painted as a normal rectangle. The same radius is used by all 4 corners; there is currently no way to specify different radii for different corners. */ @@ -296,15 +296,15 @@ void QFxRect::setRadius(qreal radius) } /*! - \qmlproperty color Rect::color - This property holds the color used to fill the rect. + \qmlproperty color Rectangle::color + This property holds the color used to fill the rectangle. \qml - // green rect using hexidecimal notation - Rect { color: "#00FF00" } + // green rectangle using hexidecimal notation + Rectangle { color: "#00FF00" } - // steelblue rect using SVG color name - Rect { color: "steelblue" } + // steelblue rectangle using SVG color name + Rectangle { color: "steelblue" } \endqml The default color is white. @@ -329,14 +329,14 @@ void QFxRect::setColor(const QColor &c) } /*! - \qmlproperty color Rect::tintColor + \qmlproperty color Rectangle::tintColor This property holds The color to tint the rectangle. - This color will be drawn over the rect's color when the rect is painted. The tint color should usually be mostly transparent, or you will not be able to see the underlying color. The below example provides a slight red tint by having the tint color be pure red which is only 1/16th opaque. + This color will be drawn over the rectangle's color when the rectangle is painted. The tint color should usually be mostly transparent, or you will not be able to see the underlying color. The below example provides a slight red tint by having the tint color be pure red which is only 1/16th opaque. \qml - Rect { x: 0; width: 80; height: 80; color: "lightsteelblue" } - Rect { x: 100; width: 80; height: 80; color: "lightsteelblue"; tintColor: "#10FF0000" } + Rectangle { x: 0; width: 80; height: 80; color: "lightsteelblue" } + Rectangle { x: 100; width: 80; height: 80; color: "lightsteelblue"; tintColor: "#10FF0000" } \endqml \image declarative-rect_tint.png @@ -553,7 +553,7 @@ void QFxRect::drawRect(QPainter &p) } /*! - \qmlproperty bool Rect::smooth + \qmlproperty bool Rectangle::smooth Set this property if you want the item to be smoothly scaled or transformed. Smooth filtering gives better visual quality, but is slower. If diff --git a/src/declarative/fx/qfxvisualitemmodel.cpp b/src/declarative/fx/qfxvisualitemmodel.cpp index fdeece9..fd2796c 100644 --- a/src/declarative/fx/qfxvisualitemmodel.cpp +++ b/src/declarative/fx/qfxvisualitemmodel.cpp @@ -139,9 +139,9 @@ public: Item { VisualItemModel { id: ItemModel - Rect { height: 30; width: 80; color: "red" } - Rect { height: 30; width: 80; color: "green" } - Rect { height: 30; width: 80; color: "blue" } + Rectangle { height: 30; width: 80; color: "red" } + Rectangle { height: 30; width: 80; color: "green" } + Rectangle { height: 30; width: 80; color: "blue" } } ListView { |