diff options
author | Jens Bache-Wiig <jens.bache-wiig@digia.com> | 2012-12-13 19:16:13 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-12-13 20:43:59 +0100 |
commit | 93c7cf2cbc650d1590037d86f8eba6d0be029159 (patch) | |
tree | e54a77727f885789222b3b6588b2015862a3f559 /examples/quick/demos/stocqt/content/StockSettings.qml | |
parent | 47d97fe72bff0bfd4e2a32ecb7850502cf0a82d5 (diff) |
Clean up the StockQt demo
I cleaned up the whitespace, property declarations and removed
some console output. No changes to the functionality or design.
Change-Id: I499f6d061e43bf2e187eebc026858b3abd21a9b0
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Reviewed-by: Alan Alpert <aalpert@rim.com>
Diffstat (limited to 'examples/quick/demos/stocqt/content/StockSettings.qml')
-rw-r--r-- | examples/quick/demos/stocqt/content/StockSettings.qml | 311 |
1 files changed, 156 insertions, 155 deletions
diff --git a/examples/quick/demos/stocqt/content/StockSettings.qml b/examples/quick/demos/stocqt/content/StockSettings.qml index 3bb4de84a6..ec7c20ea51 100644 --- a/examples/quick/demos/stocqt/content/StockSettings.qml +++ b/examples/quick/demos/stocqt/content/StockSettings.qml @@ -41,170 +41,171 @@ import QtQuick 2.0 Rectangle { - id:root - width:320 - height:480 - color:"#423A2F" - property var startDate : startDatePicker.date; - property var endDate : endDatePicker.date; + id: root + width: 320 + height: 480 + color: "#423A2F" + property var startDate : startDatePicker.date + property var endDate : endDatePicker.date - property bool drawHighPrice:highButton.buttonEnabled - property bool drawLowPrice:lowButton.buttonEnabled - property bool drawOpenPrice:openButton.buttonEnabled - property bool drawClosePrice:closeButton.buttonEnabled - property bool drawVolume:volumeButton.buttonEnabled - property bool drawKLine:klineButton.buttonEnabled + property bool drawHighPrice: highButton.buttonEnabled + property bool drawLowPrice: lowButton.buttonEnabled + property bool drawOpenPrice: openButton.buttonEnabled + property bool drawClosePrice: closeButton.buttonEnabled + property bool drawVolume: volumeButton.buttonEnabled + property bool drawKLine: klineButton.buttonEnabled - property color highColor:Qt.rgba(1, 0, 0, 1) - property color lowColor:Qt.rgba(0, 1, 0, 1) - property color openColor:Qt.rgba(0, 0, 1, 1) - property color closeColor:"#ecc088" - property color volumeColor:Qt.rgba(0.3, 0.5, 0.7, 1) + property color highColor: Qt.rgba(1, 0, 0, 1) + property color lowColor: Qt.rgba(0, 1, 0, 1) + property color openColor: Qt.rgba(0, 0, 1, 1) + property color volumeColor: Qt.rgba(0.3, 0.5, 0.7, 1) + property color closeColor: "#ecc088" - property string chartType:"year" - Image { - id:logo - source:"images/logo.png" - anchors.horizontalCenter : parent.horizontalCenter - anchors.top:parent.top - anchors.topMargin:15 - } + property string chartType: "year" - Text { - id:startDateText - text:"START DATE:" - color:"#76644A" - font.pointSize:15 - anchors.left:parent.left - anchors.leftMargin:20 - anchors.top:logo.bottom - anchors.topMargin:20 - } + Image { + id: logo + source: "images/logo.png" + anchors.horizontalCenter : parent.horizontalCenter + anchors.top: parent.top + anchors.topMargin: 15 + } - DatePicker { - id:startDatePicker - anchors.left:parent.left - anchors.leftMargin:30 - anchors.top:startDateText.bottom - anchors.topMargin:15 - date : new Date(1995, 3, 25) - } + Text { + id: startDateText + text: "START DATE:" + color: "#76644A" + font.pointSize: 15 + anchors.left: parent.left + anchors.leftMargin: 20 + anchors.top: logo.bottom + anchors.topMargin: 20 + } - Text { - id:endDateText - text:"END DATE:" - color:"#76644A" - font.pointSize:15 - anchors.left:parent.left - anchors.leftMargin:20 - anchors.top:startDatePicker.bottom - anchors.topMargin:20 - } + DatePicker { + id: startDatePicker + anchors.left: parent.left + anchors.leftMargin: 30 + anchors.top: startDateText.bottom + anchors.topMargin: 15 + date: new Date(1995, 3, 25) + } - DatePicker { - id:endDatePicker - anchors.left:parent.left - anchors.leftMargin:30 - anchors.top:endDateText.bottom - anchors.topMargin:15 - } + Text { + id: endDateText + text: "END DATE:" + color: "#76644A" + font.pointSize: 15 + anchors.left: parent.left + anchors.leftMargin: 20 + anchors.top: startDatePicker.bottom + anchors.topMargin: 20 + } - Text { - id:drawOptionsText - text:"DRAW OPTIONS:" - color:"#76644A" - font.pointSize:15 - anchors.left:parent.left - anchors.leftMargin:20 - anchors.top:endDatePicker.bottom - anchors.topMargin:20 - } - Column { - id:drawOptions - anchors.top:drawOptionsText.bottom - anchors.topMargin: 20 - anchors.left: parent.left - anchors.leftMargin: 30 - spacing:2 - Row{ - spacing:10 - CheckBox { - id:highButton - text:"High " - buttonEnabled:false - } + DatePicker { + id: endDatePicker + anchors.left: parent.left + anchors.leftMargin: 30 + anchors.top: endDateText.bottom + anchors.topMargin: 15 + } - CheckBox { - id:lowButton - text:"Low " - buttonEnabled:false - } - CheckBox { - text:"Open " - id:openButton - buttonEnabled:false - } - } - Row{ - spacing:10 - CheckBox { - text:"Close " - id:closeButton - buttonEnabled:true - } - CheckBox { - id:volumeButton - text:"Volume" - buttonEnabled:true - } - CheckBox { - id:klineButton - text:"K Line" - buttonEnabled:false - } - } - } + Text { + id: drawOptionsText + text: "DRAW OPTIONS:" + color: "#76644A" + font.pointSize: 15 + anchors.left: parent.left + anchors.leftMargin: 20 + anchors.top: endDatePicker.bottom + anchors.topMargin: 20 + } + Column { + id: drawOptions + anchors.top: drawOptionsText.bottom + anchors.topMargin: 20 + anchors.left: parent.left + anchors.leftMargin: 30 + spacing: 2 + Row { + spacing: 10 - Text { - id:chartTypeText - text:"SHOW PREVIOUS:" - color:"#76644A" - font.pointSize:15 - anchors.left:parent.left - anchors.leftMargin:20 - anchors.top:drawOptions.bottom - anchors.topMargin:20 - } - Row { - anchors.left: parent.left - anchors.leftMargin: 20 - anchors.top : chartTypeText.bottom - anchors.topMargin: 20 - spacing:10 - Button { - id: yearView - text: "YEAR" - buttonEnabled: root.chartType == "year" - onClicked: root.chartType = "year" - } - Button { - id: monthView - text: "MONTH" - buttonEnabled: root.chartType == "month" - onClicked: root.chartType = "month" - } - Button { - id: weekView - text: "WEEK" - buttonEnabled: root.chartType == "week" - onClicked: root.chartType = "week" - } - Button { - id: allView - text: "ALL" - buttonEnabled: root.chartType == "all" - onClicked: root.chartType = "all" - } - } + CheckBox { + id: highButton + text: "High " + buttonEnabled: false + } + CheckBox { + id: lowButton + text: "Low " + buttonEnabled: false + } + CheckBox { + id: openButton + text: "Open " + buttonEnabled: false + } + } + Row { + spacing: 10 + CheckBox { + text: "Close " + id: closeButton + buttonEnabled: true + } + CheckBox { + id: volumeButton + text: "Volume" + buttonEnabled: true + } + CheckBox { + id: klineButton + text: "K Line" + buttonEnabled: false + } + } + } + + Text { + id: chartTypeText + text: "SHOW PREVIOUS:" + color: "#76644A" + font.pointSize: 15 + anchors.left: parent.left + anchors.leftMargin: 20 + anchors.top: drawOptions.bottom + anchors.topMargin: 20 + } + Row { + anchors.left: parent.left + anchors.leftMargin: 20 + anchors.top: chartTypeText.bottom + anchors.topMargin: 20 + spacing: 10 + Button { + id: yearView + text: "YEAR" + buttonEnabled: root.chartType == "year" + onClicked: root.chartType = "year" + } + Button { + id: monthView + text: "MONTH" + buttonEnabled: root.chartType == "month" + onClicked: root.chartType = "month" + } + Button { + id: weekView + text: "WEEK" + buttonEnabled: root.chartType == "week" + onClicked: root.chartType = "week" + } + Button { + id: allView + text: "ALL" + buttonEnabled: root.chartType == "all" + onClicked: root.chartType = "all" + } + } } |