Changeset View
Changeset View
Standalone View
Standalone View
kcms/input/kcm/libinput/libinput_config.h
- This file was added.
1 | /* | ||||
---|---|---|---|---|---|
2 | * Copyright 2018 Roman Gilg <subdiff@gmail.com> | ||||
3 | * | ||||
4 | * This program is free software; you can redistribute it and/or modify | ||||
5 | * it under the terms of the GNU General Public License as published by | ||||
6 | * the Free Software Foundation; either version 2 of the License, or | ||||
7 | * (at your option) any later version. | ||||
8 | * | ||||
9 | * This program is distributed in the hope that it will be useful, | ||||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||||
12 | * GNU General Public License for more details. | ||||
13 | * | ||||
14 | * You should have received a copy of the GNU General Public License | ||||
15 | * along with this program; if not, write to the Free Software | ||||
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||||
17 | */ | ||||
18 | | ||||
19 | #ifndef LIBINPUTCONFIG_H | ||||
20 | #define LIBINPUTCONFIG_H | ||||
21 | | ||||
22 | #include "../configplugin.h" | ||||
23 | | ||||
24 | class QHideEvent; | ||||
25 | class QQuickWidget; | ||||
26 | class KMessageWidget; | ||||
27 | | ||||
28 | class LibinputConfig : public ConfigPlugin | ||||
29 | { | ||||
30 | Q_OBJECT | ||||
31 | | ||||
32 | public: | ||||
33 | explicit LibinputConfig(ConfigContainer *parent, InputBackend *backend); | ||||
34 | virtual ~LibinputConfig() {} | ||||
35 | | ||||
36 | void load() override; | ||||
37 | void save() override; | ||||
38 | void defaults() override; | ||||
39 | | ||||
40 | QSize sizeHint() const override; | ||||
41 | QSize minimumSizeHint() const override; | ||||
42 | | ||||
43 | void hideEvent(QHideEvent *) override {} | ||||
44 | | ||||
45 | private Q_SLOTS: | ||||
46 | void onChange(); | ||||
47 | void onDeviceAdded(bool success); | ||||
48 | void onDeviceRemoved(int index); | ||||
49 | | ||||
50 | private: | ||||
51 | void hideErrorMessage(); | ||||
52 | | ||||
53 | QQuickWidget *m_view; | ||||
54 | KMessageWidget *m_errorMessage; | ||||
55 | | ||||
56 | bool m_initError; | ||||
57 | }; | ||||
58 | | ||||
59 | #endif // LIBINPUTCONFIG_H |