Changeset View
Changeset View
Standalone View
Standalone View
kcms/touchpadx/src/kcm/xlib/touchpadconfigxlib.h
- This file was added.
1 | /* | ||||
---|---|---|---|---|---|
2 | * Copyright (C) 2013 Alexander Mezin <mezin.alexander@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 TOUCHPADCONFIGXLIB_H | ||||
20 | #define TOUCHPADCONFIGXLIB_H | ||||
21 | | ||||
22 | #include "../touchpadconfigplugin.h" | ||||
23 | | ||||
24 | #include <KConfigDialogManager> | ||||
25 | #include <QScopedPointer> | ||||
26 | | ||||
27 | #include "touchpadparameters.h" | ||||
28 | #include "testarea.h" | ||||
29 | #include "kdedsettings.h" | ||||
30 | | ||||
31 | #include "ui_pointermotion.h" | ||||
32 | #include "ui_tap.h" | ||||
33 | #include "ui_scroll.h" | ||||
34 | #include "ui_sensitivity.h" | ||||
35 | #include "ui_kded.h" | ||||
36 | | ||||
37 | class TouchpadConfigContainer; | ||||
38 | class TouchpadBackend; | ||||
39 | class KMessageWidget; | ||||
40 | class OrgKdeTouchpadInterface; | ||||
41 | class CustomConfigDialogManager; | ||||
42 | class QAction; | ||||
43 | class KShortcutsDialog; | ||||
44 | class QTabWidget; | ||||
45 | class KComboBox; | ||||
46 | class QDBusPendingCallWatcher; | ||||
47 | class QHideEvent; | ||||
48 | | ||||
49 | class TouchpadConfigXlib : public TouchpadConfigPlugin | ||||
50 | { | ||||
51 | Q_OBJECT | ||||
52 | | ||||
53 | public: | ||||
54 | explicit TouchpadConfigXlib(TouchpadConfigContainer *parent, | ||||
55 | const QVariantList &args = QVariantList()); | ||||
56 | ~TouchpadConfigXlib() override; | ||||
57 | | ||||
58 | static void kcmInit(); | ||||
59 | | ||||
60 | void load() override; | ||||
61 | void save() override; | ||||
62 | void defaults() override; | ||||
63 | | ||||
64 | void hideEvent(QHideEvent *) override; | ||||
65 | | ||||
66 | private Q_SLOTS: | ||||
67 | void beginTesting(); | ||||
68 | void endTesting(); | ||||
69 | void onChanged(); | ||||
70 | void checkChanges(); | ||||
71 | void loadActiveConfig(); | ||||
72 | void updateTestAreaEnabled(); | ||||
73 | void updateMouseList(); | ||||
74 | void showConfigureNotificationsDialog(); | ||||
75 | void gotReplyFromDaemon(QDBusPendingCallWatcher *); | ||||
76 | | ||||
77 | private: | ||||
78 | QVariantHash getActiveConfig(); | ||||
79 | | ||||
80 | TouchpadParameters m_config; | ||||
81 | | ||||
82 | QScopedPointer<QVariantHash> m_prevConfig; | ||||
83 | CustomConfigDialogManager *m_manager; | ||||
84 | TouchpadDisablerSettings m_daemonSettings; | ||||
85 | KConfigDialogManager *m_daemonConfigManager; | ||||
86 | KMessageWidget *m_errorMessage, *m_configOutOfSyncMessage; | ||||
87 | TestArea *m_testArea; | ||||
88 | OrgKdeTouchpadInterface *m_daemon; | ||||
89 | QAction *m_loadActiveConfiguration; | ||||
90 | bool m_configOutOfSync; | ||||
91 | QScopedPointer<KShortcutsDialog> m_shortcutsDialog; | ||||
92 | QWidget *m_kdedTab; | ||||
93 | QTabWidget *m_tabs; | ||||
94 | KComboBox *m_mouseCombo; | ||||
95 | | ||||
96 | Ui::PointerMotionForm m_pointerMotion; | ||||
97 | Ui::TapForm m_tapping; | ||||
98 | Ui::ScrollForm m_scrolling; | ||||
99 | Ui::SensitivityForm m_sensitivity; | ||||
100 | Ui::KdedForm m_kded; | ||||
101 | }; | ||||
102 | | ||||
103 | #endif // TOUCHPADCONFIGXLIB_H |