3
0
mirror of https://github.com/Qortal/Brooklyn.git synced 2025-02-21 06:35:53 +00:00
Brooklyn/plasma/kcms/mouse/inputbackend.h
Scare Crowe d2ebfd0519 QortalOS Titan 5.60.12
Screw the description like that inbred T3Q
2022-03-05 21:17:59 +05:00

100 lines
1.6 KiB
C++

/*
SPDX-FileCopyrightText: 2017 Xuetian Weng <wengxt@gmail.com>
SPDX-FileCopyrightText: 2018 Roman Gilg <subdiff@gmail.com>
SPDX-License-Identifier: GPL-2.0-or-later
*/
#ifndef INPUTBACKEND_H
#define INPUTBACKEND_H
#include <QObject>
#include <QVariantHash>
#include <QVector>
enum class InputBackendMode {
KWinWayland = 0,
XLibinput = 1,
XEvdev = 2,
};
class InputBackend : public QObject
{
Q_OBJECT
protected:
explicit InputBackend(QObject *parent)
: QObject(parent)
{
}
InputBackendMode m_mode;
public:
static InputBackend *implementation(QObject *parent = nullptr);
InputBackendMode mode()
{
return m_mode;
}
virtual void kcmInit()
{
}
virtual bool isValid() const
{
return false;
}
virtual void load()
{
}
virtual bool applyConfig(const QVariantHash &)
{
return false;
}
virtual bool getConfig(QVariantHash &)
{
return false;
}
virtual bool applyConfig()
{
return false;
}
virtual bool getConfig()
{
return false;
}
virtual bool getDefaultConfig()
{
return false;
}
virtual bool isChangedConfig() const
{
return false;
}
virtual QString errorString() const
{
return QString();
}
virtual int deviceCount() const
{
return 0;
}
virtual QVector<QObject *> getDevices() const
{
return QVector<QObject *>();
}
Q_SIGNALS:
void deviceAdded(bool success);
void deviceRemoved(int index);
};
#endif // INPUTBACKEND_H