summaryrefslogtreecommitdiffstats
path: root/src/declarative/fx
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 /src/declarative/fx
parent8d9690cca4a13d4951b3d303eb57dbe4e25ce21c (diff)
downloadQt-56f67f2fdf84fe5e7660552c52b67c4e474054dd.zip
Qt-56f67f2fdf84fe5e7660552c52b67c4e474054dd.tar.gz
Qt-56f67f2fdf84fe5e7660552c52b67c4e474054dd.tar.bz2
Rename centeredIn to centerIn.
Diffstat (limited to 'src/declarative/fx')
-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
4 files changed, 31 insertions, 31 deletions
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