use the dataengine

can't use the tasks applet private import from there:
plasma-desktop shouldn't be installed on the phone
This commit is contained in:
Marco Martin 2015-06-22 17:38:10 -07:00
parent 4e31575a70
commit 970dc7d989
2 changed files with 13 additions and 13 deletions

View file

@ -48,7 +48,7 @@ Item {
ScriptAction { ScriptAction {
script: { script: {
if (background.x != 0) { if (background.x != 0) {
backend.closeByItemId(model.Id); window.executeJob("close", model.Id);
} }
} }
} }
@ -85,7 +85,7 @@ Item {
onPressed: delegate.z = 10; onPressed: delegate.z = 10;
onClicked: { onClicked: {
window.hide(); window.hide();
backend.activateItem(model.Id, true); window.executeJob("activate", model.Id);
} }
onReleased: { onReleased: {
delegate.z = 0; delegate.z = 0;

View file

@ -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.components 2.0 as PlasmaComponents
import org.kde.plasma.mobilecomponents 0.2 import org.kde.plasma.mobilecomponents 0.2
import org.kde.plasma.private.taskmanager 0.1 as TaskManager
FullScreenPanel { FullScreenPanel {
id: window id: window
@ -58,15 +56,17 @@ FullScreenPanel {
scrollAnim.running = true; scrollAnim.running = true;
} }
TaskManager.Backend { PlasmaCore.DataSource {
id: backend id: tasksSource
engine: "tasks"
highlightWindows: false connectedSources: "tasks"
}
//NoGrouping function executeJob(operationName, id) {
groupingStrategy: 0 var service = tasksSource.serviceForSource("tasks");
//AlphaSorting var operation = service.operationDescription(operationName);
sortingStrategy: 2 operation.Id = id;
service.startOperationCall(operation);
} }
SequentialAnimation { SequentialAnimation {
@ -140,7 +140,7 @@ FullScreenPanel {
} }
} }
model: backend.tasksModel model: tasksSource.models.tasks
header: Item { header: Item {
width: window.width width: window.width
height: window.height height: window.height