Use the real devices from telldus-core instead of hardcoded values

This commit is contained in:
Micke Prag 2011-01-14 12:56:52 +00:00
parent 042508033e
commit 2b2cb019fa
2 changed files with 67 additions and 68 deletions

View file

@ -8,11 +8,10 @@ __postInit__ = function() {
com.telldus.schedulersimplegui = function() {
function init() {
print("START");
var v = new com.telldus.qml.view({});
v.setProperty('deviceModel', com.telldus.core.deviceList.getList());
v.load("main.qml");
//var v = new com.telldus.qml.view("");
application.addWidget("scheduler.simple", ":/images/devices.png", v);
application.addWidget("scheduler.simple", "icon.png", v);
}

View file

@ -79,7 +79,7 @@ import Qt 4.7
anchors.horizontalCenter: parent.horizontalCenter
//text: "Device " + (index + 1) + "Name: " + name
text: devicename + height
text: modelData.name + height
}
}
Rectangle { id: "deviceRow"; border.color: "blue"; width: parent.width-100; height:parent.height;
@ -141,7 +141,7 @@ import Qt 4.7
ListView {
id: myListView
anchors.fill: parent
model: myModel
model: deviceModel
delegate: listRow
//snapMode: ListView.SnapToItem
//highlight: Rectangle { color: "lightsteelblue"; radius: 5 }