Scare Crowe d2ebfd0519 QortalOS Titan 5.60.12
Screw the description like that inbred T3Q
2022-03-05 21:17:59 +05:00

58 lines
1.1 KiB
C++

/*
SPDX-FileCopyrightText: 2017 Roman Gilg <subdiff@gmail.com>
SPDX-License-Identifier: GPL-2.0-or-later
*/
#ifndef KWINWAYLANDBACKEND_H
#define KWINWAYLANDBACKEND_H
#include "touchpadbackend.h"
#include <QVector>
class QDBusInterface;
class KWinWaylandBackend : public TouchpadBackend
{
Q_OBJECT
Q_PROPERTY(int touchpadCount READ touchpadCount CONSTANT)
public:
explicit KWinWaylandBackend(QObject *parent = nullptr);
~KWinWaylandBackend();
bool applyConfig() override;
bool getConfig() override;
bool getDefaultConfig() override;
bool isChangedConfig() const override;
QString errorString() const override
{
return m_errorString;
}
virtual int touchpadCount() const override
{
return m_devices.count();
}
virtual QVector<QObject *> getDevices() const override
{
return m_devices;
}
private Q_SLOTS:
void onDeviceAdded(QString);
void onDeviceRemoved(QString);
private:
void findTouchpads();
QDBusInterface *m_deviceManager;
QVector<QObject *> m_devices;
QString m_errorString = QString();
};
#endif // KWINWAYLANDBACKEND_H