Changeset View
Changeset View
Standalone View
Standalone View
kcms/touchpadx/src/kcm/touchpadconfigcontainer.cpp
- This file was copied from kcms/touchpad/src/kcm/touchpadconfigcontainer.cpp.
Show All 12 Lines | |||||
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 | #include "touchpadconfigcontainer.h" | 19 | #include "touchpadconfigcontainer.h" | ||
20 | #include "touchpadconfigplugin.h" | 20 | #include "touchpadconfigplugin.h" | ||
21 | #include "kcm/libinput/touchpadconfiglibinput.h" | | |||
22 | #include "kcm/xlib/touchpadconfigxlib.h" | 21 | #include "kcm/xlib/touchpadconfigxlib.h" | ||
23 | 22 | | |||
24 | #include <KWindowSystem/kwindowsystem.h> | 23 | #include <KWindowSystem/kwindowsystem.h> | ||
25 | 24 | | |||
26 | extern "C" | 25 | extern "C" | ||
27 | { | 26 | { | ||
28 | Q_DECL_EXPORT void kcminit_touchpad() | 27 | Q_DECL_EXPORT void kcminit_touchpad() | ||
29 | { | 28 | { | ||
30 | if (KWindowSystem::isPlatformX11()) { | 29 | if (KWindowSystem::isPlatformX11()) { | ||
31 | TouchpadConfigXlib::kcmInit(); | 30 | TouchpadConfigXlib::kcmInit(); | ||
32 | } | 31 | } | ||
33 | } | 32 | } | ||
34 | } | 33 | } | ||
35 | 34 | | |||
36 | TouchpadConfigContainer::TouchpadConfigContainer(QWidget *parent, const QVariantList &args) | 35 | TouchpadConfigContainer::TouchpadConfigContainer(QWidget *parent, const QVariantList &args) | ||
37 | : KCModule(parent, args) | 36 | : KCModule(parent, args) | ||
38 | { | 37 | { | ||
39 | if (KWindowSystem::isPlatformX11()) { | 38 | if (KWindowSystem::isPlatformX11()) { | ||
40 | m_plugin = new TouchpadConfigXlib(this); | 39 | m_plugin = new TouchpadConfigXlib(this); | ||
41 | } else if (KWindowSystem::isPlatformWayland()) { | | |||
42 | m_plugin = new TouchpadConfigLibinput(this); | | |||
43 | } | 40 | } | ||
44 | } | 41 | } | ||
45 | 42 | | |||
46 | QSize TouchpadConfigContainer::minimumSizeHint() const | 43 | QSize TouchpadConfigContainer::minimumSizeHint() const | ||
47 | { | 44 | { | ||
48 | return m_plugin->minimumSizeHint(); | 45 | return m_plugin->minimumSizeHint(); | ||
49 | } | 46 | } | ||
50 | QSize TouchpadConfigContainer::sizeHint() const | 47 | QSize TouchpadConfigContainer::sizeHint() const | ||
Show All 29 Lines |