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

Time dataengine and Sun/Moon

Tags: None
(comma "," separated)
adeptus
Registered Member
Posts
1
Karma
0

Time dataengine and Sun/Moon

Sat Apr 03, 2021 4:38 pm
Greetings!

Exploring source code of Plasma dataengines here https://github.com/KDE/plasma-workspace/blob/master/dataengines/time/timesource.cpp I found Sun and Moon mentioning in the code. https://github.com/KDE/plasma-workspace/blob/master/dataengines/time/solarsystem.cpp obviously performs some calculations related to Sun and Moon. I'm experimenting with KDE plasmoids and I'm curious whether this data can be retrieved?
I checked Plasma Engine Explorer and it shows bunch of sources from "time" engine, all of them are time zone names. I can obtain some data from the engine using this QML:
Code: Select all
PlasmaCore.DataSource {
    id: dataSource
    engine: "time"
    connectedSources: sources
    }
Component.onCompleted: {
    console.log(dataSource.data["Local"]["DateTime"])
    console.log(dataSource.data["Local"]["Timezone City"])
    }

But I haven't found how can I retrieve Sun and Moon values. Is it possible?


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Google [Bot], Yahoo [Bot]