Commit 970dc7d9 authored by Marco Martin's avatar Marco Martin

use the dataengine

can't use the tasks applet private import from there:
plasma-desktop shouldn't be installed on the phone
parent 4e31575a
......@@ -48,7 +48,7 @@ Item {
ScriptAction {
script: {
if (background.x != 0) {
backend.closeByItemId(model.Id);
window.executeJob("close", model.Id);
}
}
}
......@@ -85,7 +85,7 @@ Item {
onPressed: delegate.z = 10;
onClicked: {
window.hide();
backend.activateItem(model.Id, true);
window.executeJob("activate", model.Id);
}
onReleased: {
delegate.z = 0;
......
......@@ -24,8 +24,6 @@ import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 2.0 as PlasmaComponents
import org.kde.plasma.mobilecomponents 0.2
import org.kde.plasma.private.taskmanager 0.1 as TaskManager
FullScreenPanel {
id: window
......@@ -58,15 +56,17 @@ FullScreenPanel {
scrollAnim.running = true;
}
TaskManager.Backend {
id: backend
highlightWindows: false
PlasmaCore.DataSource {
id: tasksSource
engine: "tasks"
//NoGrouping
groupingStrategy: 0
//AlphaSorting
sortingStrategy: 2
connectedSources: "tasks"
}
function executeJob(operationName, id) {
var service = tasksSource.serviceForSource("tasks");
var operation = service.operationDescription(operationName);
operation.Id = id;
service.startOperationCall(operation);
}
SequentialAnimation {
......@@ -140,7 +140,7 @@ FullScreenPanel {
}
}
model: backend.tasksModel
model: tasksSource.models.tasks
header: Item {
width: window.width
height: window.height
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment