Cover animation disable
#include <QDBusConnection> | |
... | |
QDBusConnection::sessionBus().connect("", "/com/jolla/lipstick", "com.jolla.lipstick", "coverstatus", | |
this, SLOT(handleCoverstatus(const QDBusMessage&))); | |
... | |
void myclass::handleCoverstatus(const QDBusMessage& msg) | |
{ | |
QList<QVariant> args = msg.arguments(); | |
m_coverStatus = args.at(0).toInt(); | |
emit coverStatusChanged(); | |
} |
#include <QDBusMessage> | |
... | |
Q_PROPERTY(int coverStatus READ readCoverStatus NOTIFY coverStatusChanged()) | |
... | |
public: | |
int readCoverStatus() { return m_coverStatus; } | |
public slots: | |
void handleCoverstatus(const QDBusMessage& msg); | |
signals: | |
void coverStatusChanged(); | |
private: | |
int m_coverStatus; |
QT += dbus |
BuildRequires: pkgconfig(Qt5DBus) |
Timer | |
{ | |
id: coverRefreshTimer | |
interval: 500 | |
running: myclass.coverStatus === 2 | |
repeat: true | |
onTriggered: updateCover() | |
} |
This comment has been minimized.
This comment has been minimized.
Forked it, also disables timer when display is blanked |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This comment has been minimized.
what other values can coverStatus have?😄