Changeset df5e08
- Timestamp:
- 01/12/12 17:30:23 (4 months ago)
- Branches:
- ('master', 'deebf2045e7119c339412580f37a1e653f7d5715')('controller-upgrade', '00f95d22e12d96ef089e0902ef62ae8ce841dc6f')
- Children:
- 332bf966f52568b7ac890e860f686d984c765309
- Parents:
- ef9a201f9052aef710ebaa70b3e4458e014564f0
- git-author:
- Micke Prag <micke.prag@telldus.se>2012-01-12 17:30:23+01:00
- git-committer:
- Micke Prag <micke.prag@telldus.se>2012-01-12 17:30:23+01:00
- Location:
- telldus-gui/Plugins/Sensors
- Files:
-
- 1 added
- 3 edited
-
CMakeLists.txt (modified) (1 diff)
-
SensorView.qml (added)
-
main.qml (modified) (1 diff)
-
qmldir (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
telldus-gui/Plugins/Sensors/CMakeLists.txt
re7ec37 rdf5e08 34 34 qmldir 35 35 SensorValue.qml 36 SensorView.qml 36 37 ) 37 38 -
telldus-gui/Plugins/Sensors/main.qml
ref9a20 rdf5e08 5 5 state: "VIEW" 6 6 7 Component{7 SensorView { 8 8 id: sensorView 9 Item{10 id: sensorViewItem11 visible: main.state == "EDIT" || modelData.showInList12 height: childrenRect.height13 width: parent.width14 15 BorderImage {16 source: "row_bg.png"17 border.left: 5; border.top: 518 border.right: 5; border.bottom: 519 height: sensorInfo.height20 width: parent.width21 22 Text {23 visible: main.state == "VIEW"24 anchors.left: parent.left25 anchors.leftMargin: 1526 height: 4027 verticalAlignment: Text.AlignVCenter28 text: modelData.name;29 color: "#004275"30 }31 Rectangle{32 color: "white"33 visible: main.state == "EDIT"34 anchors.left: parent.left35 anchors.leftMargin: 1536 width: nameEdit.width + 437 height: 2238 TextInput{39 id: nameEdit40 anchors.centerIn: parent41 text: modelData.name;42 color: "#004275"43 44 onActiveFocusChanged: {45 if(!activeFocus){46 //todo other way?47 modelData.setName(nameEdit.text);48 }49 }50 onAccepted: {51 modelData.setName(nameEdit.text);52 }53 }54 }55 Text{56 anchors.right: model.left57 visible: main.state == "EDIT"58 height: 4059 verticalAlignment: Text.AlignVCenter60 text: modelData.id61 color: "#004275"62 width: 5063 }64 Text{65 id: model66 anchors.right: visibleinlistcheckbox.left67 visible: main.state == "EDIT"68 height: 4069 verticalAlignment: Text.AlignVCenter70 text: modelData.model71 color: "#004275"72 width: 10073 }74 Item{75 id: visibleinlistcheckbox76 anchors.right: sensorInfo.left77 visible: main.state == "EDIT"78 height: 4079 Rectangle{80 anchors.centerIn: parent81 height: 1082 width: 1083 color: "white"84 Text{85 anchors.centerIn: parent86 color: "#004275"87 text: modelData.showInList ? "X" : ""88 }89 MouseArea{90 anchors.fill: parent91 onClicked: {92 modelData.setShowInList(!modelData.showInList);93 }94 }95 }96 width: 10097 }98 99 Column {100 id: sensorInfo101 anchors.right: parent.right102 width: 250103 SensorValue {104 visible: modelData.hasTemperature105 text: visible ? modelData.sensorValue(1).value + '°C' : ''106 icon: "icon_temp.png"107 lastUpdated: visible ? modelData.sensorValue(1).lastUpdated : new Date()108 }109 SensorValue {110 visible: modelData.hasHumidity111 text: visible ? modelData.sensorValue(2).value + '%' : ''112 icon: "icon_humidity.png"113 lastUpdated: visible ? modelData.sensorValue(2).lastUpdated : new Date()114 }115 }116 }117 }118 9 } 119 10 -
telldus-gui/Plugins/Sensors/qmldir
r1bebae rdf5e08 1 1 HeaderTitle 1.0 HeaderTitle.qml 2 2 SensorValue 1.0 SensorValue.qml 3 SensorView 1.0 SensorView.qml
Note: See TracChangeset
for help on using the changeset viewer.
