diff options
author | Martin Jones <martin.jones@nokia.com> | 2009-10-22 06:10:31 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2009-10-22 06:10:31 (GMT) |
commit | a477ea20364da0b0c363b02084adf3c5eff843b1 (patch) | |
tree | 2f32d0c74c1dc09c583f4fa50707e867a2a9c160 /src/declarative/util | |
parent | 9e9c979affd1ce76a07c6545c25d2851c7964a7c (diff) | |
download | Qt-a477ea20364da0b0c363b02084adf3c5eff843b1.zip Qt-a477ea20364da0b0c363b02084adf3c5eff843b1.tar.gz Qt-a477ea20364da0b0c363b02084adf3c5eff843b1.tar.bz2 |
change all ids in doc examples to start with lower case.
Diffstat (limited to 'src/declarative/util')
-rw-r--r-- | src/declarative/util/qmlanimation.cpp | 8 | ||||
-rw-r--r-- | src/declarative/util/qmleasefollow.cpp | 14 | ||||
-rw-r--r-- | src/declarative/util/qmllistmodel.cpp | 16 | ||||
-rw-r--r-- | src/declarative/util/qmlspringfollow.cpp | 10 | ||||
-rw-r--r-- | src/declarative/util/qmlsystempalette.cpp | 6 | ||||
-rw-r--r-- | src/declarative/util/qmltimer.cpp | 4 |
6 files changed, 29 insertions, 29 deletions
diff --git a/src/declarative/util/qmlanimation.cpp b/src/declarative/util/qmlanimation.cpp index f42aa4e..c5a7f38 100644 --- a/src/declarative/util/qmlanimation.cpp +++ b/src/declarative/util/qmlanimation.cpp @@ -179,10 +179,10 @@ QmlAbstractAnimation::QmlAbstractAnimation(QmlAbstractAnimationPrivate &dd, QObj Rectangle { width: 100; height: 100 x: NumberAnimation { - running: MyMouse.pressed + running: myMouse.pressed from: 0; to: 100 } - MouseRegion { id: MyMouse } + MouseRegion { id: myMouse } } \endcode @@ -191,8 +191,8 @@ QmlAbstractAnimation::QmlAbstractAnimation(QmlAbstractAnimationPrivate &dd, QObj or not the animation is running. \code - NumberAnimation { id: MyAnimation } - Text { text: MyAnimation.running ? "Animation is running" : "Animation is not running" } + NumberAnimation { id: myAnimation } + Text { text: myAnimation.running ? "Animation is running" : "Animation is not running" } \endcode Animations can also be started and stopped imperatively from JavaScript diff --git a/src/declarative/util/qmleasefollow.cpp b/src/declarative/util/qmleasefollow.cpp index 860c63a..f020395 100644 --- a/src/declarative/util/qmleasefollow.cpp +++ b/src/declarative/util/qmleasefollow.cpp @@ -225,21 +225,21 @@ Rectangle { color: "green" width: 60; height: 60; x: -5; y: -5; - x: EaseFollow { source: Rect1.x - 5; velocity: 200 } - y: EaseFollow { source: Rect1.y - 5; velocity: 200 } + x: EaseFollow { source: rect1.x - 5; velocity: 200 } + y: EaseFollow { source: rect1.y - 5; velocity: 200 } } Rectangle { - id: Rect1 + id: rect1 color: "red" width: 50; height: 50; } focus: true - Keys.onRightPressed: Rect1.x = Rect1.x + 100 - Keys.onLeftPressed: Rect1.x = Rect1.x - 100 - Keys.onUpPressed: Rect1.y = Rect1.y - 100 - Keys.onDownPressed: Rect1.y = Rect1.y + 100 + Keys.onRightPressed: rect1.x = rect1.x + 100 + Keys.onLeftPressed: rect1.x = rect1.x - 100 + Keys.onUpPressed: rect1.y = rect1.y - 100 + Keys.onDownPressed: rect1.y = rect1.y + 100 } \endcode diff --git a/src/declarative/util/qmllistmodel.cpp b/src/declarative/util/qmllistmodel.cpp index 4dc9bc5..7ccccec 100644 --- a/src/declarative/util/qmllistmodel.cpp +++ b/src/declarative/util/qmllistmodel.cpp @@ -82,7 +82,7 @@ static void dump(ModelNode *node, int ind); \code ListModel { - id: FruitModel + id: fruitModel ListElement { name: "Apple" cost: 2.45 @@ -104,7 +104,7 @@ static void dump(ModelNode *node, int ind); The defined model can be used in views such as ListView: \code Component { - id: FruitDelegate + id: fruitDelegate Item { width: 200; height: 50 Text { text: name } @@ -113,8 +113,8 @@ static void dump(ModelNode *node, int ind); } ListView { - model: FruitModel - delegate: FruitDelegate + model: fruitModel + delegate: fruitDelegate anchors.fill: parent } \endcode @@ -123,7 +123,7 @@ static void dump(ModelNode *node, int ind); \code ListModel { - id: FruitModel + id: fruitModel ListElement { name: "Apple" cost: 2.45 @@ -153,7 +153,7 @@ static void dump(ModelNode *node, int ind); The delegate below will list all the fruit attributes: \code Component { - id: FruitDelegate + id: fruitDelegate Item { width: 200; height: 50 Text { id: Name; text: name } @@ -176,7 +176,7 @@ static void dump(ModelNode *node, int ind); \code Component { - id: FruitDelegate + id: fruitDelegate Item { width: 200; height: 50 Text { text: name } @@ -185,7 +185,7 @@ static void dump(ModelNode *node, int ind); // Double the price when clicked. MouseRegion { anchors.fill: parent - onClicked: FruitModel.set(index, "cost", cost*2) + onClicked: fruitModel.set(index, "cost", cost*2) } } } diff --git a/src/declarative/util/qmlspringfollow.cpp b/src/declarative/util/qmlspringfollow.cpp index 2dae448..34ec976 100644 --- a/src/declarative/util/qmlspringfollow.cpp +++ b/src/declarative/util/qmlspringfollow.cpp @@ -210,10 +210,10 @@ void QmlSpringFollowPrivate::stop() \qmlclass SpringFollow QmlSpringFollow \brief The SpringFollow element allows a property to track a value. - In example below, Rect2 will follow Rect1 moving with a velocity of up to 200: + In example below, \e rect2 will follow \e rect1 moving with a velocity of up to 200: \code Rectangle { - id: Rect1 + id: rect1 width: 20; height: 20 color: "#00ff00" y: 200 //initial value @@ -229,11 +229,11 @@ void QmlSpringFollowPrivate::stop() } } Rectangle { - id: Rect2 - x: Rect1.width + id: rect2 + x: rect1.width width: 20; height: 20 color: "#ff0000" - y: SpringFollow { source: Rect1.y; velocity: 200 } + y: SpringFollow { source: rect1.y; velocity: 200 } } \endcode diff --git a/src/declarative/util/qmlsystempalette.cpp b/src/declarative/util/qmlsystempalette.cpp index 88278c3..014eca8 100644 --- a/src/declarative/util/qmlsystempalette.cpp +++ b/src/declarative/util/qmlsystempalette.cpp @@ -62,14 +62,14 @@ QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,SystemPalette,QmlSystemPalette) Example: \qml - SystemPalette { id: MyPalette; colorGroup: Qt.Active } + SystemPalette { id: myPalette; colorGroup: Qt.Active } Rectangle { width: 640; height: 480 - color: MyPalette.window + color: myPalette.window Text { anchors.fill: parent - text: "Hello!"; color: MyPalette.windowText + text: "Hello!"; color: myPalette.windowText } } \endqml diff --git a/src/declarative/util/qmltimer.cpp b/src/declarative/util/qmltimer.cpp index 3fbe15c..f1991f5 100644 --- a/src/declarative/util/qmltimer.cpp +++ b/src/declarative/util/qmltimer.cpp @@ -75,10 +75,10 @@ public: \qml Timer { interval: 500; running: true; repeat: true - onTriggered: Time.text = Date().toString() + onTriggered: time.text = Date().toString() } Text { - id: Time + id: time } \endqml |