Changeset View
Changeset View
Standalone View
Standalone View
kcms/touchpadx/src/kcm/touchpadconfigplugin.h
- This file was moved from kcms/touchpad/src/kcm/libinput/touchpadconfiglibinput.h.
Show All 10 Lines | |||||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | 12 | * GNU General Public License for more details. | ||
13 | * | 13 | * | ||
14 | * You should have received a copy of the GNU General Public License | 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 | 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. | 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
17 | */ | 17 | */ | ||
18 | 18 | | |||
19 | #ifndef TOUCHPADCONFIGLIBINPUT_H | 19 | #ifndef TOUCHPADCONFIGPLUGIN_H | ||
20 | #define TOUCHPADCONFIGLIBINPUT_H | 20 | #define TOUCHPADCONFIGPLUGIN_H | ||
21 | 21 | | |||
22 | #include "../touchpadconfigplugin.h" | 22 | #include <QWidget> | ||
23 | 23 | | |||
24 | class TouchpadConfigContainer; | ||||
24 | class TouchpadBackend; | 25 | class TouchpadBackend; | ||
25 | class QHideEvent; | | |||
26 | class QQuickWidget; | | |||
27 | class KMessageWidget; | | |||
28 | 26 | | |||
29 | class TouchpadConfigLibinput : public TouchpadConfigPlugin | 27 | class TouchpadConfigPlugin : public QWidget | ||
30 | { | 28 | { | ||
31 | Q_OBJECT | 29 | Q_OBJECT | ||
32 | 30 | | |||
33 | public: | 31 | public: | ||
34 | explicit TouchpadConfigLibinput(TouchpadConfigContainer *parent, | 32 | explicit TouchpadConfigPlugin(QWidget *parent); | ||
35 | const QVariantList &args = QVariantList()); | 33 | virtual ~TouchpadConfigPlugin() {} | ||
36 | virtual ~TouchpadConfigLibinput() {} | | |||
37 | | ||||
38 | void load() override; | | |||
39 | void save() override; | | |||
40 | void defaults() override; | | |||
41 | 34 | | |||
42 | QSize sizeHint() const override; | 35 | virtual void load() {} | ||
43 | QSize minimumSizeHint() const override; | 36 | virtual void save() {} | ||
37 | virtual void defaults() {} | ||||
44 | 38 | | |||
45 | void hideEvent(QHideEvent *) override {} | 39 | void hideEvent(QHideEvent *) override {} | ||
46 | 40 | | |||
47 | private Q_SLOTS: | 41 | protected: | ||
48 | void onChange(); | 42 | TouchpadConfigContainer *m_parent; | ||
49 | void onTouchpadAdded(bool success); | 43 | TouchpadBackend *m_backend; | ||
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 | }; | 44 | }; | ||
60 | 45 | | |||
61 | #endif // TOUCHPADCONFIGLIBINPUT_H | 46 | #endif // TOUCHPADCONFIGPLUGIN_H |