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