summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2009-07-31 01:34:36 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2009-07-31 01:34:36 (GMT)
commit56f67f2fdf84fe5e7660552c52b67c4e474054dd (patch)
tree7e1b59cd738432c8a48616621934381ddf2e298c
parent8d9690cca4a13d4951b3d303eb57dbe4e25ce21c (diff)
downloadQt-56f67f2fdf84fe5e7660552c52b67c4e474054dd.zip
Qt-56f67f2fdf84fe5e7660552c52b67c4e474054dd.tar.gz
Qt-56f67f2fdf84fe5e7660552c52b67c4e474054dd.tar.bz2
Rename centeredIn to centerIn.
-rw-r--r--demos/declarative/calculator/CalcButton.qml2
-rw-r--r--demos/declarative/flickr/content/ImageDetails.qml4
-rw-r--r--demos/declarative/flickr/content/MediaButton.qml2
-rw-r--r--demos/declarative/flickr/flickr.qml2
-rw-r--r--demos/declarative/samegame/SameGame.qml2
-rw-r--r--demos/declarative/samegame/content/BoomBlock.qml2
-rw-r--r--demos/declarative/samegame/content/Button.qml2
-rw-r--r--demos/declarative/samegame/content/Dialog.qml2
-rw-r--r--doc/src/declarative/extending.qdoc8
-rw-r--r--doc/src/declarative/qmlintro.qdoc2
-rw-r--r--examples/declarative/flowview/flickr.qml2
-rw-r--r--examples/declarative/flowview/flowview.qml2
-rw-r--r--examples/declarative/listview/content/MediaButton.qml2
-rw-r--r--examples/declarative/loader/Browser.qml4
-rw-r--r--examples/declarative/loader/Button.qml2
-rw-r--r--examples/declarative/mouseregion/mouse.qml4
-rw-r--r--examples/declarative/slideswitch/display.qml2
-rw-r--r--examples/declarative/snow/ImageBatch.qml2
-rw-r--r--examples/declarative/snow/snow.qml2
-rw-r--r--src/declarative/fx/qfxanchors.cpp48
-rw-r--r--src/declarative/fx/qfxanchors.h6
-rw-r--r--src/declarative/fx/qfxanchors_p.h6
-rw-r--r--src/declarative/fx/qfxitem.cpp2
23 files changed, 56 insertions, 56 deletions
diff --git a/demos/declarative/calculator/CalcButton.qml b/demos/declarative/calculator/CalcButton.qml
index db8ae7c..5eb7fe1 100644
--- a/demos/declarative/calculator/CalcButton.qml
+++ b/demos/declarative/calculator/CalcButton.qml
@@ -37,7 +37,7 @@ Item {
}
Text {
- anchors.centeredIn: Image
+ anchors.centerIn: Image
text: Button.operation
color: "white"
font.bold: true
diff --git a/demos/declarative/flickr/content/ImageDetails.qml b/demos/declarative/flickr/content/ImageDetails.qml
index 26bac32..2be0e4d 100644
--- a/demos/declarative/flickr/content/ImageDetails.qml
+++ b/demos/declarative/flickr/content/ImageDetails.qml
@@ -79,7 +79,7 @@ Flipable {
Rect { anchors.fill: parent; color: "black"; opacity: 0.4; pen.color: "white"; pen.width: 2 }
- Progress { anchors.centeredIn: parent; width: 200; height: 18; progress: BigImage.progress; visible: BigImage.status }
+ Progress { anchors.centerIn: parent; width: 200; height: 18; progress: BigImage.progress; visible: BigImage.status }
Flickable {
id: Flick; width: Container.width - 10; height: Container.height - 10
x: 5; y: 5; clip: true;
@@ -114,7 +114,7 @@ Flipable {
Text {
text: "Image Unavailable"
visible: BigImage.status == 'Error'
- anchors.centeredIn: parent; color: "white"; font.bold: true
+ anchors.centerIn: parent; color: "white"; font.bold: true
}
Slider {
diff --git a/demos/declarative/flickr/content/MediaButton.qml b/demos/declarative/flickr/content/MediaButton.qml
index cbe4265..2a6dbae 100644
--- a/demos/declarative/flickr/content/MediaButton.qml
+++ b/demos/declarative/flickr/content/MediaButton.qml
@@ -24,7 +24,7 @@ Item {
Text {
font.bold: true
color: "white"
- anchors.centeredIn: Image
+ anchors.centerIn: Image
text: Container.text
}
width: Image.width
diff --git a/demos/declarative/flickr/flickr.qml b/demos/declarative/flickr/flickr.qml
index eba65c0..21ac284 100644
--- a/demos/declarative/flickr/flickr.qml
+++ b/demos/declarative/flickr/flickr.qml
@@ -124,7 +124,7 @@ Item {
Image { source: "content/pics/background.png"; anchors.fill: parent }
- Loading { anchors.centeredIn: parent; visible: FeedModel.status != 0 }
+ Loading { anchors.centerIn: parent; visible: FeedModel.status != 0 }
GridView {
id: PhotoGridView; model: FeedModel; delegate: PhotoDelegate; cacheBuffer: 100
diff --git a/demos/declarative/samegame/SameGame.qml b/demos/declarative/samegame/SameGame.qml
index 9e1b1ae..cb4737a 100644
--- a/demos/declarative/samegame/SameGame.qml
+++ b/demos/declarative/samegame/SameGame.qml
@@ -22,7 +22,7 @@ Rect {
}
}
- Dialog { id: dialog; anchors.centeredIn: parent; z: 21}
+ Dialog { id: dialog; anchors.centerIn: parent; z: 21}
Button {
id: btnA; text: "New Game"; onClicked: {initBoard();}
anchors.top: gameCanvas.bottom; anchors.topMargin: 4; anchors.left: gameCanvas.left;
diff --git a/demos/declarative/samegame/content/BoomBlock.qml b/demos/declarative/samegame/content/BoomBlock.qml
index a4f4fe9..8a505da 100644
--- a/demos/declarative/samegame/content/BoomBlock.qml
+++ b/demos/declarative/samegame/content/BoomBlock.qml
@@ -26,7 +26,7 @@ Item { id:block
}
Particles { id: particles
- width:1; height:1; anchors.centeredIn: parent; opacity: 0
+ width:1; height:1; anchors.centerIn: parent; opacity: 0
lifeSpan: 700; lifeSpanDeviation: 600; count:0; streamIn: false
angle: 0; angleDeviation: 360; velocity: 100; velocityDeviation:30
source: {
diff --git a/demos/declarative/samegame/content/Button.qml b/demos/declarative/samegame/content/Button.qml
index 2f38a52..152c996 100644
--- a/demos/declarative/samegame/content/Button.qml
+++ b/demos/declarative/samegame/content/Button.qml
@@ -12,7 +12,7 @@ Rect {
}
MouseRegion { id:mr; anchors.fill: parent; onClicked: page.clicked() }
Text {
- id: txtItem; text: page.text; anchors.centeredIn: page; color: activePalette.buttonText
+ id: txtItem; text: page.text; anchors.centerIn: page; color: activePalette.buttonText
font.size: 14;
}
}
diff --git a/demos/declarative/samegame/content/Dialog.qml b/demos/declarative/samegame/content/Dialog.qml
index 6d12b48..939f66f 100644
--- a/demos/declarative/samegame/content/Dialog.qml
+++ b/demos/declarative/samegame/content/Dialog.qml
@@ -11,5 +11,5 @@ Rect {
NumberAnimation {property: "opacity"; to: 0; duration: 1500 }
}
}
- Text { anchors.centeredIn: parent; text: parent.text }
+ Text { anchors.centerIn: parent; text: parent.text }
}
diff --git a/doc/src/declarative/extending.qdoc b/doc/src/declarative/extending.qdoc
index 88abfe6..27c473e 100644
--- a/doc/src/declarative/extending.qdoc
+++ b/doc/src/declarative/extending.qdoc
@@ -616,7 +616,7 @@ controls the color of the inner rectangle.
color: "red"; width: 100; height: 100
Rect {
- anchors.centeredIn: parent
+ anchors.centerIn: parent
width: parent.width - 10
height: parent.height - 10
color: innerColor
@@ -661,7 +661,7 @@ Rect {
color: "red"; width: 100; height: 100
Rect {
id: InnerRect
- anchors.centeredIn: parent
+ anchors.centerIn: parent
width: parent.width - 10
height: parent.height - 10
color: "black"
@@ -696,7 +696,7 @@ Rect {
color: "red"; width: 100; height: 100
Rect {
id: InnerRect
- anchors.centeredIn: parent
+ anchors.centerIn: parent
width: parent.width - 10
height: parent.height - 10
color: "black"
@@ -863,7 +863,7 @@ Rect {
color: "blue"
Text {
id: MyText
- anchors.centeredIn: parent
+ anchors.centerIn: parent
}
}
\endcode
diff --git a/doc/src/declarative/qmlintro.qdoc b/doc/src/declarative/qmlintro.qdoc
index c507e75..783d077 100644
--- a/doc/src/declarative/qmlintro.qdoc
+++ b/doc/src/declarative/qmlintro.qdoc
@@ -29,7 +29,7 @@ Rect {
color: "white"
Image {
source: "pics/logo.png"
- anchors.centeredIn: parent
+ anchors.centerIn: parent
}
}
\endcode
diff --git a/examples/declarative/flowview/flickr.qml b/examples/declarative/flowview/flickr.qml
index 6c47b82..1cf0f73 100644
--- a/examples/declarative/flowview/flickr.qml
+++ b/examples/declarative/flowview/flickr.qml
@@ -35,7 +35,7 @@ Rect {
delegate:
Item { width: 90; height: 86
Rect {
- anchors.centeredIn: parent
+ anchors.centerIn: parent
width: 86; height: 86;
color: "white"; radius: 5
Image { source: imagePath; x: 5; y: 5 }
diff --git a/examples/declarative/flowview/flowview.qml b/examples/declarative/flowview/flowview.qml
index ff15d96..99f5c1e 100644
--- a/examples/declarative/flowview/flowview.qml
+++ b/examples/declarative/flowview/flowview.qml
@@ -8,7 +8,7 @@ Rect {
Rect {
id: MyPhone
transformOrigin: "Center"
- anchors.centeredIn: parent
+ anchors.centerIn: parent
width: 800
height: 480
clip: true
diff --git a/examples/declarative/listview/content/MediaButton.qml b/examples/declarative/listview/content/MediaButton.qml
index 23ae466..8fff22b 100644
--- a/examples/declarative/listview/content/MediaButton.qml
+++ b/examples/declarative/listview/content/MediaButton.qml
@@ -22,7 +22,7 @@ Item {
Text {
font.bold: true
color: "white"
- anchors.centeredIn: Image
+ anchors.centerIn: Image
text: Container.text
}
width: Image.width
diff --git a/examples/declarative/loader/Browser.qml b/examples/declarative/loader/Browser.qml
index 007b998..64df830 100644
--- a/examples/declarative/loader/Browser.qml
+++ b/examples/declarative/loader/Browser.qml
@@ -30,7 +30,7 @@ Rect {
}
Item {
width: 32; height: 32
- Image { source: "images/fileopen.png"; anchors.centeredIn: parent; visible: folders.isFolder(index)}
+ Image { source: "images/fileopen.png"; anchors.centerIn: parent; visible: folders.isFolder(index)}
}
Text {
id: NameText
@@ -90,7 +90,7 @@ Rect {
height: TitleBar.height
pen.color: activePalette.mid; color: "transparent"
MouseRegion { anchors.fill: parent; onClicked: folders.folder = up(folders.folder) }
- Image { anchors.centeredIn: parent; source: "images/up.png" }
+ Image { anchors.centerIn: parent; source: "images/up.png" }
}
Text {
diff --git a/examples/declarative/loader/Button.qml b/examples/declarative/loader/Button.qml
index 7a17601..562e04c 100644
--- a/examples/declarative/loader/Button.qml
+++ b/examples/declarative/loader/Button.qml
@@ -12,5 +12,5 @@ Rect {
radius: 4
color: "grey"
MouseRegion { anchors.fill: parent; onClicked: Container.clicked() }
- Text { id: Text; anchors.centeredIn:parent; font.size: 10; text: parent.text }
+ Text { id: Text; anchors.centerIn:parent; font.size: 10; text: parent.text }
}
diff --git a/examples/declarative/mouseregion/mouse.qml b/examples/declarative/mouseregion/mouse.qml
index 0948a32..d9db106 100644
--- a/examples/declarative/mouseregion/mouse.qml
+++ b/examples/declarative/mouseregion/mouse.qml
@@ -6,7 +6,7 @@ Rect {
Rect {
width: 50; height: 50
color: "red"
- Text { text: "Click"; anchors.centeredIn: parent }
+ Text { text: "Click"; anchors.centerIn: parent }
MouseRegion {
onPressed: { print('press (x: ' + mouse.x + ' y: ' + mouse.y + ' button: ' + (mouse.button == Qt.RightButton ? 'right' : 'left') + ' Shift: ' + (mouse.modifiers & Qt.ShiftModifier ? 'true' : 'false') + ')') }
onReleased: { print('release (x: ' + mouse.x + ' y: ' + mouse.y + ' isClick: ' + mouse.isClick + ' wasHeld: ' + mouse.wasHeld + ')') }
@@ -21,7 +21,7 @@ Rect {
Rect {
y: 100; width: 50; height: 50
color: "blue"
- Text { text: "Drag"; anchors.centeredIn: parent }
+ Text { text: "Drag"; anchors.centerIn: parent }
MouseRegion {
drag.target: parent
drag.axis: "x"
diff --git a/examples/declarative/slideswitch/display.qml b/examples/declarative/slideswitch/display.qml
index db67dab..bd9b122 100644
--- a/examples/declarative/slideswitch/display.qml
+++ b/examples/declarative/slideswitch/display.qml
@@ -5,6 +5,6 @@ Rect {
width: 150
height: 150
Switch {
- anchors.centeredIn: parent
+ anchors.centerIn: parent
}
}
diff --git a/examples/declarative/snow/ImageBatch.qml b/examples/declarative/snow/ImageBatch.qml
index 77bacab..4b52991 100644
--- a/examples/declarative/snow/ImageBatch.qml
+++ b/examples/declarative/snow/ImageBatch.qml
@@ -43,7 +43,7 @@ GridView {
Image { id: Image; source: url; preserveAspect: true; smooth: true; anchors.fill: parent;
opacity: (status == 0)?1:0; opacity: Behavior { NumberAnimation { properties: "opacity" } } }
- Loading { anchors.centeredIn: parent; visible: Image.status }
+ Loading { anchors.centerIn: parent; visible: Image.status }
states: State {
name: "selected"
diff --git a/examples/declarative/snow/snow.qml b/examples/declarative/snow/snow.qml
index aa5185f..aed426f 100644
--- a/examples/declarative/snow/snow.qml
+++ b/examples/declarative/snow/snow.qml
@@ -21,7 +21,7 @@ Rect {
property int selectedY: selectedItemRow * imageHeight
Item {
- anchors.centeredIn: parent
+ anchors.centerIn: parent
HorizontalLayout {
id: MyLayout
property real targetX: -(selectedX + imageWidth / 2)
diff --git a/src/declarative/fx/qfxanchors.cpp b/src/declarative/fx/qfxanchors.cpp
index 286a0fc..a22aeb3 100644
--- a/src/declarative/fx/qfxanchors.cpp
+++ b/src/declarative/fx/qfxanchors.cpp
@@ -137,7 +137,7 @@ QFxAnchors::~QFxAnchors()
{
Q_D(QFxAnchors);
d->remDepend(d->fill);
- d->remDepend(d->centeredIn);
+ d->remDepend(d->centerIn);
d->remDepend(d->left.item);
d->remDepend(d->right.item);
d->remDepend(d->top.item);
@@ -161,20 +161,20 @@ void QFxAnchorsPrivate::fillChanged()
setItemHeight(fill->height()-topMargin-bottomMargin);
}
-void QFxAnchorsPrivate::centeredInChanged()
+void QFxAnchorsPrivate::centerInChanged()
{
- if (!centeredIn || fill || !isItemComplete())
+ if (!centerIn || fill || !isItemComplete())
return;
- if (centeredIn == item->parentItem()) {
+ if (centerIn == item->parentItem()) {
QPointF p((item->parentItem()->width() - item->width()) / 2.,
(item->parentItem()->height() - item->height()) / 2.);
setItemPos(p);
- } else if (centeredIn->parentItem() == item->parentItem()) {
+ } else if (centerIn->parentItem() == item->parentItem()) {
- QPointF p(centeredIn->x() + (centeredIn->width() - item->width()) / 2.,
- centeredIn->y() + (centeredIn->height() - item->height()) / 2.);
+ QPointF p(centerIn->x() + (centerIn->width() - item->width()) / 2.,
+ centerIn->y() + (centerIn->height() - item->height()) / 2.);
setItemPos(p);
}
}
@@ -183,8 +183,8 @@ void QFxAnchorsPrivate::clearItem(QFxItem *item)
{
if (fill == item)
fill = 0;
- if (centeredIn == item)
- centeredIn = 0;
+ if (centerIn == item)
+ centerIn = 0;
if (left.item == item) {
left.item = 0;
usedAnchors &= ~QFxAnchors::HasLeftAnchor;
@@ -295,7 +295,7 @@ void QFxAnchorsPrivate::updateMe()
}
fillChanged();
- centeredInChanged();
+ centerInChanged();
updateHorizontalAnchors();
updateVerticalAnchors();
}
@@ -303,7 +303,7 @@ void QFxAnchorsPrivate::updateMe()
void QFxAnchorsPrivate::updateOnComplete()
{
fillChanged();
- centeredInChanged();
+ centerInChanged();
updateHorizontalAnchors();
updateVerticalAnchors();
}
@@ -311,7 +311,7 @@ void QFxAnchorsPrivate::updateOnComplete()
void QFxAnchorsPrivate::update(QFxItem *, const QRectF &newG, const QRectF &oldG)
{
fillChanged();
- centeredInChanged();
+ centerInChanged();
if (newG.x() != oldG.x() || newG.width() != oldG.width())
updateHorizontalAnchors();
@@ -352,24 +352,24 @@ void QFxAnchors::setFill(QFxItem *f)
}
/*!
- \property QFxAnchors::centeredIn
+ \property QFxAnchors::centerIn
\brief which item the item should stay centered in.
This is a convenience property. It is the same as anchoring the horizontalCenter
and verticalCenter to another item's horizontalCenter and verticalCenter.
*/
-QFxItem *QFxAnchors::centeredIn() const
+QFxItem *QFxAnchors::centerIn() const
{
Q_D(const QFxAnchors);
- return d->centeredIn;
+ return d->centerIn;
}
-void QFxAnchors::setCenteredIn(QFxItem* c)
+void QFxAnchors::setCenterIn(QFxItem* c)
{
Q_D(QFxAnchors);
if (!c) {
- d->remDepend(d->centeredIn);
- d->centeredIn = c;
+ d->remDepend(d->centerIn);
+ d->centerIn = c;
return;
}
if (c != d->item->parentItem() && c->parentItem() != d->item->parentItem()){
@@ -377,11 +377,11 @@ void QFxAnchors::setCenteredIn(QFxItem* c)
return;
}
- d->remDepend(d->centeredIn);
- d->centeredIn = c;
- d->addDepend(d->centeredIn);
+ d->remDepend(d->centerIn);
+ d->centerIn = c;
+ d->addDepend(d->centerIn);
- d->centeredInChanged();
+ d->centerInChanged();
}
bool QFxAnchorsPrivate::calcStretch(const QFxAnchorLine &edge1,
@@ -415,7 +415,7 @@ bool QFxAnchorsPrivate::calcStretch(const QFxAnchorLine &edge1,
void QFxAnchorsPrivate::updateVerticalAnchors()
{
- if (fill || centeredIn || !isItemComplete())
+ if (fill || centerIn || !isItemComplete())
return;
if (updatingVerticalAnchor < 2) {
@@ -480,7 +480,7 @@ void QFxAnchorsPrivate::updateVerticalAnchors()
void QFxAnchorsPrivate::updateHorizontalAnchors()
{
- if (fill || centeredIn || !isItemComplete())
+ if (fill || centerIn || !isItemComplete())
return;
if (updatingHorizontalAnchor < 2) {
diff --git a/src/declarative/fx/qfxanchors.h b/src/declarative/fx/qfxanchors.h
index a1f5db8..7ff4c35 100644
--- a/src/declarative/fx/qfxanchors.h
+++ b/src/declarative/fx/qfxanchors.h
@@ -72,7 +72,7 @@ class Q_DECLARATIVE_EXPORT QFxAnchors : public QObject
Q_PROPERTY(qreal bottomMargin READ bottomMargin WRITE setBottomMargin NOTIFY bottomMarginChanged)
Q_PROPERTY(qreal verticalCenterOffset READ verticalCenterOffset WRITE setVerticalCenterOffset NOTIFY verticalCenterOffsetChanged())
Q_PROPERTY(QFxItem *fill READ fill WRITE setFill)
- Q_PROPERTY(QFxItem *centeredIn READ centeredIn WRITE setCenteredIn)
+ Q_PROPERTY(QFxItem *centerIn READ centerIn WRITE setCenterIn)
public:
QFxAnchors(QObject *parent=0);
@@ -140,8 +140,8 @@ public:
QFxItem *fill() const;
void setFill(QFxItem *);
- QFxItem *centeredIn() const;
- void setCenteredIn(QFxItem *);
+ QFxItem *centerIn() const;
+ void setCenterIn(QFxItem *);
UsedAnchors usedAnchors() const;
diff --git a/src/declarative/fx/qfxanchors_p.h b/src/declarative/fx/qfxanchors_p.h
index 7ce0952..1827324 100644
--- a/src/declarative/fx/qfxanchors_p.h
+++ b/src/declarative/fx/qfxanchors_p.h
@@ -65,7 +65,7 @@ public:
QFxAnchorsPrivate()
: updatingMe(false), updatingHorizontalAnchor(0),
updatingVerticalAnchor(0), item(0), usedAnchors(0), fill(0),
- centeredIn(0), leftMargin(0), rightMargin(0), topMargin(0),
+ centerIn(0), leftMargin(0), rightMargin(0), topMargin(0),
bottomMargin(0), vCenterOffset(0), hCenterOffset(0),
componentComplete(true)
{
@@ -104,13 +104,13 @@ public:
void updateHorizontalAnchors();
void updateVerticalAnchors();
void fillChanged();
- void centeredInChanged();
+ void centerInChanged();
QFxItem *item;
QFxAnchors::UsedAnchors usedAnchors;
QFxItem *fill;
- QFxItem *centeredIn;
+ QFxItem *centerIn;
QFxAnchorLine left;
QFxAnchorLine right;
diff --git a/src/declarative/fx/qfxitem.cpp b/src/declarative/fx/qfxitem.cpp
index 46bef3c..617e479 100644
--- a/src/declarative/fx/qfxitem.cpp
+++ b/src/declarative/fx/qfxitem.cpp
@@ -1079,7 +1079,7 @@ QFxAnchorLine QFxItem::baseline() const
\qmlproperty AnchorLine Item::anchors.baseline
\qmlproperty Item Item::anchors.fill
- \qmlproperty Item Item::anchors.centeredIn
+ \qmlproperty Item Item::anchors.centerIn
\qmlproperty real Item::anchors.topMargin
\qmlproperty real Item::anchors.bottomMargin