From 1674eeb1b331f000a6dc651ec12b682ba5b7fd77 Mon Sep 17 00:00:00 2001
From: Michael Brasser <michael.brasser@nokia.com>
Date: Tue, 30 Jun 2009 13:29:26 +1000
Subject: Rename notifiers: topChanged -> yChanged; leftChanged -> xChanged.

---
 examples/declarative/follow/pong.qml |  2 +-
 src/declarative/fx/qfxflickable.cpp  |  4 ++--
 src/declarative/fx/qfxgridview.cpp   | 12 ++++++------
 src/declarative/fx/qfxitem.cpp       | 16 ++++++++--------
 src/declarative/fx/qfxitem.h         |  8 ++++----
 src/declarative/fx/qfxlistview.cpp   |  4 ++--
 6 files changed, 23 insertions(+), 23 deletions(-)

diff --git a/examples/declarative/follow/pong.qml b/examples/declarative/follow/pong.qml
index 93ee6a7..c101d8d 100644
--- a/examples/declarative/follow/pong.qml
+++ b/examples/declarative/follow/pong.qml
@@ -26,7 +26,7 @@ Rect {
         y: Follow { source: Ball.targetY; velocity: 200 }
 
         // Detect the ball hitting the top or bottom of the view and bounce it
-        onTopChanged: {
+        onYChanged: {
             if (y <= 0)
                 targetY = Page.height-20;
             else if (y >= Page.height-20)
diff --git a/src/declarative/fx/qfxflickable.cpp b/src/declarative/fx/qfxflickable.cpp
index bc4a5fc..3580edb 100644
--- a/src/declarative/fx/qfxflickable.cpp
+++ b/src/declarative/fx/qfxflickable.cpp
@@ -112,8 +112,8 @@ void QFxFlickablePrivate::init()
     QObject::connect(&_tl, SIGNAL(completed()), q, SLOT(movementEnding()));
     q->setAcceptedMouseButtons(Qt::LeftButton);
     q->setOptions(QSimpleCanvasItem::ChildMouseFilter | QSimpleCanvasItem::MouseEvents);
-    QObject::connect(_flick, SIGNAL(leftChanged()), q, SIGNAL(positionChanged()));
-    QObject::connect(_flick, SIGNAL(topChanged()), q, SIGNAL(positionChanged()));
+    QObject::connect(_flick, SIGNAL(xChanged()), q, SIGNAL(positionChanged()));
+    QObject::connect(_flick, SIGNAL(yChanged()), q, SIGNAL(positionChanged()));
     QObject::connect(&elasticX, SIGNAL(updated()), q, SLOT(ticked()));
     QObject::connect(&elasticY, SIGNAL(updated()), q, SLOT(ticked()));
     QObject::connect(q, SIGNAL(heightChanged()), q, SLOT(heightChange()));
diff --git a/src/declarative/fx/qfxgridview.cpp b/src/declarative/fx/qfxgridview.cpp
index a6ffbb9..11b630a 100644
--- a/src/declarative/fx/qfxgridview.cpp
+++ b/src/declarative/fx/qfxgridview.cpp
@@ -368,8 +368,8 @@ void QFxGridViewPrivate::releaseItem(FxGridItem *item)
     if (!item)
         return;
     if (trackedItem == item) {
-        QObject::disconnect(trackedItem->item, SIGNAL(topChanged()), q, SLOT(trackedPositionChanged()));
-        QObject::disconnect(trackedItem->item, SIGNAL(leftChanged()), q, SLOT(trackedPositionChanged()));
+        QObject::disconnect(trackedItem->item, SIGNAL(yChanged()), q, SLOT(trackedPositionChanged()));
+        QObject::disconnect(trackedItem->item, SIGNAL(xChanged()), q, SLOT(trackedPositionChanged()));
         trackedItem = 0;
     }
     if (model->release(item->item) == 0) {
@@ -548,15 +548,15 @@ void QFxGridViewPrivate::updateTrackedItem()
         item = highlight;
 
     if (trackedItem && item != trackedItem) {
-        QObject::disconnect(trackedItem->item, SIGNAL(topChanged()), q, SLOT(trackedPositionChanged()));
-        QObject::disconnect(trackedItem->item, SIGNAL(leftChanged()), q, SLOT(trackedPositionChanged()));
+        QObject::disconnect(trackedItem->item, SIGNAL(yChanged()), q, SLOT(trackedPositionChanged()));
+        QObject::disconnect(trackedItem->item, SIGNAL(xChanged()), q, SLOT(trackedPositionChanged()));
         trackedItem = 0;
     }
 
     if (!trackedItem && item) {
         trackedItem = item;
-        QObject::connect(trackedItem->item, SIGNAL(topChanged()), q, SLOT(trackedPositionChanged()));
-        QObject::connect(trackedItem->item, SIGNAL(leftChanged()), q, SLOT(trackedPositionChanged()));
+        QObject::connect(trackedItem->item, SIGNAL(yChanged()), q, SLOT(trackedPositionChanged()));
+        QObject::connect(trackedItem->item, SIGNAL(xChanged()), q, SLOT(trackedPositionChanged()));
         q->trackedPositionChanged();
     }
     if (trackedItem)
diff --git a/src/declarative/fx/qfxitem.cpp b/src/declarative/fx/qfxitem.cpp
index 3764e3d..5ef6106 100644
--- a/src/declarative/fx/qfxitem.cpp
+++ b/src/declarative/fx/qfxitem.cpp
@@ -199,9 +199,9 @@ void QFxContents::setItem(QFxItem *item)
     for (int i = 0; i < children.count(); ++i) {
         const QSimpleCanvasItem *child = children.at(i);
         connect(child, SIGNAL(heightChanged()), this, SLOT(calcHeight()));
-        connect(child, SIGNAL(topChanged()), this, SLOT(calcHeight()));
+        connect(child, SIGNAL(yChanged()), this, SLOT(calcHeight()));
         connect(child, SIGNAL(widthChanged()), this, SLOT(calcWidth()));
-        connect(child, SIGNAL(leftChanged()), this, SLOT(calcWidth()));
+        connect(child, SIGNAL(xChanged()), this, SLOT(calcWidth()));
     }
 
     calcHeight();
@@ -269,15 +269,15 @@ void QFxContents::setItem(QFxItem *item)
 */
 
 /*!
-    \fn void QFxItem::leftChanged()
+    \fn void QFxItem::xChanged()
 
-    This signal is emitted when the left coordinate of the item changes.
+    This signal is emitted when the x coordinate of the item changes.
 */
 
 /*!
-    \fn void QFxItem::topChanged()
+    \fn void QFxItem::yChanged()
 
-    This signal is emitted when the top coordinate of the item changes.
+    This signal is emitted when the y coordinate of the item changes.
 */
 
 /*!
@@ -1068,11 +1068,11 @@ void QFxItem::geometryChanged(const QRectF &newGeometry,
     }
 
     if (newGeometry.x() != oldGeometry.x()) 
-        emit leftChanged();
+        emit xChanged();
     if (newGeometry.width() != oldGeometry.width())
         emit widthChanged();
     if (newGeometry.y() != oldGeometry.y()) 
-        emit topChanged();
+        emit yChanged();
     if (newGeometry.height() != oldGeometry.height())
         emit heightChanged();
 
diff --git a/src/declarative/fx/qfxitem.h b/src/declarative/fx/qfxitem.h
index f0f1177..d66d24b 100644
--- a/src/declarative/fx/qfxitem.h
+++ b/src/declarative/fx/qfxitem.h
@@ -112,8 +112,8 @@ class Q_DECLARATIVE_EXPORT QFxItem : public QSimpleCanvasItem, public QmlParserS
     Q_PROPERTY(QString state READ state WRITE setState NOTIFY stateChanged)
     Q_PROPERTY(QUrl qml READ qml WRITE setQml NOTIFY qmlChanged)
     Q_PROPERTY(QFxItem *qmlItem READ qmlItem NOTIFY qmlChanged)
-    Q_PROPERTY(qreal x READ x WRITE setX NOTIFY leftChanged)
-    Q_PROPERTY(qreal y READ y WRITE setY NOTIFY topChanged)
+    Q_PROPERTY(qreal x READ x WRITE setX NOTIFY xChanged)
+    Q_PROPERTY(qreal y READ y WRITE setY NOTIFY yChanged)
     Q_PROPERTY(qreal z READ z WRITE setZ)
     Q_PROPERTY(qreal width READ width WRITE setWidth NOTIFY widthChanged)
     Q_PROPERTY(bool flipVertically READ flipVertically WRITE setFlipVertically)
@@ -212,10 +212,10 @@ public Q_SLOTS:
     void newChild(const QString &url);
 
 Q_SIGNALS:
-    void leftChanged();
+    void xChanged();
+    void yChanged();
     void widthChanged();
     void heightChanged();
-    void topChanged();
     void baselineOffsetChanged();
     void stateChanged(const QString &);
     void focusChanged();
diff --git a/src/declarative/fx/qfxlistview.cpp b/src/declarative/fx/qfxlistview.cpp
index a8c0747..889cfdd 100644
--- a/src/declarative/fx/qfxlistview.cpp
+++ b/src/declarative/fx/qfxlistview.cpp
@@ -444,7 +444,7 @@ void QFxListViewPrivate::releaseItem(FxListItem *item)
     else
         QObject::disconnect(item->item, SIGNAL(widthChanged()), q, SLOT(itemResized()));
     if (trackedItem == item) {
-        const char *notifier1 = orient == Qt::Vertical ? SIGNAL(topChanged()) : SIGNAL(leftChanged());
+        const char *notifier1 = orient == Qt::Vertical ? SIGNAL(yChanged()) : SIGNAL(xChanged());
         const char *notifier2 = orient == Qt::Vertical ? SIGNAL(heightChanged()) : SIGNAL(widthChanged());
         QObject::disconnect(trackedItem->item, notifier1, q, SLOT(trackedPositionChanged()));
         QObject::disconnect(trackedItem->item, notifier2, q, SLOT(trackedPositionChanged()));
@@ -588,7 +588,7 @@ void QFxListViewPrivate::updateTrackedItem()
     if (highlight)
         item = highlight;
 
-    const char *notifier1 = orient == Qt::Vertical ? SIGNAL(topChanged()) : SIGNAL(leftChanged());
+    const char *notifier1 = orient == Qt::Vertical ? SIGNAL(yChanged()) : SIGNAL(xChanged());
     const char *notifier2 = orient == Qt::Vertical ? SIGNAL(heightChanged()) : SIGNAL(widthChanged());
 
     if (trackedItem && item != trackedItem) {
-- 
cgit v0.12