summaryrefslogtreecommitdiff
path: root/examples/declarative/tutorials
diff options
context:
space:
mode:
Diffstat (limited to 'examples/declarative/tutorials')
-rw-r--r--examples/declarative/tutorials/extending/chapter4-customPropertyTypes/app.qml4
-rw-r--r--examples/declarative/tutorials/extending/chapter4-customPropertyTypes/chapter4-customPropertyTypes.pro2
-rw-r--r--examples/declarative/tutorials/extending/chapter5-listproperties/app.qml10
-rw-r--r--examples/declarative/tutorials/extending/chapter5-listproperties/chapter5-listproperties.pro2
-rw-r--r--examples/declarative/tutorials/extending/chapter5-listproperties/piechart.cpp2
-rw-r--r--examples/declarative/tutorials/extending/chapter6-plugins/app.qml10
-rw-r--r--examples/declarative/tutorials/extending/chapter6-plugins/piechart.cpp2
-rw-r--r--examples/declarative/tutorials/extending/extending.pro2
-rw-r--r--examples/declarative/tutorials/gettingStarted/core/button.qml2
-rw-r--r--examples/declarative/tutorials/gettingStarted/core/fileDialog.qml2
-rw-r--r--examples/declarative/tutorials/gettingStarted/core/fileMenu.qml2
-rw-r--r--examples/declarative/tutorials/gettingStarted/core/menuBar.qml8
-rw-r--r--examples/declarative/tutorials/gettingStarted/filedialog/directory.cpp2
-rw-r--r--examples/declarative/tutorials/gettingStarted/filedialog/directory.h2
-rw-r--r--examples/declarative/tutorials/gettingStarted/gettingStarted.qml2
-rw-r--r--examples/declarative/tutorials/gettingStarted/parts/part0/Button.qml6
-rw-r--r--examples/declarative/tutorials/gettingStarted/parts/part2/Button.qml12
-rw-r--r--examples/declarative/tutorials/gettingStarted/parts/part2/EditMenu.qml2
-rw-r--r--examples/declarative/tutorials/gettingStarted/parts/part2/FileMenu.qml6
-rw-r--r--examples/declarative/tutorials/gettingStarted/parts/part2/MenuBar.qml14
-rw-r--r--examples/declarative/tutorials/gettingStarted/parts/part3/Button.qml12
-rw-r--r--examples/declarative/tutorials/gettingStarted/parts/part3/EditMenu.qml2
-rw-r--r--examples/declarative/tutorials/gettingStarted/parts/part3/FileMenu.qml6
-rw-r--r--examples/declarative/tutorials/gettingStarted/parts/part3/MenuBar.qml14
-rw-r--r--examples/declarative/tutorials/gettingStarted/parts/part3/TextArea.qml2
-rw-r--r--examples/declarative/tutorials/gettingStarted/parts/part3/TextEditor.qml2
-rw-r--r--examples/declarative/tutorials/gettingStarted/parts/part4/Button.qml12
-rw-r--r--examples/declarative/tutorials/gettingStarted/parts/part4/EditMenu.qml2
-rw-r--r--examples/declarative/tutorials/gettingStarted/parts/part4/FileMenu.qml6
-rw-r--r--examples/declarative/tutorials/gettingStarted/parts/part4/MenuBar.qml12
-rw-r--r--examples/declarative/tutorials/gettingStarted/parts/part4/SimpleButton.qml8
-rw-r--r--examples/declarative/tutorials/gettingStarted/parts/part4/TextArea.qml4
-rw-r--r--examples/declarative/tutorials/gettingStarted/parts/part4/TextEditor.qml22
-rw-r--r--examples/declarative/tutorials/gettingStarted/parts/part5/TextEditor.qml12
-rw-r--r--examples/declarative/tutorials/gettingStarted/parts/part5/core/button.qml2
-rw-r--r--examples/declarative/tutorials/gettingStarted/parts/part5/core/fileDialog.qml2
-rw-r--r--examples/declarative/tutorials/gettingStarted/parts/part5/core/fileMenu.qml2
-rw-r--r--examples/declarative/tutorials/gettingStarted/parts/part5/core/menuBar.qml8
-rw-r--r--examples/declarative/tutorials/gettingStarted/parts/part5/filedialog/dialogPlugin.cpp6
-rw-r--r--examples/declarative/tutorials/gettingStarted/parts/part5/filedialog/dialogPlugin.h2
-rw-r--r--examples/declarative/tutorials/gettingStarted/parts/part5/filedialog/directory.cpp22
-rw-r--r--examples/declarative/tutorials/gettingStarted/parts/part5/filedialog/directory.h30
-rw-r--r--examples/declarative/tutorials/gettingStarted/parts/part5/filedialog/file.h12
-rw-r--r--examples/declarative/tutorials/gettingStarted/parts/part5/filedialog/filedialog.pro12
-rw-r--r--examples/declarative/tutorials/gettingStarted/parts/part5/qml-texteditor5.qmlproject4
-rw-r--r--examples/declarative/tutorials/samegame/samegame1/samegame.qml2
-rw-r--r--examples/declarative/tutorials/samegame/samegame3/Block.qml2
-rw-r--r--examples/declarative/tutorials/samegame/samegame3/samegame.js2
-rw-r--r--examples/declarative/tutorials/samegame/samegame4/content/BoomBlock.qml2
-rw-r--r--examples/declarative/tutorials/samegame/samegame4/content/samegame.js2
-rw-r--r--examples/declarative/tutorials/samegame/samegame4/highscores/scores.php6
51 files changed, 164 insertions, 164 deletions
diff --git a/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/app.qml b/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/app.qml
index 94883646..1328ea2c 100644
--- a/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/app.qml
+++ b/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/app.qml
@@ -49,9 +49,9 @@ Item {
anchors.centerIn: parent
width: 100; height: 100
- pieSlice: PieSlice {
+ pieSlice: PieSlice {
anchors.fill: parent
- color: "red"
+ color: "red"
}
}
diff --git a/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/chapter4-customPropertyTypes.pro b/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/chapter4-customPropertyTypes.pro
index 8152fcaf..e25eec23 100644
--- a/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/chapter4-customPropertyTypes.pro
+++ b/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/chapter4-customPropertyTypes.pro
@@ -1,7 +1,7 @@
QT += widgets declarative
HEADERS += piechart.h \
- pieslice.h
+ pieslice.h
SOURCES += piechart.cpp \
pieslice.cpp \
main.cpp
diff --git a/examples/declarative/tutorials/extending/chapter5-listproperties/app.qml b/examples/declarative/tutorials/extending/chapter5-listproperties/app.qml
index fc56a19b..0f971d9a 100644
--- a/examples/declarative/tutorials/extending/chapter5-listproperties/app.qml
+++ b/examples/declarative/tutorials/extending/chapter5-listproperties/app.qml
@@ -49,17 +49,17 @@ Item {
width: 100; height: 100
slices: [
- PieSlice {
+ PieSlice {
anchors.fill: parent
color: "red"
- fromAngle: 0; angleSpan: 110
+ fromAngle: 0; angleSpan: 110
},
- PieSlice {
+ PieSlice {
anchors.fill: parent
color: "black"
- fromAngle: 110; angleSpan: 50
+ fromAngle: 110; angleSpan: 50
},
- PieSlice {
+ PieSlice {
anchors.fill: parent
color: "blue"
fromAngle: 160; angleSpan: 100
diff --git a/examples/declarative/tutorials/extending/chapter5-listproperties/chapter5-listproperties.pro b/examples/declarative/tutorials/extending/chapter5-listproperties/chapter5-listproperties.pro
index ef45c8d3..4f34de7e 100644
--- a/examples/declarative/tutorials/extending/chapter5-listproperties/chapter5-listproperties.pro
+++ b/examples/declarative/tutorials/extending/chapter5-listproperties/chapter5-listproperties.pro
@@ -1,7 +1,7 @@
QT += widgets declarative
HEADERS += piechart.h \
- pieslice.h
+ pieslice.h
SOURCES += piechart.cpp \
pieslice.cpp \
main.cpp
diff --git a/examples/declarative/tutorials/extending/chapter5-listproperties/piechart.cpp b/examples/declarative/tutorials/extending/chapter5-listproperties/piechart.cpp
index 68dc91ef..3dff29e7 100644
--- a/examples/declarative/tutorials/extending/chapter5-listproperties/piechart.cpp
+++ b/examples/declarative/tutorials/extending/chapter5-listproperties/piechart.cpp
@@ -56,7 +56,7 @@ void PieChart::setName(const QString &name)
}
//![0]
-QDeclarativeListProperty<PieSlice> PieChart::slices()
+QDeclarativeListProperty<PieSlice> PieChart::slices()
{
return QDeclarativeListProperty<PieSlice>(this, 0, &PieChart::append_slice);
}
diff --git a/examples/declarative/tutorials/extending/chapter6-plugins/app.qml b/examples/declarative/tutorials/extending/chapter6-plugins/app.qml
index 684e416e..e72451e7 100644
--- a/examples/declarative/tutorials/extending/chapter6-plugins/app.qml
+++ b/examples/declarative/tutorials/extending/chapter6-plugins/app.qml
@@ -47,17 +47,17 @@ Item {
width: 100; height: 100
slices: [
- PieSlice {
+ PieSlice {
anchors.fill: parent
color: "red"
- fromAngle: 0; angleSpan: 110
+ fromAngle: 0; angleSpan: 110
},
- PieSlice {
+ PieSlice {
anchors.fill: parent
color: "black"
- fromAngle: 110; angleSpan: 50
+ fromAngle: 110; angleSpan: 50
},
- PieSlice {
+ PieSlice {
anchors.fill: parent
color: "blue"
fromAngle: 160; angleSpan: 100
diff --git a/examples/declarative/tutorials/extending/chapter6-plugins/piechart.cpp b/examples/declarative/tutorials/extending/chapter6-plugins/piechart.cpp
index ed611b73..b17c9955 100644
--- a/examples/declarative/tutorials/extending/chapter6-plugins/piechart.cpp
+++ b/examples/declarative/tutorials/extending/chapter6-plugins/piechart.cpp
@@ -55,7 +55,7 @@ void PieChart::setName(const QString &name)
m_name = name;
}
-QDeclarativeListProperty<PieSlice> PieChart::slices()
+QDeclarativeListProperty<PieSlice> PieChart::slices()
{
return QDeclarativeListProperty<PieSlice>(this, 0, &PieChart::append_slice);
}
diff --git a/examples/declarative/tutorials/extending/extending.pro b/examples/declarative/tutorials/extending/extending.pro
index fe9a5cc7..7f9d8d68 100644
--- a/examples/declarative/tutorials/extending/extending.pro
+++ b/examples/declarative/tutorials/extending/extending.pro
@@ -6,4 +6,4 @@ SUBDIRS += \
chapter3-bindings \
chapter4-customPropertyTypes \
chapter5-listproperties \
- chapter6-plugins
+ chapter6-plugins
diff --git a/examples/declarative/tutorials/gettingStarted/core/button.qml b/examples/declarative/tutorials/gettingStarted/core/button.qml
index aaf619b5..8f1488d1 100644
--- a/examples/declarative/tutorials/gettingStarted/core/button.qml
+++ b/examples/declarative/tutorials/gettingStarted/core/button.qml
@@ -80,7 +80,7 @@ Rectangle {
signal buttonClick()
//define the clickable area to be the whole rectangle
- MouseArea {
+ MouseArea {
id: buttonMouseArea
anchors.fill: parent //stretch the area to the parent's dimension
onClicked: buttonClick()
diff --git a/examples/declarative/tutorials/gettingStarted/core/fileDialog.qml b/examples/declarative/tutorials/gettingStarted/core/fileDialog.qml
index 9f50c73f..b4bf3e24 100644
--- a/examples/declarative/tutorials/gettingStarted/core/fileDialog.qml
+++ b/examples/declarative/tutorials/gettingStarted/core/fileDialog.qml
@@ -71,7 +71,7 @@ Rectangle {
}
Text {
height: header.height; anchors.centerIn: header
- text: "files:"
+ text: "files:"
color: "lightblue"
font.weight: Font.Light
font.italic: true
diff --git a/examples/declarative/tutorials/gettingStarted/core/fileMenu.qml b/examples/declarative/tutorials/gettingStarted/core/fileMenu.qml
index b2a34b9b..494f8acb 100644
--- a/examples/declarative/tutorials/gettingStarted/core/fileMenu.qml
+++ b/examples/declarative/tutorials/gettingStarted/core/fileMenu.qml
@@ -53,7 +53,7 @@ Rectangle {
//used to divide the screen into parts.
property real partition: 1/3
- color: "#6C646A"
+ color: "#6C646A"
gradient: Gradient {
GradientStop { position: 0.0; color: "#6C646A" }
GradientStop { position: 1.0; color: Qt.darker("#6A6D6A") }
diff --git a/examples/declarative/tutorials/gettingStarted/core/menuBar.qml b/examples/declarative/tutorials/gettingStarted/core/menuBar.qml
index 49dc0e0d..78e85080 100644
--- a/examples/declarative/tutorials/gettingStarted/core/menuBar.qml
+++ b/examples/declarative/tutorials/gettingStarted/core/menuBar.qml
@@ -67,7 +67,7 @@ Rectangle {
Text {
height: parent.height
anchors { right: labelRow.left ; verticalCenter: parent.bottom }
- text: "menu: "
+ text: "menu: "
color: "lightblue"
font { weight: Font.Light; italic: true }
smooth: true
@@ -97,13 +97,13 @@ Rectangle {
id: editButton
height: 20; width: 50
buttonColor : menuListView.currentIndex == 1? Qt.darker(editColor, 1.5) : Qt.darker(editColor, 1.9)
- scale: menuListView.currentIndex == 1? 1.25: 1
+ scale: menuListView.currentIndex == 1? 1.25: 1
label: "Edit"
radius: 1
labelSize: menuListView.currentIndex == 1? 16:12
smooth:true
//on a button click, change the list's currently selected item to EditMenu
- onButtonClick: menuListView.currentIndex = 1
+ onButtonClick: menuListView.currentIndex = 1
gradient: Gradient {
GradientStop { position: 0.0; color: editColor }
GradientStop { position: 1.0; color: "#136F6F6F" }
@@ -123,7 +123,7 @@ Rectangle {
//control the movement of the menu switching
snapMode: ListView.SnapOneItem
orientation: ListView.Horizontal
- boundsBehavior: Flickable.StopAtBounds
+ boundsBehavior: Flickable.StopAtBounds
flickDeceleration: 5000
highlightFollowsCurrentItem: true
highlightMoveDuration:240
diff --git a/examples/declarative/tutorials/gettingStarted/filedialog/directory.cpp b/examples/declarative/tutorials/gettingStarted/filedialog/directory.cpp
index 8bde1e3a..74b60a83 100644
--- a/examples/declarative/tutorials/gettingStarted/filedialog/directory.cpp
+++ b/examples/declarative/tutorials/gettingStarted/filedialog/directory.cpp
@@ -90,7 +90,7 @@ File* fileAt(QDeclarativeListProperty<File> * property, int index)
/*
Returns the number of files in the list
*/
-int filesSize(QDeclarativeListProperty<File> * property)
+int filesSize(QDeclarativeListProperty<File> * property)
{
return static_cast< QList<File *> *>(property->data)->size();
}
diff --git a/examples/declarative/tutorials/gettingStarted/filedialog/directory.h b/examples/declarative/tutorials/gettingStarted/filedialog/directory.h
index a39ca3b3..fe8924a0 100644
--- a/examples/declarative/tutorials/gettingStarted/filedialog/directory.h
+++ b/examples/declarative/tutorials/gettingStarted/filedialog/directory.h
@@ -100,7 +100,7 @@ class Directory : public QObject {
//Registered to QML in a plugin. Accessible from QML as a property of Directory
QList<File *> m_fileList;
- //refresh content of the directory
+ //refresh content of the directory
void refresh();
};
diff --git a/examples/declarative/tutorials/gettingStarted/gettingStarted.qml b/examples/declarative/tutorials/gettingStarted/gettingStarted.qml
index fae37148..64f5fa84 100644
--- a/examples/declarative/tutorials/gettingStarted/gettingStarted.qml
+++ b/examples/declarative/tutorials/gettingStarted/gettingStarted.qml
@@ -107,7 +107,7 @@ Rectangle {
PropertyChanges { target: menuBar; y: 0}
PropertyChanges { target: textArea; y: partition + drawer.height}
PropertyChanges { target: drawer; y: partition}
- PropertyChanges { target: arrowIcon; rotation: 180}
+ PropertyChanges { target: arrowIcon; rotation: 180}
},
State {
name: "DRAWER_CLOSED"
diff --git a/examples/declarative/tutorials/gettingStarted/parts/part0/Button.qml b/examples/declarative/tutorials/gettingStarted/parts/part0/Button.qml
index b7eed442..8ab8598a 100644
--- a/examples/declarative/tutorials/gettingStarted/parts/part0/Button.qml
+++ b/examples/declarative/tutorials/gettingStarted/parts/part0/Button.qml
@@ -43,13 +43,13 @@ import QtQuick 1.0
Rectangle {
id: simplebutton
- color: "grey"
+ color: "grey"
width: 150; height: 75
-
+
Text{
id: buttonLabel
anchors.centerIn: parent
- text: "button label"
+ text: "button label"
}
}
//! [document]
diff --git a/examples/declarative/tutorials/gettingStarted/parts/part2/Button.qml b/examples/declarative/tutorials/gettingStarted/parts/part2/Button.qml
index 78b38aee..e39814ed 100644
--- a/examples/declarative/tutorials/gettingStarted/parts/part2/Button.qml
+++ b/examples/declarative/tutorials/gettingStarted/parts/part2/Button.qml
@@ -50,20 +50,20 @@ Rectangle {
//these properties act as constants, useable outside this QML file
property int buttonHeight: 75
property int buttonWidth: 150
-
+
//the color highlight when the mouse hovers on the rectangle
property color onHoverColor: "gold"
property color borderColor: "white"
//buttonColor is set to the button's main color
- property color buttonColor: "lightblue"
+ property color buttonColor: "lightblue"
//set appearance properties
radius:10
smooth: true
border{color: "white"; width: 3}
width: buttonWidth; height: buttonHeight
-
+
Text{
id: buttonLabel
anchors.centerIn: parent
@@ -77,11 +77,11 @@ Rectangle {
}
//define the clickable area to be the whole rectangle
- MouseArea{
+ MouseArea{
id: buttonMouseArea
anchors.fill: parent //stretch the area to the parent's dimension
onClicked: buttonClick()
-
+
//if true, then onEntered and onExited called if mouse hovers in the mouse area
//if false, a button must be clicked to detect the mouse hover
hoverEnabled: true
@@ -90,7 +90,7 @@ Rectangle {
onEntered: parent.border.color = onHoverColor
//remove the border if the mouse exits the button mouse area
onExited: parent.border.color = borderColor
-
+
}
//change the color of the button when pressed
diff --git a/examples/declarative/tutorials/gettingStarted/parts/part2/EditMenu.qml b/examples/declarative/tutorials/gettingStarted/parts/part2/EditMenu.qml
index 5e825755..a753edd3 100644
--- a/examples/declarative/tutorials/gettingStarted/parts/part2/EditMenu.qml
+++ b/examples/declarative/tutorials/gettingStarted/parts/part2/EditMenu.qml
@@ -60,7 +60,7 @@ Rectangle {
buttonColor: "lightgrey"
label: "Cut"
}
-
+
Button{
buttonColor: "grey"
id: saveButton
diff --git a/examples/declarative/tutorials/gettingStarted/parts/part2/FileMenu.qml b/examples/declarative/tutorials/gettingStarted/parts/part2/FileMenu.qml
index d53e1f3d..46537a1e 100644
--- a/examples/declarative/tutorials/gettingStarted/parts/part2/FileMenu.qml
+++ b/examples/declarative/tutorials/gettingStarted/parts/part2/FileMenu.qml
@@ -49,9 +49,9 @@ Rectangle {
//generous amount of screen space that will allow the buttons to fit
height: 480; width:1000
- color: "#6C646A"
+ color: "#6C646A"
- //a sub-rectangle allows the flexibility of setting the row area
+ //a sub-rectangle allows the flexibility of setting the row area
Rectangle{
id:actionContainer
@@ -70,7 +70,7 @@ Rectangle {
buttonColor: "lightgrey"
label: "Load"
}
-
+
Button{
buttonColor: "grey"
id: saveButton
diff --git a/examples/declarative/tutorials/gettingStarted/parts/part2/MenuBar.qml b/examples/declarative/tutorials/gettingStarted/parts/part2/MenuBar.qml
index d2131eeb..e2617651 100644
--- a/examples/declarative/tutorials/gettingStarted/parts/part2/MenuBar.qml
+++ b/examples/declarative/tutorials/gettingStarted/parts/part2/MenuBar.qml
@@ -50,12 +50,12 @@ Rectangle {
//container for the header and the buttons
Rectangle{
-
+
id: labelList
height:parent.height/10
width: parent.width
color: "steelblue"
-
+
//default z is 0, items with higher z values are shown on top of items with lower z values
z: 1
@@ -82,16 +82,16 @@ Rectangle {
width: 50
id: editButton
buttonColor : menuListView.currentIndex == 1? editColor : Qt.darker(editColor, 1.5)
- scale: menuListView.currentIndex == 1? 1.25: 1
+ scale: menuListView.currentIndex == 1? 1.25: 1
label: "Edit"
radius: 1
//on a button click, change the list's currently selected item to EditMenu
onButtonClick: {
- menuListView.currentIndex = 1
+ menuListView.currentIndex = 1
}
-
+
}
@@ -111,7 +111,7 @@ Rectangle {
color: editColor
width: menuListView.width
height: menuBar.height
-
+
}
}
@@ -129,7 +129,7 @@ Rectangle {
//control the movement of the menu switching
snapMode: ListView.SnapOneItem
orientation: ListView.Horizontal
- boundsBehavior: Flickable.StopAtBounds
+ boundsBehavior: Flickable.StopAtBounds
flickDeceleration: 5000
highlightFollowsCurrentItem: true
highlightMoveDuration:240
diff --git a/examples/declarative/tutorials/gettingStarted/parts/part3/Button.qml b/examples/declarative/tutorials/gettingStarted/parts/part3/Button.qml
index 78b38aee..e39814ed 100644
--- a/examples/declarative/tutorials/gettingStarted/parts/part3/Button.qml
+++ b/examples/declarative/tutorials/gettingStarted/parts/part3/Button.qml
@@ -50,20 +50,20 @@ Rectangle {
//these properties act as constants, useable outside this QML file
property int buttonHeight: 75
property int buttonWidth: 150
-
+
//the color highlight when the mouse hovers on the rectangle
property color onHoverColor: "gold"
property color borderColor: "white"
//buttonColor is set to the button's main color
- property color buttonColor: "lightblue"
+ property color buttonColor: "lightblue"
//set appearance properties
radius:10
smooth: true
border{color: "white"; width: 3}
width: buttonWidth; height: buttonHeight
-
+
Text{
id: buttonLabel
anchors.centerIn: parent
@@ -77,11 +77,11 @@ Rectangle {
}
//define the clickable area to be the whole rectangle
- MouseArea{
+ MouseArea{
id: buttonMouseArea
anchors.fill: parent //stretch the area to the parent's dimension
onClicked: buttonClick()
-
+
//if true, then onEntered and onExited called if mouse hovers in the mouse area
//if false, a button must be clicked to detect the mouse hover
hoverEnabled: true
@@ -90,7 +90,7 @@ Rectangle {
onEntered: parent.border.color = onHoverColor
//remove the border if the mouse exits the button mouse area
onExited: parent.border.color = borderColor
-
+
}
//change the color of the button when pressed
diff --git a/examples/declarative/tutorials/gettingStarted/parts/part3/EditMenu.qml b/examples/declarative/tutorials/gettingStarted/parts/part3/EditMenu.qml
index 5e825755..a753edd3 100644
--- a/examples/declarative/tutorials/gettingStarted/parts/part3/EditMenu.qml
+++ b/examples/declarative/tutorials/gettingStarted/parts/part3/EditMenu.qml
@@ -60,7 +60,7 @@ Rectangle {
buttonColor: "lightgrey"
label: "Cut"
}
-
+
Button{
buttonColor: "grey"
id: saveButton
diff --git a/examples/declarative/tutorials/gettingStarted/parts/part3/FileMenu.qml b/examples/declarative/tutorials/gettingStarted/parts/part3/FileMenu.qml
index d53e1f3d..46537a1e 100644
--- a/examples/declarative/tutorials/gettingStarted/parts/part3/FileMenu.qml
+++ b/examples/declarative/tutorials/gettingStarted/parts/part3/FileMenu.qml
@@ -49,9 +49,9 @@ Rectangle {
//generous amount of screen space that will allow the buttons to fit
height: 480; width:1000
- color: "#6C646A"
+ color: "#6C646A"
- //a sub-rectangle allows the flexibility of setting the row area
+ //a sub-rectangle allows the flexibility of setting the row area
Rectangle{
id:actionContainer
@@ -70,7 +70,7 @@ Rectangle {
buttonColor: "lightgrey"
label: "Load"
}
-
+
Button{
buttonColor: "grey"
id: saveButton
diff --git a/examples/declarative/tutorials/gettingStarted/parts/part3/MenuBar.qml b/examples/declarative/tutorials/gettingStarted/parts/part3/MenuBar.qml
index d2131eeb..e2617651 100644
--- a/examples/declarative/tutorials/gettingStarted/parts/part3/MenuBar.qml
+++ b/examples/declarative/tutorials/gettingStarted/parts/part3/MenuBar.qml
@@ -50,12 +50,12 @@ Rectangle {
//container for the header and the buttons
Rectangle{
-
+
id: labelList
height:parent.height/10
width: parent.width
color: "steelblue"
-
+
//default z is 0, items with higher z values are shown on top of items with lower z values
z: 1
@@ -82,16 +82,16 @@ Rectangle {
width: 50
id: editButton
buttonColor : menuListView.currentIndex == 1? editColor : Qt.darker(editColor, 1.5)
- scale: menuListView.currentIndex == 1? 1.25: 1
+ scale: menuListView.currentIndex == 1? 1.25: 1
label: "Edit"
radius: 1
//on a button click, change the list's currently selected item to EditMenu
onButtonClick: {
- menuListView.currentIndex = 1
+ menuListView.currentIndex = 1
}
-
+
}
@@ -111,7 +111,7 @@ Rectangle {
color: editColor
width: menuListView.width
height: menuBar.height
-
+
}
}
@@ -129,7 +129,7 @@ Rectangle {
//control the movement of the menu switching
snapMode: ListView.SnapOneItem
orientation: ListView.Horizontal
- boundsBehavior: Flickable.StopAtBounds
+ boundsBehavior: Flickable.StopAtBounds
flickDeceleration: 5000
highlightFollowsCurrentItem: true
highlightMoveDuration:240
diff --git a/examples/declarative/tutorials/gettingStarted/parts/part3/TextArea.qml b/examples/declarative/tutorials/gettingStarted/parts/part3/TextArea.qml
index ece97fec..4d3ddb33 100644
--- a/examples/declarative/tutorials/gettingStarted/parts/part3/TextArea.qml
+++ b/examples/declarative/tutorials/gettingStarted/parts/part3/TextArea.qml
@@ -71,7 +71,7 @@ Rectangle {
width:parent.width; height:parent.height
color:"midnightblue"
focus: true
-
+
wrapMode: TextEdit.Wrap
onCursorRectangleChanged: flickArea.ensureVisible(cursorRectangle)
diff --git a/examples/declarative/tutorials/gettingStarted/parts/part3/TextEditor.qml b/examples/declarative/tutorials/gettingStarted/parts/part3/TextEditor.qml
index a535c0fc..679e4f4f 100644
--- a/examples/declarative/tutorials/gettingStarted/parts/part3/TextEditor.qml
+++ b/examples/declarative/tutorials/gettingStarted/parts/part3/TextEditor.qml
@@ -47,7 +47,7 @@ Rectangle {
border.color:"black"
//the screen is partitioned into the MenuBar and TextArea. 1/3 of the screen is assigned to the MenuBar
property int partition: height/3
-
+
MenuBar{
id:menuBar
height: partition
diff --git a/examples/declarative/tutorials/gettingStarted/parts/part4/Button.qml b/examples/declarative/tutorials/gettingStarted/parts/part4/Button.qml
index 2ca436ba..1a8b7acb 100644
--- a/examples/declarative/tutorials/gettingStarted/parts/part4/Button.qml
+++ b/examples/declarative/tutorials/gettingStarted/parts/part4/Button.qml
@@ -48,7 +48,7 @@ Rectangle {
//these properties act as constants, useable outside this QML file
property int buttonHeight: 75
property int buttonWidth: 150
-
+
//attaches to the Text element's text content
property string label
property color textColor: buttonLabel.color
@@ -58,7 +58,7 @@ Rectangle {
property color borderColor: "white"
//buttonColor is set to the button's main color
- property color buttonColor: "lightblue"
+ property color buttonColor: "lightblue"
//set appearance properties
radius:10
@@ -66,7 +66,7 @@ Rectangle {
border.color: "white"
border.width: 3
width: buttonWidth; height: buttonHeight
-
+
Text{
id: buttonLabel
anchors.centerIn: parent
@@ -80,11 +80,11 @@ Rectangle {
}
//define the clickable area to be the whole rectangle
- MouseArea{
+ MouseArea{
id: buttonMouseArea
anchors.fill: parent //stretch the area to the parent's dimension
onClicked: buttonClick()
-
+
//if true, then onEntered and onExited called if mouse hovers in the mouse area
//if false, a button must be clicked to detect the mouse hover
hoverEnabled: true
@@ -93,7 +93,7 @@ Rectangle {
onEntered: parent.border.color = onHoverColor
//remove the border if the mouse exits the button mouse area
onExited: parent.border.color = borderColor
-
+
}
//change the color of the button when pressed
diff --git a/examples/declarative/tutorials/gettingStarted/parts/part4/EditMenu.qml b/examples/declarative/tutorials/gettingStarted/parts/part4/EditMenu.qml
index 64345ebd..b7e1b7c0 100644
--- a/examples/declarative/tutorials/gettingStarted/parts/part4/EditMenu.qml
+++ b/examples/declarative/tutorials/gettingStarted/parts/part4/EditMenu.qml
@@ -64,7 +64,7 @@ Rectangle {
buttonColor: "lightgrey"
label: "Cut"
}
-
+
Button{
buttonColor: "grey"
id: saveButton
diff --git a/examples/declarative/tutorials/gettingStarted/parts/part4/FileMenu.qml b/examples/declarative/tutorials/gettingStarted/parts/part4/FileMenu.qml
index 20acaa8a..df23a14b 100644
--- a/examples/declarative/tutorials/gettingStarted/parts/part4/FileMenu.qml
+++ b/examples/declarative/tutorials/gettingStarted/parts/part4/FileMenu.qml
@@ -49,13 +49,13 @@ Rectangle {
//generous amount of screen space that will allow the buttons to fit
height: 480; width:1000
- color: "#6C646A"
+ color: "#6C646A"
gradient: Gradient{
GradientStop { position: 0.0; color: "#6C646A" }
GradientStop { position: 1.0; color: Qt.darker("#6A6D6A") }
}
- //a sub-rectangle allows the flexibility of setting the row area
+ //a sub-rectangle allows the flexibility of setting the row area
Rectangle{
id:actionContainer
@@ -74,7 +74,7 @@ Rectangle {
buttonColor: "lightgrey"
label: "Load"
}
-
+
Button{
buttonColor: "grey"
id: saveButton
diff --git a/examples/declarative/tutorials/gettingStarted/parts/part4/MenuBar.qml b/examples/declarative/tutorials/gettingStarted/parts/part4/MenuBar.qml
index 9c027fc9..8a674ca2 100644
--- a/examples/declarative/tutorials/gettingStarted/parts/part4/MenuBar.qml
+++ b/examples/declarative/tutorials/gettingStarted/parts/part4/MenuBar.qml
@@ -50,7 +50,7 @@ Rectangle {
//container for the header and the buttons
Rectangle{
-
+
id: labelList
height:parent.height/10
width: parent.width
@@ -88,16 +88,16 @@ Rectangle {
width: 50
id: editButton
buttonColor : menuListView.currentIndex == 1? editColor : Qt.darker(editColor, 1.5)
- scale: menuListView.currentIndex == 1? 1.25: 1
+ scale: menuListView.currentIndex == 1? 1.25: 1
label: "Edit"
radius: 1
//on a button click, change the list's currently selected item to EditMenu
onButtonClick: {
- menuListView.currentIndex = 1
+ menuListView.currentIndex = 1
}
-
+
}
@@ -117,7 +117,7 @@ Rectangle {
color: editColor
width: menuListView.width
height: menuBar.height
-
+
}
}
@@ -135,7 +135,7 @@ Rectangle {
//control the movement of the menu switching
snapMode: ListView.SnapOneItem
orientation: ListView.Horizontal
- boundsBehavior: Flickable.StopAtBounds
+ boundsBehavior: Flickable.StopAtBounds
flickDeceleration: 5000
highlightFollowsCurrentItem: true
highlightMoveDuration:240
diff --git a/examples/declarative/tutorials/gettingStarted/parts/part4/SimpleButton.qml b/examples/declarative/tutorials/gettingStarted/parts/part4/SimpleButton.qml
index 384a6c52..7978ed42 100644
--- a/examples/declarative/tutorials/gettingStarted/parts/part4/SimpleButton.qml
+++ b/examples/declarative/tutorials/gettingStarted/parts/part4/SimpleButton.qml
@@ -42,16 +42,16 @@ import QtQuick 1.0
Rectangle {
id: simplebutton
- color: "grey"
+ color: "grey"
width: 150; height: 75
-
+
Text{
id: buttonLabel
anchors.centerIn: parent
- text: "button label"
+ text: "button label"
}
- MouseArea{
+ MouseArea{
id: buttonMouseArea
anchors.fill: parent
onClicked: console.log(buttonLabel.text + " clicked" )
diff --git a/examples/declarative/tutorials/gettingStarted/parts/part4/TextArea.qml b/examples/declarative/tutorials/gettingStarted/parts/part4/TextArea.qml
index 1e33bec9..0c2277e9 100644
--- a/examples/declarative/tutorials/gettingStarted/parts/part4/TextArea.qml
+++ b/examples/declarative/tutorials/gettingStarted/parts/part4/TextArea.qml
@@ -46,7 +46,7 @@ Rectangle {
width :400
height:400
property color fontColor: "white"
-
+
Flickable{
id: flickArea
@@ -71,7 +71,7 @@ Rectangle {
width:parent.width; height:parent.height
color:fontColor
focus: true
-
+
wrapMode: TextEdit.Wrap
onCursorRectangleChanged: flickArea.ensureVisible(cursorRectangle)
diff --git a/examples/declarative/tutorials/gettingStarted/parts/part4/TextEditor.qml b/examples/declarative/tutorials/gettingStarted/parts/part4/TextEditor.qml
index 0fdce356..a5b6e618 100644
--- a/examples/declarative/tutorials/gettingStarted/parts/part4/TextEditor.qml
+++ b/examples/declarative/tutorials/gettingStarted/parts/part4/TextEditor.qml
@@ -45,8 +45,8 @@ Rectangle {
width: 1000; height: 1000
property int partition: height/3
state: "DRAWER_CLOSED"
-
-
+
+
//Item 1: MenuBar on the top portion of the screen
MenuBar{
id:menuBar
@@ -66,7 +66,7 @@ Rectangle {
color: "#3F3F3F"
fontColor: "#DCDCCC"
height: partition*2
- width:parent.width
+ width:parent.width
}
//Item 3: The drawer handle
@@ -88,17 +88,17 @@ Rectangle {
id: arrowIcon
source: "images/arrow.png"
anchors.horizontalCenter: parent.horizontalCenter
-
+
Behavior{NumberAnimation{property: "rotation";easing.type: Easing.OutExpo }}
}
-
+
MouseArea{
id: drawerMouseArea
anchors.fill:parent
onClicked:{
if (screen.state == "DRAWER_CLOSED"){
screen.state = "DRAWER_OPEN"
- console.log("drawer OPEN")
+ console.log("drawer OPEN")
}
else if (screen.state == "DRAWER_OPEN"){
screen.state = "DRAWER_CLOSED"
@@ -109,13 +109,13 @@ Rectangle {
//if true, then onEntered and onExited called if mouse hovers in the mouse area
//if false, a button must be clicked to detect the mouse hover
hoverEnabled: true
-
+
//display a border if the mouse hovers on the button mouse area
onEntered: parent.border.color = Qt.lighter("#6A6D6A")
//remove the border if the mouse exits the button mouse area
onExited: parent.border.color = "#6A6D6A"
}
-
+
}
states:[
State{
@@ -123,14 +123,14 @@ Rectangle {
PropertyChanges { target: menuBar; y:0}
PropertyChanges { target: textArea; y: partition + drawer.height}
PropertyChanges { target: drawer; y: partition}
- PropertyChanges { target: arrowIcon; rotation: 180}
+ PropertyChanges { target: arrowIcon; rotation: 180}
},
State{
name: "DRAWER_CLOSED"
PropertyChanges { target: menuBar; y:-partition}
PropertyChanges { target: textArea; y: drawer.height; height: screen.height - drawer.height}
PropertyChanges { target: drawer; y: 0}
- PropertyChanges { target: arrowIcon; rotation: 0}
+ PropertyChanges { target: arrowIcon; rotation: 0}
}
]
@@ -141,6 +141,6 @@ Rectangle {
NumberAnimation { target: menuBar; properties: "y"; duration: 100;easing.type: Easing.OutExpo }
NumberAnimation { target: drawer; properties: "y"; duration: 100;easing.type: Easing.OutExpo }
}
-
+
]
}
diff --git a/examples/declarative/tutorials/gettingStarted/parts/part5/TextEditor.qml b/examples/declarative/tutorials/gettingStarted/parts/part5/TextEditor.qml
index 7c63d752..da54a552 100644
--- a/examples/declarative/tutorials/gettingStarted/parts/part5/TextEditor.qml
+++ b/examples/declarative/tutorials/gettingStarted/parts/part5/TextEditor.qml
@@ -46,7 +46,7 @@ Rectangle {
width: 1000; height: 1000
property int partition: height/3
state: "DRAWER_CLOSED"
-
+
//Item 1: MenuBar on the top portion of the screen
MenuBar{
id:menuBar
@@ -59,7 +59,7 @@ Rectangle {
y:drawer.height
color: "#3F3F3F"
fontColor: "#DCDCCC"
- height: partition*2; width:parent.width
+ height: partition*2; width:parent.width
}
//Item 3: The drawer handle
Rectangle{
@@ -78,10 +78,10 @@ Rectangle {
id: arrowIcon
source: "images/arrow.png"
anchors.horizontalCenter: parent.horizontalCenter
-
+
Behavior{NumberAnimation{property: "rotation";easing.type: Easing.OutExpo }}
}
-
+
MouseArea{
id: drawerMouseArea
anchors.fill:parent
@@ -105,14 +105,14 @@ Rectangle {
PropertyChanges { target: menuBar; y: 0}
PropertyChanges { target: textArea; y: partition + drawer.height}
PropertyChanges { target: drawer; y: partition}
- PropertyChanges { target: arrowIcon; rotation: 180}
+ PropertyChanges { target: arrowIcon; rotation: 180}
},
State{
name: "DRAWER_CLOSED"
PropertyChanges { target: menuBar; y:-height; }
PropertyChanges { target: textArea; y: drawer.height; height: screen.height - drawer.height}
PropertyChanges { target: drawer; y: 0}
- PropertyChanges { target: arrowIcon; rotation: 0}
+ PropertyChanges { target: arrowIcon; rotation: 0}
}
]
diff --git a/examples/declarative/tutorials/gettingStarted/parts/part5/core/button.qml b/examples/declarative/tutorials/gettingStarted/parts/part5/core/button.qml
index aaf619b5..8f1488d1 100644
--- a/examples/declarative/tutorials/gettingStarted/parts/part5/core/button.qml
+++ b/examples/declarative/tutorials/gettingStarted/parts/part5/core/button.qml
@@ -80,7 +80,7 @@ Rectangle {
signal buttonClick()
//define the clickable area to be the whole rectangle
- MouseArea {
+ MouseArea {
id: buttonMouseArea
anchors.fill: parent //stretch the area to the parent's dimension
onClicked: buttonClick()
diff --git a/examples/declarative/tutorials/gettingStarted/parts/part5/core/fileDialog.qml b/examples/declarative/tutorials/gettingStarted/parts/part5/core/fileDialog.qml
index 9f50c73f..b4bf3e24 100644
--- a/examples/declarative/tutorials/gettingStarted/parts/part5/core/fileDialog.qml
+++ b/examples/declarative/tutorials/gettingStarted/parts/part5/core/fileDialog.qml
@@ -71,7 +71,7 @@ Rectangle {
}
Text {
height: header.height; anchors.centerIn: header
- text: "files:"
+ text: "files:"
color: "lightblue"
font.weight: Font.Light
font.italic: true
diff --git a/examples/declarative/tutorials/gettingStarted/parts/part5/core/fileMenu.qml b/examples/declarative/tutorials/gettingStarted/parts/part5/core/fileMenu.qml
index b2a34b9b..494f8acb 100644
--- a/examples/declarative/tutorials/gettingStarted/parts/part5/core/fileMenu.qml
+++ b/examples/declarative/tutorials/gettingStarted/parts/part5/core/fileMenu.qml
@@ -53,7 +53,7 @@ Rectangle {
//used to divide the screen into parts.
property real partition: 1/3
- color: "#6C646A"
+ color: "#6C646A"
gradient: Gradient {
GradientStop { position: 0.0; color: "#6C646A" }
GradientStop { position: 1.0; color: Qt.darker("#6A6D6A") }
diff --git a/examples/declarative/tutorials/gettingStarted/parts/part5/core/menuBar.qml b/examples/declarative/tutorials/gettingStarted/parts/part5/core/menuBar.qml
index 49dc0e0d..78e85080 100644
--- a/examples/declarative/tutorials/gettingStarted/parts/part5/core/menuBar.qml
+++ b/examples/declarative/tutorials/gettingStarted/parts/part5/core/menuBar.qml
@@ -67,7 +67,7 @@ Rectangle {
Text {
height: parent.height
anchors { right: labelRow.left ; verticalCenter: parent.bottom }
- text: "menu: "
+ text: "menu: "
color: "lightblue"
font { weight: Font.Light; italic: true }
smooth: true
@@ -97,13 +97,13 @@ Rectangle {
id: editButton
height: 20; width: 50
buttonColor : menuListView.currentIndex == 1? Qt.darker(editColor, 1.5) : Qt.darker(editColor, 1.9)
- scale: menuListView.currentIndex == 1? 1.25: 1
+ scale: menuListView.currentIndex == 1? 1.25: 1
label: "Edit"
radius: 1
labelSize: menuListView.currentIndex == 1? 16:12
smooth:true
//on a button click, change the list's currently selected item to EditMenu
- onButtonClick: menuListView.currentIndex = 1
+ onButtonClick: menuListView.currentIndex = 1
gradient: Gradient {
GradientStop { position: 0.0; color: editColor }
GradientStop { position: 1.0; color: "#136F6F6F" }
@@ -123,7 +123,7 @@ Rectangle {
//control the movement of the menu switching
snapMode: ListView.SnapOneItem
orientation: ListView.Horizontal
- boundsBehavior: Flickable.StopAtBounds
+ boundsBehavior: Flickable.StopAtBounds
flickDeceleration: 5000
highlightFollowsCurrentItem: true
highlightMoveDuration:240
diff --git a/examples/declarative/tutorials/gettingStarted/parts/part5/filedialog/dialogPlugin.cpp b/examples/declarative/tutorials/gettingStarted/parts/part5/filedialog/dialogPlugin.cpp
index 452124f5..84ebdced 100644
--- a/examples/declarative/tutorials/gettingStarted/parts/part5/filedialog/dialogPlugin.cpp
+++ b/examples/declarative/tutorials/gettingStarted/parts/part5/filedialog/dialogPlugin.cpp
@@ -44,11 +44,11 @@
#include <QtDeclarative/qdeclarative.h>
void DialogPlugin::registerTypes(const char *uri){
-
+
//register the class Directory into QML as a "Directory" element version 1.0
qmlRegisterType<Directory>(uri, 1, 0, "Directory");
qmlRegisterType<File>(uri,1,0,"File");
-
+
//qRegisterMetaType<QDeclarativeListProperty<QString> > ("QDeclarativeListProperty<QString>");
-
+
}
diff --git a/examples/declarative/tutorials/gettingStarted/parts/part5/filedialog/dialogPlugin.h b/examples/declarative/tutorials/gettingStarted/parts/part5/filedialog/dialogPlugin.h
index 68c6076e..0a5bc9ef 100644
--- a/examples/declarative/tutorials/gettingStarted/parts/part5/filedialog/dialogPlugin.h
+++ b/examples/declarative/tutorials/gettingStarted/parts/part5/filedialog/dialogPlugin.h
@@ -51,7 +51,7 @@ class DialogPlugin : public QDeclarativeExtensionPlugin
public:
//registerTypes is inherited from QDeclarativeExtensionPlugin
void registerTypes(const char *uri);
-
+
};
#endif
diff --git a/examples/declarative/tutorials/gettingStarted/parts/part5/filedialog/directory.cpp b/examples/declarative/tutorials/gettingStarted/parts/part5/filedialog/directory.cpp
index bdf450eb..dd4a5546 100644
--- a/examples/declarative/tutorials/gettingStarted/parts/part5/filedialog/directory.cpp
+++ b/examples/declarative/tutorials/gettingStarted/parts/part5/filedialog/directory.cpp
@@ -48,10 +48,10 @@ Initialize the saves directory and creates the file list
*/
Directory::Directory(QObject *parent) : QObject(parent)
{
-
+
m_dir.cd( QDir::currentPath());
-
+
//go to the saved directory. if not found, create save directory
m_saveDir = "saves";
if (m_dir.cd(m_saveDir) == 0){
@@ -144,7 +144,7 @@ void Directory::setFileContent(const QString &str){
if(str != m_fileContent){
m_fileContent = str;
emit fileContentChanged();
- }
+ }
}
/*
@@ -152,17 +152,17 @@ Called from QML to save the file using the filename and file content.
Saving makes sure that the file has a .txt extension.
*/
void Directory::saveFile(){
-
+
if(currentFile.name().size() == 0){
qWarning()<< "Empty filename. no save";
return;
}
-
+
QString extendedName = currentFile.name();
if(!currentFile.name().endsWith(".txt")){
extendedName.append(".txt");
}
-
+
QFile file( m_dir.filePath(extendedName) );
if (file.open(QFile::WriteOnly | QFile::Truncate)){
QTextStream outStream(&file);
@@ -184,11 +184,11 @@ void Directory::loadFile(){
if(!currentFile.name().endsWith(".txt")){
extendedName.append(".txt");
}
-
+
QFile file( m_dir.filePath(extendedName) );
if (file.open(QFile::ReadOnly )){
QTextStream inStream(&file);
-
+
QString line;
do{
line = inStream.read(75);
@@ -205,12 +205,12 @@ created files are added onto the list.
void Directory::refresh(){
m_dirFiles = m_dir.entryList(m_filterList,QDir::Files,QDir::Name);
m_fileList.clear();
-
+
File * file;
for(int i = 0; i < m_dirFiles.size() ; i ++){
-
+
file = new File();
-
+
if(m_dirFiles.at(i).endsWith(".txt")){
QString name = m_dirFiles.at(i);
file->setName( name.remove(".txt",Qt::CaseSensitive));
diff --git a/examples/declarative/tutorials/gettingStarted/parts/part5/filedialog/directory.h b/examples/declarative/tutorials/gettingStarted/parts/part5/filedialog/directory.h
index b5a7bbe1..a8997ee2 100644
--- a/examples/declarative/tutorials/gettingStarted/parts/part5/filedialog/directory.h
+++ b/examples/declarative/tutorials/gettingStarted/parts/part5/filedialog/directory.h
@@ -52,22 +52,22 @@
class Directory : public QObject{
Q_OBJECT
-
+
//number of files in the directory
Q_PROPERTY(int filesCount READ filesCount)
-
+
//list property containing file names as QString
Q_PROPERTY(QDeclarativeListProperty<File> files READ files CONSTANT )
-
+
//file name of the text file to read/write
Q_PROPERTY(QString filename READ filename WRITE setFilename NOTIFY filenameChanged)
-
+
//text content of the file
Q_PROPERTY(QString fileContent READ fileContent WRITE setFileContent NOTIFY fileContentChanged)
-
+
public:
Directory(QObject *parent = 0);
-
+
//properties' read functions
int filesCount() const;
QString filename() const;
@@ -77,30 +77,30 @@ class Directory : public QObject{
//properties' write functions
void setFilename(const QString &str);
void setFileContent(const QString &str);
-
+
//accessible from QML
Q_INVOKABLE void saveFile();
Q_INVOKABLE void loadFile();
-
+
signals:
void directoryChanged();
void filenameChanged();
void fileContentChanged();
-
+
private:
QDir m_dir;
- QStringList m_dirFiles;
- File currentFile;
+ QStringList m_dirFiles;
+ File currentFile;
QString m_saveDir;
- QStringList m_filterList;
-
+ QStringList m_filterList;
+
//contains the file data in QString format
QString m_fileContent;
-
+
//Registered to QML in a plugin. Accessible from QML as a property of Directory
QList<File *> m_fileList;
- //refresh content of the directory
+ //refresh content of the directory
void refresh();
};
diff --git a/examples/declarative/tutorials/gettingStarted/parts/part5/filedialog/file.h b/examples/declarative/tutorials/gettingStarted/parts/part5/filedialog/file.h
index ef1551a3..f3afb6ff 100644
--- a/examples/declarative/tutorials/gettingStarted/parts/part5/filedialog/file.h
+++ b/examples/declarative/tutorials/gettingStarted/parts/part5/filedialog/file.h
@@ -46,20 +46,20 @@
#include <QObject>
class File : public QObject{
-
+
Q_OBJECT
-
+
Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged)
-
+
public:
File(QObject *parent = 0);
-
+
QString name() const;
void setName(const QString &str);
-
+
signals:
void nameChanged();
-
+
private:
QString m_name;
};
diff --git a/examples/declarative/tutorials/gettingStarted/parts/part5/filedialog/filedialog.pro b/examples/declarative/tutorials/gettingStarted/parts/part5/filedialog/filedialog.pro
index f9229a3b..856221bc 100644
--- a/examples/declarative/tutorials/gettingStarted/parts/part5/filedialog/filedialog.pro
+++ b/examples/declarative/tutorials/gettingStarted/parts/part5/filedialog/filedialog.pro
@@ -8,10 +8,10 @@ MOC_DIR = tmp
TARGET = FileDialog
-HEADERS += directory.h \
- file.h \
- dialogPlugin.h
+HEADERS += directory.h \
+ file.h \
+ dialogPlugin.h
-SOURCES += directory.cpp \
- file.cpp \
- dialogPlugin.cpp
+SOURCES += directory.cpp \
+ file.cpp \
+ dialogPlugin.cpp
diff --git a/examples/declarative/tutorials/gettingStarted/parts/part5/qml-texteditor5.qmlproject b/examples/declarative/tutorials/gettingStarted/parts/part5/qml-texteditor5.qmlproject
index ed034dff..30e9e1fe 100644
--- a/examples/declarative/tutorials/gettingStarted/parts/part5/qml-texteditor5.qmlproject
+++ b/examples/declarative/tutorials/gettingStarted/parts/part5/qml-texteditor5.qmlproject
@@ -4,8 +4,8 @@ Project {
/* Include .qml, .js, and image files from current directory and subdirectories */
QmlFiles {
directory: "."
- directory: "core"
- directory: "filedialog"
+ directory: "core"
+ directory: "filedialog"
}
JavaScriptFiles {
directory: "."
diff --git a/examples/declarative/tutorials/samegame/samegame1/samegame.qml b/examples/declarative/tutorials/samegame/samegame1/samegame.qml
index 999e629a..0a68cd47 100644
--- a/examples/declarative/tutorials/samegame/samegame1/samegame.qml
+++ b/examples/declarative/tutorials/samegame/samegame1/samegame.qml
@@ -68,7 +68,7 @@ Rectangle {
Button {
anchors { left: parent.left; verticalCenter: parent.verticalCenter }
- text: "New Game"
+ text: "New Game"
onClicked: console.log("This doesn't do anything yet...")
}
diff --git a/examples/declarative/tutorials/samegame/samegame3/Block.qml b/examples/declarative/tutorials/samegame/samegame3/Block.qml
index 20a2e163..c451fcfe 100644
--- a/examples/declarative/tutorials/samegame/samegame3/Block.qml
+++ b/examples/declarative/tutorials/samegame/samegame3/Block.qml
@@ -53,7 +53,7 @@ Item {
source: {
if (type == 0)
return "../shared/pics/redStone.png";
- else if (type == 1)
+ else if (type == 1)
return "../shared/pics/blueStone.png";
else
return "../shared/pics/greenStone.png";
diff --git a/examples/declarative/tutorials/samegame/samegame3/samegame.js b/examples/declarative/tutorials/samegame/samegame3/samegame.js
index df5bdfb0..01edc5bd 100644
--- a/examples/declarative/tutorials/samegame/samegame3/samegame.js
+++ b/examples/declarative/tutorials/samegame/samegame3/samegame.js
@@ -160,7 +160,7 @@ function victoryCheck() {
}
//![2]
-//only floods up and right, to see if it can find adjacent same-typed blocks
+//only floods up and right, to see if it can find adjacent same-typed blocks
function floodMoveCheck(column, row, type) {
if (column >= maxColumn || column < 0 || row >= maxRow || row < 0)
return false;
diff --git a/examples/declarative/tutorials/samegame/samegame4/content/BoomBlock.qml b/examples/declarative/tutorials/samegame/samegame4/content/BoomBlock.qml
index aeb544c7..c44fbd61 100644
--- a/examples/declarative/tutorials/samegame/samegame4/content/BoomBlock.qml
+++ b/examples/declarative/tutorials/samegame/samegame4/content/BoomBlock.qml
@@ -94,7 +94,7 @@ Item {
source: {
if (type == 0)
return "../../shared/pics/redStar.png";
- else if (type == 1)
+ else if (type == 1)
return "../../shared/pics/blueStar.png";
else
return "../../shared/pics/greenStar.png";
diff --git a/examples/declarative/tutorials/samegame/samegame4/content/samegame.js b/examples/declarative/tutorials/samegame/samegame4/content/samegame.js
index ccc3f9da..59ac4464 100644
--- a/examples/declarative/tutorials/samegame/samegame4/content/samegame.js
+++ b/examples/declarative/tutorials/samegame/samegame4/content/samegame.js
@@ -174,7 +174,7 @@ function victoryCheck() {
}
//![4]
-//only floods up and right, to see if it can find adjacent same-typed blocks
+//only floods up and right, to see if it can find adjacent same-typed blocks
function floodMoveCheck(column, row, type) {
if (column >= maxColumn || column < 0 || row >= maxRow || row < 0)
return false;
diff --git a/examples/declarative/tutorials/samegame/samegame4/highscores/scores.php b/examples/declarative/tutorials/samegame/samegame4/highscores/scores.php
index daf480e2..86e4187a 100644
--- a/examples/declarative/tutorials/samegame/samegame4/highscores/scores.php
+++ b/examples/declarative/tutorials/samegame/samegame4/highscores/scores.php
@@ -8,8 +8,8 @@
$time = $_POST["time"];
if($name == "")
$name = "Anonymous";
- $file = fopen("score_data.xml", "a");
- $ret = fwrite($file, "<record><score>". $score . "</score><name>"
+ $file = fopen("score_data.xml", "a");
+ $ret = fwrite($file, "<record><score>". $score . "</score><name>"
. $name . "</name><gridSize>" . $grid . "</gridSize><seconds>"
. $time . "</seconds></record>\n");
echo "Your score has been recorded. Thanks for playing!";
@@ -18,7 +18,7 @@
}else{#Read high score list
#Now uses XSLT to display. So just print the file. With XML cruft added.
#Note that firefox at least won't apply the XSLT on a php file. So redirecting
- $file = fopen("scores.xml", "w");
+ $file = fopen("scores.xml", "w");
$ret = fwrite($file, '<?xml version="1.0" encoding="ISO-8859-1"?>' . "\n"
. '<?xml-stylesheet type="text/xsl" href="score_style.xsl"?>' . "\n"
. "<records>\n" . file_get_contents("score_data.xml") . "</records>\n");