diff --git a/kcontrol/input/CMakeLists.txt b/kcontrol/input/CMakeLists.txt index 2fc6f6ce8..ac834ea6c 100644 --- a/kcontrol/input/CMakeLists.txt +++ b/kcontrol/input/CMakeLists.txt @@ -34,7 +34,7 @@ link_directories( ##### other data ################################ tde_create_translated_desktop( - SOURCE mouse.desktop + SOURCE mouse.desktop touchpad.desktop PO_DIR kcontrol-desktops ) @@ -53,7 +53,7 @@ install( FILES tde_add_kpart( kcm_input AUTOMOC SOURCES mouse.cpp kmousedlg.ui main.cpp logitechmouse.cpp - logitechmouse_base.ui + logitechmouse_base.ui touchpad.cpp LINK themepage-static tdeio-shared ${XCURSOR_LIBRARIES} ${LIBUSB_LIBRARIES} DESTINATION ${PLUGIN_INSTALL_DIR} ) diff --git a/kcontrol/input/main.cpp b/kcontrol/input/main.cpp index d72dd0aa6..b83be7dcd 100644 --- a/kcontrol/input/main.cpp +++ b/kcontrol/input/main.cpp @@ -91,6 +91,17 @@ extern "C" delete config; } + + TDE_EXPORT TDECModule *create_touchpad(TQWidget *parent, const char *) + { + return new TouchpadConfig(parent, "kcminput"); + } + + TDE_EXPORT TDECModule *init_touchpad() + { + TDEConfig *config = new TDEConfig("kcminputrc", true, false); + config->setGroup("Touchpad"); + } } diff --git a/kcontrol/input/touchpad.cpp b/kcontrol/input/touchpad.cpp new file mode 100644 index 000000000..c5fdb5982 --- /dev/null +++ b/kcontrol/input/touchpad.cpp @@ -0,0 +1,59 @@ +/******************************************************************************* + tdecm_touchpad + A touchpad module for the TDE Control Centre + + Copyright © 2024 Mavridis Philippe + + This program is free software: you can redistribute it and/or modify it under + the terms of the GNU General Public License as published by the Free Software + Foundation, either version 3 of the License, or (at your option) any later + version. + + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with + this program. If not, see . + +*******************************************************************************/ + +// TouchpadConfig +#include "touchpad.h" +#include "touchpad.moc" + + +/******************************* TouchpadConfig *******************************/ +TouchpadConfig::TouchpadConfig(TQWidget *parent, const char *name) +{ +} + +void TouchpadConfig::load() +{ +} + +void TouchpadConfig::load(bool useDefaults) +{ +} + +void TouchpadConfig::save() +{ +} + +void TouchpadConfig::defaults() +{ +} + + +/****************************** TouchpadSettings ******************************/ +void TouchpadSettings::load(TDEConfig *cfg) +{ +} + +void TouchpadSettings::save(TDEConfig *cfg) +{ +} + +void TouchpadSettings::apply() +{ +} \ No newline at end of file diff --git a/kcontrol/input/touchpad.desktop b/kcontrol/input/touchpad.desktop new file mode 100644 index 000000000..6a039a61d --- /dev/null +++ b/kcontrol/input/touchpad.desktop @@ -0,0 +1,15 @@ +[Desktop Entry] +Exec=tdecmshell touchpad +Icon=input-touchpad +Type=Application +X-DocPath=kcontrol/touchpad/index.html + +X-TDE-Library=input +X-TDE-FactoryName=touchpad +X-TDE-Init=touchpad +X-TDE-ParentApp=kcontrol + +Name=Touchpad +Comment=Touchpad settings +Keywords=Touchpad;Tap to click;Mouse;Mouse buttons;Input Devices;Button Mapping;Tap;Click;mapping;right handed;left handed; +Categories=Qt;TDE;X-TDE-settings-hardware; \ No newline at end of file diff --git a/kcontrol/input/touchpad.h b/kcontrol/input/touchpad.h new file mode 100644 index 000000000..2c9a366d3 --- /dev/null +++ b/kcontrol/input/touchpad.h @@ -0,0 +1,47 @@ +/******************************************************************************* + tdecm_touchpad + A touchpad module for the TDE Control Centre + + Copyright © 2024 Mavridis Philippe + + This program is free software: you can redistribute it and/or modify it under + the terms of the GNU General Public License as published by the Free Software + Foundation, either version 3 of the License, or (at your option) any later + version. + + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with + this program. If not, see . + +*******************************************************************************/ + +// TDE +#include + +class TouchpadSettings +{ + public: + void load(TDEConfig *); + void save(TDEConfig *); + void apply(bool force = false); + + bool tapToClick; + bool middleButtonEmulation; +} + +class TouchpadConfig : public TDECModule +{ + TQ_OBJECT + + public: + TouchpadConfig(TQWidget *parent, const char *name); + ~TouchpadConfig(); + + void load(); + void load(bool useDefaults); + void save(); + void defaults(); +} \ No newline at end of file