This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Qml Tasks Dataengine

Tags: None
(comma "," separated)
beslst
Registered Member
Posts
2
Karma
0

Qml Tasks Dataengine

Wed Jan 14, 2015 4:26 pm
Hi guys!

In Kde 4 I used to have a plasmoid, which would react to a specific window. Whenever this window was focused I used to get a signal, which I would react to in my plasmoid. So basically, this code here worked perfectly fine:

Code: Select all
    PlasmaCore.DataSource {
        id: applicationSource
        engine: "tasks"
        connectedSources: sources

        onNewData: {
            var className = "mywindow_to_which_i want_to_react";
            if(className === data["className"])
            {
                // do stuff
            }
        }
    }


Now, I switched to plasma-frameworks and this code is - for some reason not working anymore. Where early I would get the onNewData Slot called whenever a new window was in the foreground, I now only get into this slot 1 time and the sourceName is then only "tasks" (No window id or whatsoever).

What is the new paradigm for the tasks dataengine. Do you have any example, which might show me how to use it in plasma-frameworks?
I looked at the window-list plasmoid, which is delivered in plasma-frameworks, but this plasmoid uses a datamodel, which I don't really need.
beslst
Registered Member
Posts
2
Karma
0

Re: Qml Tasks Dataengine

Tue Jan 27, 2015 6:29 pm
*bump*

any suggestion where I can ask this question and hope for an answer?


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Sogou [Bot]