File indexing completed on 2025-01-26 05:06:34

0001 /*
0002     SPDX-FileCopyrightText: 2018 Roman Gilg <subdiff@gmail.com>
0003 
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #pragma once
0008 
0009 #include "x11_backend.h"
0010 
0011 #include <QList>
0012 
0013 class X11LibinputBackend : public X11Backend
0014 {
0015     Q_OBJECT
0016 
0017     Q_PROPERTY(int deviceCount READ deviceCount CONSTANT)
0018 
0019 public:
0020     explicit X11LibinputBackend(QObject *parent = nullptr);
0021     ~X11LibinputBackend() = default;
0022 
0023     void kcmInit() override;
0024 
0025     bool applyConfig() override;
0026     bool getConfig() override;
0027     bool getDefaultConfig() override;
0028     bool isChangedConfig() const override;
0029     QString errorString() const override
0030     {
0031         return m_errorString;
0032     }
0033 
0034     virtual int deviceCount() const override
0035     {
0036         return 1;
0037     }
0038     virtual QList<QObject *> getDevices() const override
0039     {
0040         return QList<QObject *>(1, m_device);
0041     }
0042 
0043 private:
0044     QObject *m_device;
0045     QString m_errorString = QString();
0046 };