mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
Wipe a partially entered password, and the open state of the lockscreen when the screen is off. Addresses https://invent.kde.org/plasma/plasma-mobile/-/issues/110
37 lines
728 B
C++
37 lines
728 B
C++
// SPDX-FileCopyrightText: 2024 Devin Lin <devin@kde.org>
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
#pragma once
|
|
|
|
#include <QObject>
|
|
#include <QPointer>
|
|
#include <QQuickItem>
|
|
#include <QQuickWindow>
|
|
#include <QTimer>
|
|
#include <qqmlregistration.h>
|
|
|
|
#include <KScreenDpms/Dpms>
|
|
|
|
/**
|
|
* Utility class that provides useful functions related to dpms.
|
|
*
|
|
* @author Devin Lin <devin@kde.org>
|
|
**/
|
|
class DPMSUtil : public QObject
|
|
{
|
|
Q_OBJECT
|
|
QML_ELEMENT
|
|
|
|
public:
|
|
DPMSUtil(QObject *parent = nullptr);
|
|
|
|
Q_INVOKABLE void turnDpmsOn();
|
|
Q_INVOKABLE void turnDpmsOff();
|
|
|
|
Q_SIGNALS:
|
|
void dpmsTurnedOn(QScreen *screen);
|
|
void dpmsTurnedOff(QScreen *screen);
|
|
|
|
private:
|
|
QScopedPointer<KScreen::Dpms> m_dpms;
|
|
};
|