How to catch ambience change signal in an app?

asked 2016-06-23 12:45:16 +0200

rinigus gravatar image

updated 2018-12-03 21:26:57 +0200

Tanghus gravatar image

I need to catch the moment when user changes Ambience on the device. Is there any signal to catch in QML? Or maybe there is a signal emitted when the repaint of the whole app is requested?

edit retag flag offensive close delete

Comments

2

@rinigus - You can find out yourself using a few different ways that may or may not yield what you need.

type dbus-monitor hit enter and then change ambience on your phone

-or-

dconf watch / hit enter and change ambience on the phone......in both cases, a fair bit of useful data is spewed out for your perusal.

Edz ( 2016-06-23 14:01:25 +0200 )edit

Thank you very much! dconf watch / is giving the changes exactly as needed (values at /desktop/jolla/theme/color). Do you know an API to follow dconf values changes? Qt C++/QML?

rinigus ( 2016-06-23 15:30:40 +0200 )edit
1

@rinigus - I'm still very much a newbie to all things Linux/Sailfish. So, I'm not so sure I understand what you are now asking me.....but, libdconf.so I believe, contains the DConf client API functions and libdconf-dbus-1.so contains DConf client API functions for DBus.- this gleaned from Googling, so info may not be correct or files may not be present in Sailfish.

Edz ( 2016-06-23 16:06:10 +0200 )edit

It seems that I can also use Qt DBus interface and catch the Writer signals. Thank you for an answer! OK, now just have to implement it :)

rinigus ( 2016-06-23 16:21:46 +0200 )edit

You're welcome, glad to be of some help, good luck!,.... I have so much to learn!

Edz ( 2016-06-23 16:37:27 +0200 )edit