You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
core/powerman/lidwatcher.h

31 lines
482 B
C++

#ifndef LIDWATCHER_H
#define LIDWATCHER_H
#include <QObject>
#include <QDBusInterface>
class LidWatcher : public QObject
{
Q_OBJECT
public:
explicit LidWatcher(QObject *parent = nullptr);
bool existLid() const;
bool lidClosed() const;
signals:
void lidClosedChanged();
private slots:
void onPropertiesChanged();
private:
QDBusInterface *m_uPowerIface;
QDBusInterface *m_uPowerPropertiesIface;
bool m_lidClosed;
};
#endif // LIDWATCHER_H