summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMavridis Philippe <mavridisf@gmail.com>2024-06-01 22:46:37 +0300
committerMavridis Philippe <mavridisf@gmail.com>2024-06-01 22:57:26 +0300
commitdfa85b5cd2b71375c1d465a5c24c4f584b828999 (patch)
tree4d61fa9bb3152a3b16b845cc1ccda0f784969570
parente8d015be37f007cfc56d74eef8b192d19e96a61b (diff)
downloadtdebase-feat/tdecm_touchpad.tar.gz
tdebase-feat/tdecm_touchpad.zip
Add skeleton for tdecm_touchpad (WIP)feat/tdecm_touchpad
Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>
-rw-r--r--kcontrol/input/CMakeLists.txt4
-rw-r--r--kcontrol/input/main.cpp11
-rw-r--r--kcontrol/input/touchpad.cpp59
-rw-r--r--kcontrol/input/touchpad.desktop15
-rw-r--r--kcontrol/input/touchpad.h47
5 files changed, 134 insertions, 2 deletions
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 <mavridisf@gmail.com>
+
+ 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 <https://www.gnu.org/licenses/>.
+
+*******************************************************************************/
+
+// 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 <mavridisf@gmail.com>
+
+ 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 <https://www.gnu.org/licenses/>.
+
+*******************************************************************************/
+
+// TDE
+#include <tdecmodule.h>
+
+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