summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2009-10-22 06:10:31 (GMT)
committerMartin Jones <martin.jones@nokia.com>2009-10-22 06:10:31 (GMT)
commita477ea20364da0b0c363b02084adf3c5eff843b1 (patch)
tree2f32d0c74c1dc09c583f4fa50707e867a2a9c160
parent9e9c979affd1ce76a07c6545c25d2851c7964a7c (diff)
downloadQt-a477ea20364da0b0c363b02084adf3c5eff843b1.zip
Qt-a477ea20364da0b0c363b02084adf3c5eff843b1.tar.gz
Qt-a477ea20364da0b0c363b02084adf3c5eff843b1.tar.bz2
change all ids in doc examples to start with lower case.
-rw-r--r--src/declarative/extra/qmldatetimeformatter.cpp4
-rw-r--r--src/declarative/extra/qmlfontloader.cpp12
-rw-r--r--src/declarative/extra/qmlnumberformatter.cpp4
-rw-r--r--src/declarative/extra/qmlxmllistmodel.cpp4
-rw-r--r--src/declarative/fx/qfxgridview.cpp4
-rw-r--r--src/declarative/fx/qfxitem.cpp6
-rw-r--r--src/declarative/fx/qfxloader.cpp10
-rw-r--r--src/declarative/qml/qmlcomponent.cpp6
-rw-r--r--src/declarative/qml/qmldom.cpp8
-rw-r--r--src/declarative/qml/qmlengine.cpp4
-rw-r--r--src/declarative/util/qmlanimation.cpp8
-rw-r--r--src/declarative/util/qmleasefollow.cpp14
-rw-r--r--src/declarative/util/qmllistmodel.cpp16
-rw-r--r--src/declarative/util/qmlspringfollow.cpp10
-rw-r--r--src/declarative/util/qmlsystempalette.cpp6
-rw-r--r--src/declarative/util/qmltimer.cpp4
16 files changed, 60 insertions, 60 deletions
diff --git a/src/declarative/extra/qmldatetimeformatter.cpp b/src/declarative/extra/qmldatetimeformatter.cpp
index 3542657..9b3d37a 100644
--- a/src/declarative/extra/qmldatetimeformatter.cpp
+++ b/src/declarative/extra/qmldatetimeformatter.cpp
@@ -75,8 +75,8 @@ public:
\brief The DateTimeFormatter allows you to control the format of a date string.
\code
- DateTimeFormatter { id: Formatter; date: System.date }
- Text { text: Formatter.dateText }
+ DateTimeFormatter { id: formatter; date: System.date }
+ Text { text: formatter.dateText }
\endcode
By default, the text properties (dateText, timeText, and dateTimeText) will return the
diff --git a/src/declarative/extra/qmlfontloader.cpp b/src/declarative/extra/qmlfontloader.cpp
index 2193b68..f9857f6 100644
--- a/src/declarative/extra/qmlfontloader.cpp
+++ b/src/declarative/extra/qmlfontloader.cpp
@@ -76,11 +76,11 @@ QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,FontLoader,QmlFontLoader)
Example:
\qml
- FontLoader { id: FixedFont; name: "Courier" }
- FontLoader { id: WebFont; source: "http://www.mysite.com/myfont.ttf" }
+ FontLoader { id: fixedFont; name: "Courier" }
+ FontLoader { id: webFont; source: "http://www.mysite.com/myfont.ttf" }
- Text { text: "Fixed-size font"; font.family: FixedFont.name }
- Text { text: "Fancy font"; font.family: WebFont.name }
+ Text { text: "Fixed-size font"; font.family: fixedFont.name }
+ Text { text: "Fancy font"; font.family: webFont.name }
\endqml
*/
QmlFontLoader::QmlFontLoader(QObject *parent)
@@ -146,8 +146,8 @@ void QmlFontLoader::setSource(const QUrl &url)
Example:
\qml
- FontLoader { id: WebFont; source: "http://www.mysite.com/myfont.ttf" }
- Text { text: "Fancy font"; font.family: WebFont.name }
+ FontLoader { id: webFont; source: "http://www.mysite.com/myfont.ttf" }
+ Text { text: "Fancy font"; font.family: webFont.name }
\endqml
*/
QString QmlFontLoader::name() const
diff --git a/src/declarative/extra/qmlnumberformatter.cpp b/src/declarative/extra/qmlnumberformatter.cpp
index e937905..5b76e45 100644
--- a/src/declarative/extra/qmlnumberformatter.cpp
+++ b/src/declarative/extra/qmlnumberformatter.cpp
@@ -72,8 +72,8 @@ public:
In the following example, the text element will display the text "1,234.57".
\code
- NumberFormatter { id: Formatter; number: 1234.5678; format: "##,##0.##" }
- Text { text: Formatter.text }
+ NumberFormatter { id: formatter; number: 1234.5678; format: "##,##0.##" }
+ Text { text: formatter.text }
\endcode
*/
diff --git a/src/declarative/extra/qmlxmllistmodel.cpp b/src/declarative/extra/qmlxmllistmodel.cpp
index fb26915..df89f56 100644
--- a/src/declarative/extra/qmlxmllistmodel.cpp
+++ b/src/declarative/extra/qmlxmllistmodel.cpp
@@ -76,7 +76,7 @@ QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,XmlListModel,QmlXmlListModel)
...
Component {
- id: Delegate
+ id: myDelegate
Text { text: title }
}
\endqml
@@ -416,7 +416,7 @@ void QmlXmlRoleList::insert(int i, QmlXmlListModelRole *role)
The following is an example of a model containing news from a Yahoo RSS feed:
\qml
XmlListModel {
- id: FeedModel
+ id: feedModel
source: "http://rss.news.yahoo.com/rss/oceania"
query: "/rss/channel/item"
XmlRole { name: "title"; query: "title/string()" }
diff --git a/src/declarative/fx/qfxgridview.cpp b/src/declarative/fx/qfxgridview.cpp
index 68fae6a..36c06a4 100644
--- a/src/declarative/fx/qfxgridview.cpp
+++ b/src/declarative/fx/qfxgridview.cpp
@@ -922,9 +922,9 @@ void QFxGridView::setHighlight(QmlComponent *highlight)
\code
Component {
- id: Highlight
+ id: myHighlight
Rectangle {
- id: Wrapper; color: "lightsteelblue"; radius: 4; width: 320; height: 60 >
+ id: wrapper; color: "lightsteelblue"; radius: 4; width: 320; height: 60 >
y: SpringFollow { source: Wrapper.GridView.view.currentItem.y; spring: 3; damping: 0.2 }
x: SpringFollow { source: Wrapper.GridView.view.currentItem.x; spring: 3; damping: 0.2 }
}
diff --git a/src/declarative/fx/qfxitem.cpp b/src/declarative/fx/qfxitem.cpp
index c346504..317a284 100644
--- a/src/declarative/fx/qfxitem.cpp
+++ b/src/declarative/fx/qfxitem.cpp
@@ -610,9 +610,9 @@ void QFxKeyNavigationAttached::keyReleased(QKeyEvent *event)
This example forwards key events to two lists:
\qml
- ListView { id: List1 ... }
- ListView { id: List2 ... }
- Keys.forwardTo: [List1, List2]
+ ListView { id: list1 ... }
+ ListView { id: list2 ... }
+ Keys.forwardTo: [list1, list2]
focus: true
\endqml
*/
diff --git a/src/declarative/fx/qfxloader.cpp b/src/declarative/fx/qfxloader.cpp
index d0c2690..d60c135 100644
--- a/src/declarative/fx/qfxloader.cpp
+++ b/src/declarative/fx/qfxloader.cpp
@@ -69,9 +69,9 @@ QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Loader,QFxLoader)
It is also an effective means of delaying the creation of a component
until it is required:
\code
- Loader { id: PageLoader }
+ Loader { id: pageLoader }
Rectangle {
- MouseRegion { anchors.fill: parent; onClicked: PageLoader.source = "Page1.qml" }
+ MouseRegion { anchors.fill: parent; onClicked: pageLoader.source = "Page1.qml" }
}
\endcode
*/
@@ -155,12 +155,12 @@ void QFxLoader::setSource(const QUrl &url)
\qml
Item {
Component {
- id: RedSquare
+ id: redSquare
Rectangle { color: "red"; width: 10; height: 10 }
}
- Loader { sourceComponent: RedSquare }
- Loader { sourceComponent: RedSquare; x: 10 }
+ Loader { sourceComponent: redSquare }
+ Loader { sourceComponent: redSquare; x: 10 }
}
\endqml
diff --git a/src/declarative/qml/qmlcomponent.cpp b/src/declarative/qml/qmlcomponent.cpp
index dc71989..0c85574 100644
--- a/src/declarative/qml/qmlcomponent.cpp
+++ b/src/declarative/qml/qmlcomponent.cpp
@@ -84,15 +84,15 @@ int statusId = qRegisterMetaType<QmlComponent::Status>("QmlComponent::Status");
\qml
Item {
Component {
- id: RedSquare
+ id: redSquare
Rectangle {
color: "red"
width: 10
height: 10
}
}
- Loader { sourceComponent: RedSquare }
- Loader { sourceComponent: RedSquare; x: 20 }
+ Loader { sourceComponent: redSquare }
+ Loader { sourceComponent: redSquare; x: 20 }
}
\endqml
diff --git a/src/declarative/qml/qmldom.cpp b/src/declarative/qml/qmldom.cpp
index ce1bb93..a0601d7 100644
--- a/src/declarative/qml/qmldom.cpp
+++ b/src/declarative/qml/qmldom.cpp
@@ -764,7 +764,7 @@ int QmlDomObject::objectTypeMinorVersion() const
For example, the object id of this object would be "MyText".
\qml
-Text { id: MyText }
+Text { id: myText }
\endqml
*/
QString QmlDomObject::objectId() const
@@ -1599,12 +1599,12 @@ QList<int> QmlDomList:: commaPositions() const
Sub-components are QmlComponents defined within a QML document. The
following example shows the definition of a sub-component with the id
- "ListDelegate".
+ "listDelegate".
\qml
Item {
Component {
- id: ListDelegate
+ id: listDelegate
Text {
text: modelData.text
}
@@ -1653,7 +1653,7 @@ QmlDomComponent &QmlDomComponent::operator=(const QmlDomComponent &other)
\qml
Item {
Component {
- id: ListDelegate
+ id: listDelegate
Text {
text: modelData.text
}
diff --git a/src/declarative/qml/qmlengine.cpp b/src/declarative/qml/qmlengine.cpp
index 9fad80b..354114a 100644
--- a/src/declarative/qml/qmlengine.cpp
+++ b/src/declarative/qml/qmlengine.cpp
@@ -747,7 +747,7 @@ QScriptValue QmlEnginePrivate::createQmlObject(QScriptContext *ctxt, QScriptEngi
\code
transform: Rotation {
- id: Rotation
+ id: rotation
origin.x: Container.width / 2;
axis: vector(0, 1, 1)
}
@@ -757,7 +757,7 @@ QScriptValue QmlEnginePrivate::createQmlObject(QScriptContext *ctxt, QScriptEngi
\code
transform: Rotation {
- id: Rotation
+ id: rotation
origin.x: Container.width / 2;
axis.x: 0; axis.y: 1; axis.z: 0
}
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