mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
34 lines
810 B
C++
34 lines
810 B
C++
// SPDX-FileCopyrightText: 2023 Devin Lin <devin@kde.org>
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
#pragma once
|
|
|
|
#include <QDBusError>
|
|
#include <QDBusServiceWatcher>
|
|
#include <QObject>
|
|
#include <QString>
|
|
|
|
class LockscreenDBusClient : public QObject
|
|
{
|
|
Q_OBJECT
|
|
Q_PROPERTY(bool lockscreenActive READ lockscreenActive NOTIFY lockscreenActiveChanged);
|
|
|
|
public:
|
|
explicit LockscreenDBusClient(QObject *parent = nullptr);
|
|
static LockscreenDBusClient *self();
|
|
|
|
bool lockscreenActive() const;
|
|
|
|
Q_SIGNALS:
|
|
void lockscreenActiveChanged();
|
|
void lockscreenUnlocked();
|
|
void lockscreenLocked();
|
|
|
|
public Q_SLOTS:
|
|
void slotLockscreenActiveChanged(bool active);
|
|
void dbusError(QDBusError error);
|
|
|
|
private:
|
|
bool m_lockscreenActive = false;
|
|
bool m_firstPropertySet = false;
|
|
};
|