Changeset View
Changeset View
Standalone View
Standalone View
kcms/touchpad/src/kcm/libinput/touchpadconfiglibinput.h
- This file was added.
1 | /* | ||||
---|---|---|---|---|---|
2 | * Copyright 2016 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 TOUCHPADCONFIGLIBINPUT_H | ||||
20 | #define TOUCHPADCONFIGLIBINPUT_H | ||||
21 | | ||||
22 | #include "../touchpadconfigplugin.h" | ||||
23 | | ||||
24 | class TouchpadBackend; | ||||
25 | class QHideEvent; | ||||
26 | class QQuickWidget; | ||||
27 | class KMessageWidget; | ||||
28 | | ||||
29 | class TouchpadConfigLibinput : public TouchpadConfigPlugin | ||||
30 | { | ||||
31 | Q_OBJECT | ||||
32 | | ||||
33 | public: | ||||
34 | explicit TouchpadConfigLibinput(TouchpadConfigContainer *parent, | ||||
35 | const QVariantList &args = QVariantList()); | ||||
36 | virtual ~TouchpadConfigLibinput() {} | ||||
37 | | ||||
38 | virtual void load(); | ||||
39 | virtual void save(); | ||||
40 | virtual void defaults(); | ||||
41 | | ||||
42 | QSize sizeHint() const; | ||||
43 | QSize minimumSizeHint() const; | ||||
44 | | ||||
45 | virtual void hideEvent(QHideEvent *) {} | ||||
46 | | ||||
47 | private Q_SLOTS: | ||||
48 | void onChange(); | ||||
49 | void onTouchpadAdded(bool success); | ||||
50 | void onTouchpadRemoved(int index); | ||||
51 | | ||||
52 | private: | ||||
53 | void hideErrorMessage(); | ||||
54 | | ||||
55 | QQuickWidget *m_view; | ||||
56 | KMessageWidget *m_errorMessage; | ||||
57 | | ||||
58 | bool m_initError; | ||||
59 | }; | ||||
60 | | ||||
61 | #endif // TOUCHPADCONFIGLIBINPUT_H |