mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-29 07:03:08 +00:00
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:
parent
4e31575a70
commit
970dc7d989
2 changed files with 13 additions and 13 deletions
|
|
@ -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
|
||||
PlasmaCore.DataSource {
|
||||
id: tasksSource
|
||||
engine: "tasks"
|
||||
|
||||
highlightWindows: false
|
||||
|
||||
//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
|
||||
|
|
|
|||
Loading…
Reference in a new issue