diff options
author | Bea Lam <bea.lam@nokia.com> | 2010-02-03 00:01:13 (GMT) |
---|---|---|
committer | Bea Lam <bea.lam@nokia.com> | 2010-02-03 00:04:03 (GMT) |
commit | 17d0ed5af4922645a268b6550742fb521d459c8e (patch) | |
tree | 43f4077630bd896da88715dec894392c63ac666b /examples/declarative | |
parent | 35a211cd95e0d09ef0b547b57f01f0a9ff41da2f (diff) | |
download | Qt-17d0ed5af4922645a268b6550742fb521d459c8e.zip Qt-17d0ed5af4922645a268b6550742fb521d459c8e.tar.gz Qt-17d0ed5af4922645a268b6550742fb521d459c8e.tar.bz2 |
Disallow ids that start with uppercase letters and update docs and
examples accordingly.
Task-number: QT-2786
Diffstat (limited to 'examples/declarative')
12 files changed, 37 insertions, 37 deletions
diff --git a/examples/declarative/listview/dummydata/MyPetsModel.qml b/examples/declarative/listview/dummydata/MyPetsModel.qml index 074fc13..1ac37bb 100644 --- a/examples/declarative/listview/dummydata/MyPetsModel.qml +++ b/examples/declarative/listview/dummydata/MyPetsModel.qml @@ -1,9 +1,9 @@ import Qt 4.6 // ListModel allows free form list models to be defined and populated. -// Be sure to name the file the same as the id. + ListModel { - id: MyListElementsModel + id: petsModel ListElement { name: "Polly" type: "Parrot" diff --git a/examples/declarative/listview/dummydata/Recipes.qml b/examples/declarative/listview/dummydata/Recipes.qml index 533730f..68e94ac 100644 --- a/examples/declarative/listview/dummydata/Recipes.qml +++ b/examples/declarative/listview/dummydata/Recipes.qml @@ -1,7 +1,7 @@ import Qt 4.6 ListModel { - id: Recipes + id: recipesModel ListElement { title: "Pancakes" picture: "content/pics/pancakes.jpg" diff --git a/examples/declarative/listview/sections.qml b/examples/declarative/listview/sections.qml index 6e72ce7..877026b 100644 --- a/examples/declarative/listview/sections.qml +++ b/examples/declarative/listview/sections.qml @@ -42,7 +42,7 @@ Rectangle { } // The list ListView { - id: List + id: myList width: 200 height: parent.height model: MyPetsModel diff --git a/examples/declarative/tutorials/samegame/samegame1/Button.qml b/examples/declarative/tutorials/samegame/samegame1/Button.qml index 9792a22..85e6777 100644 --- a/examples/declarative/tutorials/samegame/samegame1/Button.qml +++ b/examples/declarative/tutorials/samegame/samegame1/Button.qml @@ -2,7 +2,7 @@ import Qt 4.6 Rectangle { - id: Container + id: container signal clicked property string text: "Button" @@ -18,10 +18,10 @@ Rectangle { GradientStop { position: 1.0; color: activePalette.button } } - MouseRegion { id: mr; anchors.fill: parent; onClicked: Container.clicked() } + MouseRegion { id: mr; anchors.fill: parent; onClicked: container.clicked() } Text { - id: txtItem; text: Container.text; anchors.centerIn: Container; color: activePalette.buttonText + id: txtItem; text: container.text; anchors.centerIn: container; color: activePalette.buttonText } } //![0] diff --git a/examples/declarative/tutorials/samegame/samegame1/samegame.qml b/examples/declarative/tutorials/samegame/samegame1/samegame.qml index fad2175..c2d3939 100644 --- a/examples/declarative/tutorials/samegame/samegame1/samegame.qml +++ b/examples/declarative/tutorials/samegame/samegame1/samegame.qml @@ -2,13 +2,13 @@ import Qt 4.6 Rectangle { - id: Screen + id: screen width: 490; height: 720 SystemPalette { id: activePalette } Item { - width: parent.width; anchors.top: parent.top; anchors.bottom: ToolBar.top + width: parent.width; anchors.top: parent.top; anchors.bottom: toolbar.top Image { id: background @@ -18,10 +18,10 @@ Rectangle { } Rectangle { - id: ToolBar + id: toolbar color: activePalette.window height: 32; width: parent.width - anchors.bottom: Screen.bottom + anchors.bottom: screen.bottom Button { id: btnA; text: "New Game"; onClicked: console.log("Implement me!"); @@ -30,7 +30,7 @@ Rectangle { } Text { - id: Score + id: score text: "Score: Who knows?"; font.bold: true anchors.right: parent.right; anchors.rightMargin: 3 anchors.verticalCenter: parent.verticalCenter diff --git a/examples/declarative/tutorials/samegame/samegame2/Button.qml b/examples/declarative/tutorials/samegame/samegame2/Button.qml index 9e515e0..63cd555 100644 --- a/examples/declarative/tutorials/samegame/samegame2/Button.qml +++ b/examples/declarative/tutorials/samegame/samegame2/Button.qml @@ -1,7 +1,7 @@ import Qt 4.6 Rectangle { - id: Container + id: container signal clicked property string text: "Button" @@ -17,9 +17,9 @@ Rectangle { GradientStop { position: 1.0; color: activePalette.button } } - MouseRegion { id: mr; anchors.fill: parent; onClicked: Container.clicked() } + MouseRegion { id: mr; anchors.fill: parent; onClicked: container.clicked() } Text { - id: txtItem; text: Container.text; anchors.centerIn: Container; color: activePalette.buttonText + id: txtItem; text: container.text; anchors.centerIn: container; color: activePalette.buttonText } } diff --git a/examples/declarative/tutorials/samegame/samegame2/samegame.qml b/examples/declarative/tutorials/samegame/samegame2/samegame.qml index e0e467a..8d837da 100644 --- a/examples/declarative/tutorials/samegame/samegame2/samegame.qml +++ b/examples/declarative/tutorials/samegame/samegame2/samegame.qml @@ -1,7 +1,7 @@ import Qt 4.6 Rectangle { - id: Screen + id: screen width: 490; height: 720 SystemPalette { id: activePalette } @@ -10,7 +10,7 @@ Rectangle { //![2] Item { - width: parent.width; anchors.top: parent.top; anchors.bottom: ToolBar.top + width: parent.width; anchors.top: parent.top; anchors.bottom: toolbar.top Image { id: background @@ -20,10 +20,10 @@ Rectangle { } Rectangle { - id: ToolBar + id: toolbar color: activePalette.window height: 32; width: parent.width - anchors.bottom: Screen.bottom + anchors.bottom: screen.bottom //![1] Button { @@ -34,7 +34,7 @@ Rectangle { //![1] Text { - id: Score + id: score text: "Score: Who knows?"; font.bold: true anchors.right: parent.right; anchors.rightMargin: 3 anchors.verticalCenter: parent.verticalCenter diff --git a/examples/declarative/tutorials/samegame/samegame3/Button.qml b/examples/declarative/tutorials/samegame/samegame3/Button.qml index 9e515e0..63cd555 100644 --- a/examples/declarative/tutorials/samegame/samegame3/Button.qml +++ b/examples/declarative/tutorials/samegame/samegame3/Button.qml @@ -1,7 +1,7 @@ import Qt 4.6 Rectangle { - id: Container + id: container signal clicked property string text: "Button" @@ -17,9 +17,9 @@ Rectangle { GradientStop { position: 1.0; color: activePalette.button } } - MouseRegion { id: mr; anchors.fill: parent; onClicked: Container.clicked() } + MouseRegion { id: mr; anchors.fill: parent; onClicked: container.clicked() } Text { - id: txtItem; text: Container.text; anchors.centerIn: Container; color: activePalette.buttonText + id: txtItem; text: container.text; anchors.centerIn: container; color: activePalette.buttonText } } diff --git a/examples/declarative/tutorials/samegame/samegame3/Dialog.qml b/examples/declarative/tutorials/samegame/samegame3/Dialog.qml index 5fe6aa0..96dc246 100644 --- a/examples/declarative/tutorials/samegame/samegame3/Dialog.qml +++ b/examples/declarative/tutorials/samegame/samegame3/Dialog.qml @@ -8,16 +8,16 @@ Rectangle { page.opacity = 0; } function show(txt) { - MyText.text = txt; + myText.text = txt; page.opacity = 1; } signal closed(); - color: "white"; border.width: 1; width: MyText.width + 20; height: 60; + color: "white"; border.width: 1; width: myText.width + 20; height: 60; opacity: 0 opacity: Behavior { NumberAnimation { duration: 1000 } } - Text { id: MyText; anchors.centerIn: parent; text: "Hello World!" } + Text { id: myText; anchors.centerIn: parent; text: "Hello World!" } MouseRegion { id: mr; anchors.fill: parent; onClicked: forceClose(); } } //![0] diff --git a/examples/declarative/tutorials/samegame/samegame3/samegame.qml b/examples/declarative/tutorials/samegame/samegame3/samegame.qml index e1eb542..8bdb428 100644 --- a/examples/declarative/tutorials/samegame/samegame3/samegame.qml +++ b/examples/declarative/tutorials/samegame/samegame3/samegame.qml @@ -2,14 +2,14 @@ import Qt 4.6 Rectangle { - id: Screen + id: screen width: 490; height: 720 SystemPalette { id: activePalette } Script { source: "samegame.js" } Item { - width: parent.width; anchors.top: parent.top; anchors.bottom: ToolBar.top + width: parent.width; anchors.top: parent.top; anchors.bottom: toolbar.top Image { id: background @@ -40,10 +40,10 @@ Rectangle { //![2] Rectangle { - id: ToolBar + id: toolbar color: activePalette.window height: 32; width: parent.width - anchors.bottom: Screen.bottom + anchors.bottom: screen.bottom Button { id: btnA; text: "New Game"; onClicked: initBoard(); @@ -52,7 +52,7 @@ Rectangle { } Text { - id: Score + id: score text: "Score: " + gameCanvas.score; font.bold: true anchors.right: parent.right; anchors.rightMargin: 3 anchors.verticalCenter: parent.verticalCenter diff --git a/examples/declarative/tutorials/samegame/samegame4/content/Button.qml b/examples/declarative/tutorials/samegame/samegame4/content/Button.qml index 9e515e0..63cd555 100644 --- a/examples/declarative/tutorials/samegame/samegame4/content/Button.qml +++ b/examples/declarative/tutorials/samegame/samegame4/content/Button.qml @@ -1,7 +1,7 @@ import Qt 4.6 Rectangle { - id: Container + id: container signal clicked property string text: "Button" @@ -17,9 +17,9 @@ Rectangle { GradientStop { position: 1.0; color: activePalette.button } } - MouseRegion { id: mr; anchors.fill: parent; onClicked: Container.clicked() } + MouseRegion { id: mr; anchors.fill: parent; onClicked: container.clicked() } Text { - id: txtItem; text: Container.text; anchors.centerIn: Container; color: activePalette.buttonText + id: txtItem; text: container.text; anchors.centerIn: container; color: activePalette.buttonText } } diff --git a/examples/declarative/tutorials/samegame/samegame4/content/Dialog.qml b/examples/declarative/tutorials/samegame/samegame4/content/Dialog.qml index 401d211..3371d53 100644 --- a/examples/declarative/tutorials/samegame/samegame4/content/Dialog.qml +++ b/examples/declarative/tutorials/samegame/samegame4/content/Dialog.qml @@ -7,15 +7,15 @@ Rectangle { page.opacity = 0; } function show(txt) { - MyText.text = txt; + myText.text = txt; page.opacity = 1; } signal closed(); - color: "white"; border.width: 1; width: MyText.width + 20; height: 60; + color: "white"; border.width: 1; width: myText.width + 20; height: 60; opacity: 0 opacity: Behavior { NumberAnimation { duration: 1000 } } - Text { id: MyText; anchors.centerIn: parent; text: "Hello World!" } + Text { id: myText; anchors.centerIn: parent; text: "Hello World!" } MouseRegion { id: mr; anchors.fill: parent; onClicked: forceClose(); } } |