move dataengine control to plugin part (ref to #66)

This commit is contained in:
arcan1s
2015-10-05 00:00:38 +03:00
parent 228d6500d3
commit c4612d84ed
8 changed files with 297 additions and 199 deletions

View File

@ -118,16 +118,6 @@ Item {
QtControls.ComboBox {
id: hdd
width: parent.width * 3 / 5
model: awKeys.getHddDevices(true)
Component.onCompleted: {
if (debug) console.debug()
for (var i=0; i<model.length; i++) {
if (model[i] == cfg_dataengine["HDDDEV"]) {
if (debug) console.info("Found", model[i], "on", i)
hdd.currentIndex = i;
}
}
}
}
}
@ -345,7 +335,16 @@ Item {
if (debug) console.debug()
// init submodule
awKeys.initKeys(plasmoid.configuration.text, plasmoid.configuration.queueLimit)
awKeys.updateCache()
// update hdd model
hdd.model = awKeys.getHddDevices()
for (var i=0; i<model.length; i++) {
if (model[i] == cfg_dataengine["HDDDEV"]) {
if (debug) console.info("Found", model[i], "on", i)
hdd.currentIndex = i;
}
}
}
Component.onDestruction: {