summaryrefslogtreecommitdiffstats
path: root/kmilo/thinkpad/kcmthinkpad
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit2bda8f7717adf28da4af0d34fb82f63d2868c31d (patch)
tree8d927b7b47a90c4adb646482a52613f58acd6f8c /kmilo/thinkpad/kcmthinkpad
downloadtdeutils-2bda8f7717adf28da4af0d34fb82f63d2868c31d.tar.gz
tdeutils-2bda8f7717adf28da4af0d34fb82f63d2868c31d.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeutils@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kmilo/thinkpad/kcmthinkpad')
-rw-r--r--kmilo/thinkpad/kcmthinkpad/Makefile.am15
-rw-r--r--kmilo/thinkpad/kcmthinkpad/kcmthinkpad_general.ui307
-rw-r--r--kmilo/thinkpad/kcmthinkpad/kcmthinkpad_general.ui.h36
-rw-r--r--kmilo/thinkpad/kcmthinkpad/main.cpp189
-rw-r--r--kmilo/thinkpad/kcmthinkpad/main.h49
-rw-r--r--kmilo/thinkpad/kcmthinkpad/thinkpad.desktop145
6 files changed, 741 insertions, 0 deletions
diff --git a/kmilo/thinkpad/kcmthinkpad/Makefile.am b/kmilo/thinkpad/kcmthinkpad/Makefile.am
new file mode 100644
index 0000000..4e70c40
--- /dev/null
+++ b/kmilo/thinkpad/kcmthinkpad/Makefile.am
@@ -0,0 +1,15 @@
+kde_module_LTLIBRARIES = kcm_thinkpad.la
+
+kcm_thinkpad_la_SOURCES = kcmthinkpad_general.ui main.cpp
+
+kcm_thinkpad_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries)
+kcm_thinkpad_la_LIBADD = $(LIB_KIO)
+
+INCLUDES= $(all_includes) -DKDE_BINDIR="\"$(bindir)\""
+
+kcm_thinkpad_la_METASOURCES = AUTO
+
+messages: rc.cpp
+ $(XGETTEXT) *.cpp -o $(podir)/kcmthinkpad.pot
+
+xdg_apps_DATA = thinkpad.desktop
diff --git a/kmilo/thinkpad/kcmthinkpad/kcmthinkpad_general.ui b/kmilo/thinkpad/kcmthinkpad/kcmthinkpad_general.ui
new file mode 100644
index 0000000..771b7bf
--- /dev/null
+++ b/kmilo/thinkpad/kcmthinkpad/kcmthinkpad_general.ui
@@ -0,0 +1,307 @@
+<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
+<class>KCMThinkpadGeneral</class>
+<widget class="QWidget">
+ <property name="name">
+ <cstring>KCMThinkpadGeneral</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>559</width>
+ <height>548</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>KVaio: General Options</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>tlOff</cstring>
+ </property>
+ <property name="frameShape">
+ <enum>NoFrame</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>Plain</enum>
+ </property>
+ <property name="text">
+ <string>Could not read /dev/nvram. If you have an IBM Thinkpad load the nvram Linux module &lt;em&gt;insmod nvram&lt;/em&gt; and create the node &lt;em&gt;mknod /dev/nvram c 10 144&lt;/em&gt; then make the device readable &lt;em&gt;chmod 664 /dev/nvram&lt;/em&gt; or writable &lt;em&gt;chmod 666 /dev/nvram&lt;/em&gt;.&lt;p&gt; nvram must be writable for software volume control required for R30/R31 models and for using a custom volume change step.</string>
+ </property>
+ </widget>
+ <widget class="QButtonGroup" row="1" column="0">
+ <property name="name">
+ <cstring>bgGeneral</cstring>
+ </property>
+ <property name="title">
+ <string>Thinkpad Button Options</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QCheckBox" row="0" column="0">
+ <property name="name">
+ <cstring>mCbRun</cstring>
+ </property>
+ <property name="text">
+ <string>Run Thinkpad Buttons KMilo plugin</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="1" column="0">
+ <property name="name">
+ <cstring>mCbSoftwareVolume</cstring>
+ </property>
+ <property name="text">
+ <string>Change volume in software (required by R30/R31)</string>
+ </property>
+ </widget>
+ <widget class="QLayoutWidget" row="2" column="0">
+ <property name="name">
+ <cstring>layout27</cstring>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel" row="4" column="0">
+ <property name="name">
+ <cstring>textLabel2_5</cstring>
+ </property>
+ <property name="text">
+ <string>Command for Mail button:</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="5" column="0">
+ <property name="name">
+ <cstring>textLabel2_6</cstring>
+ </property>
+ <property name="text">
+ <string>Command for FN-Zoom button:</string>
+ </property>
+ </widget>
+ <widget class="KURLRequester" row="2" column="1">
+ <property name="name">
+ <cstring>commandExecHome</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>3</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>1</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ <widget class="QLabel" row="3" column="0">
+ <property name="name">
+ <cstring>textLabel2_4</cstring>
+ </property>
+ <property name="text">
+ <string>Command for Search button:</string>
+ </property>
+ </widget>
+ <widget class="KURLRequester" row="1" column="1">
+ <property name="name">
+ <cstring>commandExec</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>3</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>1</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>volumeStepLabel</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="frameShape">
+ <enum>NoFrame</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>Plain</enum>
+ </property>
+ <property name="text">
+ <string>Volume step (out of 100):</string>
+ </property>
+ </widget>
+ <widget class="KURLRequester" row="5" column="1">
+ <property name="name">
+ <cstring>commandExecZoom</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>3</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>1</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ <widget class="QLabel" row="2" column="0">
+ <property name="name">
+ <cstring>textLabel2_3</cstring>
+ </property>
+ <property name="text">
+ <string>Command for Home button:</string>
+ </property>
+ </widget>
+ <widget class="QSpinBox" row="0" column="1">
+ <property name="name">
+ <cstring>mSpinboxVolumeStep</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>3</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>1</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="maxValue">
+ <number>30</number>
+ </property>
+ <property name="minValue">
+ <number>1</number>
+ </property>
+ </widget>
+ <widget class="KURLRequester" row="3" column="1">
+ <property name="name">
+ <cstring>commandExecSearch</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>3</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>1</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>textLabel2</cstring>
+ </property>
+ <property name="text">
+ <string>Command for Thinkpad button:</string>
+ </property>
+ </widget>
+ <widget class="KURLRequester" row="4" column="1">
+ <property name="name">
+ <cstring>commandExecMail</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>3</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>1</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ </grid>
+ </widget>
+ </grid>
+</widget>
+<customwidgets>
+</customwidgets>
+<connections>
+ <connection>
+ <sender>mCbRun</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>KCMThinkpadGeneral</receiver>
+ <slot>slotChanged()</slot>
+ </connection>
+ <connection>
+ <sender>mCbSoftwareVolume</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>KCMThinkpadGeneral</receiver>
+ <slot>slotChanged()</slot>
+ </connection>
+ <connection>
+ <sender>mSpinboxVolumeStep</sender>
+ <signal>valueChanged(int)</signal>
+ <receiver>KCMThinkpadGeneral</receiver>
+ <slot>slotChanged()</slot>
+ </connection>
+ <connection>
+ <sender>commandExec</sender>
+ <signal>textChanged(const QString&amp;)</signal>
+ <receiver>KCMThinkpadGeneral</receiver>
+ <slot>slotChanged()</slot>
+ </connection>
+ <connection>
+ <sender>commandExecHome</sender>
+ <signal>textChanged(const QString&amp;)</signal>
+ <receiver>KCMThinkpadGeneral</receiver>
+ <slot>slotChanged()</slot>
+ </connection>
+ <connection>
+ <sender>commandExecMail</sender>
+ <signal>textChanged(const QString&amp;)</signal>
+ <receiver>KCMThinkpadGeneral</receiver>
+ <slot>slotChanged()</slot>
+ </connection>
+ <connection>
+ <sender>commandExecSearch</sender>
+ <signal>textChanged(const QString&amp;)</signal>
+ <receiver>KCMThinkpadGeneral</receiver>
+ <slot>slotChanged()</slot>
+ </connection>
+ <connection>
+ <sender>commandExecZoom</sender>
+ <signal>textChanged(const QString&amp;)</signal>
+ <receiver>KCMThinkpadGeneral</receiver>
+ <slot>slotChanged()</slot>
+ </connection>
+</connections>
+<tabstops>
+ <tabstop>mCbRun</tabstop>
+ <tabstop>mCbSoftwareVolume</tabstop>
+ <tabstop>mSpinboxVolumeStep</tabstop>
+ <tabstop>commandExec</tabstop>
+ <tabstop>commandExecHome</tabstop>
+ <tabstop>commandExecSearch</tabstop>
+ <tabstop>commandExecMail</tabstop>
+</tabstops>
+<includes>
+ <include location="local" impldecl="in implementation">kcmthinkpad_general.ui.h</include>
+</includes>
+<signals>
+ <signal>changed();</signal>
+</signals>
+<slots>
+ <slot>slotChanged()</slot>
+</slots>
+<layoutdefaults spacing="6" margin="11"/>
+<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/>
+<includehints>
+ <includehint>kurlrequester.h</includehint>
+ <includehint>kpushbutton.h</includehint>
+ <includehint>kurlrequester.h</includehint>
+ <includehint>kpushbutton.h</includehint>
+ <includehint>kurlrequester.h</includehint>
+ <includehint>kpushbutton.h</includehint>
+ <includehint>kurlrequester.h</includehint>
+ <includehint>kpushbutton.h</includehint>
+ <includehint>kurlrequester.h</includehint>
+ <includehint>kpushbutton.h</includehint>
+</includehints>
+</UI>
diff --git a/kmilo/thinkpad/kcmthinkpad/kcmthinkpad_general.ui.h b/kmilo/thinkpad/kcmthinkpad/kcmthinkpad_general.ui.h
new file mode 100644
index 0000000..6ccc675
--- /dev/null
+++ b/kmilo/thinkpad/kcmthinkpad/kcmthinkpad_general.ui.h
@@ -0,0 +1,36 @@
+/*
+ * kcmthinkpad_general.uih
+ *
+ * Copyright (C) 2004 Jonathan Riddell <jr@jriddell.org>
+ *
+ * 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 2 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, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+/****************************************************************************
+** ui.h extension file, included from the uic-generated form implementation.
+**
+** If you wish to add, delete or rename functions or slots use
+** Qt Designer which will update this file, preserving your code. Create an
+** init() function in place of a constructor, and a destroy() function in
+** place of a destructor.
+*****************************************************************************/
+#include <kdialog.h>
+
+void KCMThinkpadGeneral::slotChanged() {
+ emit(changed());
+}
+
+
+
diff --git a/kmilo/thinkpad/kcmthinkpad/main.cpp b/kmilo/thinkpad/kcmthinkpad/main.cpp
new file mode 100644
index 0000000..1b8b4bd
--- /dev/null
+++ b/kmilo/thinkpad/kcmthinkpad/main.cpp
@@ -0,0 +1,189 @@
+/*
+ * main.cpp
+ *
+ * Copyright (C) 2004 Jonathan Riddell <jr@jriddell.org>
+ *
+ * Based on kcm_kvaio
+ * Copyright (C) 2003 Mirko Boehm (mirko@kde.org)
+ *
+ * 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 2 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, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include <qlabel.h>
+#include <qlayout.h>
+#include <qcheckbox.h>
+#include <qspinbox.h>
+#include <qfile.h>
+#include <qbuttongroup.h>
+
+#include <dcopclient.h>
+#include <kgenericfactory.h>
+#include <kaboutdata.h>
+#include <kdebug.h>
+#include <kconfig.h>
+#include <kurlrequester.h>
+#include <kcmodule.h>
+
+#ifdef Q_OS_FREEBSD
+#include <sys/types.h>
+#include <sys/sysctl.h>
+#endif
+
+#include "kcmthinkpad_general.h"
+
+#include <dcopclient.h>
+
+#include "main.h"
+#include "main.moc"
+
+typedef KGenericFactory<KCMThinkpadModule, QWidget> KCMThinkpadModuleFactory;
+K_EXPORT_COMPONENT_FACTORY( kcm_thinkpad, KCMThinkpadModuleFactory("kcmthinkpad"))
+
+#define CONFIG_FILE "kmilodrc"
+
+KCMThinkpadModule::KCMThinkpadModule(QWidget* parent, const char* name, const QStringList&)
+ : KCModule(KCMThinkpadModuleFactory::instance(), parent, name) {
+ KAboutData* about =
+ new KAboutData(I18N_NOOP("kcmthinkpad"),
+ I18N_NOOP("KDE Control Module for IBM Thinkpad "
+ "Laptop Hardware"),
+ 0, 0, KAboutData::License_GPL,
+ "(c) 2004 Jonathan Riddell");
+
+ about->addAuthor("Jonathan Riddell",
+ I18N_NOOP("Original author"),
+ "jr@jriddell.org");
+ setAboutData( about );
+
+ QVBoxLayout* layout = new QVBoxLayout(this);
+ m_KCMThinkpadGeneral = new KCMThinkpadGeneral(this);
+ layout->addWidget( m_KCMThinkpadGeneral );
+ layout->addStretch();
+
+ load();
+
+ //try and open /dev/nvram
+ m_nvramReadable = false;
+ m_nvramWriteable = false;
+
+#ifdef Q_OS_FREEBSD
+ // Look if the sysctl tree of acpi_ibm is in place
+ u_int n = 0;
+ size_t len = sizeof(n);
+ if (m_nvramReadable = ( sysctlbyname("dev.acpi_ibm.0.volume", &n, &len, NULL, 0) != -1 ))
+ m_nvramWriteable = ( sysctlbyname("dev.acpi_ibm.0.volume", NULL, NULL, &n, len) != -1 );
+
+ if (!m_nvramReadable) {
+ setButtons(buttons() & ~Default);
+ m_KCMThinkpadGeneral->bgGeneral->setEnabled(false);
+ m_KCMThinkpadGeneral->tlOff->setText(i18n("In order to use the Thinkpad Buttons KMilo Plugin, "
+ "you have to load the acpi_ibm(4) driver."));
+ } else if (!m_nvramWriteable) {
+ m_KCMThinkpadGeneral->tlOff->setText(i18n("Could not write to dev.acpi_ibm.0.volume. "
+ "Using software volume, required for "
+ "R30/R31 models, or using a custom volume "
+ "change step is disabled."));
+#else
+ QFile nvramFile(m_nvramFile);
+ if ( nvramFile.open(IO_ReadOnly) ) {
+ m_nvramReadable = true;
+ nvramFile.close();
+ }
+ if ( nvramFile.open(IO_WriteOnly) ) {
+ m_nvramWriteable = true;
+ nvramFile.close();
+ }
+
+ if (!m_nvramReadable) {
+ setButtons(buttons() & ~Default);
+ m_KCMThinkpadGeneral->bgGeneral->setEnabled(false);
+ } else if (!m_nvramWriteable) {
+ m_KCMThinkpadGeneral->tlOff->setText(i18n("Could not write to %1. "
+ "To use the software volume, required for "
+ "R30/R31 models and to use a custom volume "
+ "change step, set the nvram device to world "
+ "writeable: <em>chmod 666 "
+ "/dev/nvram</em>").arg(m_nvramFile));
+#endif
+ } else {
+ m_KCMThinkpadGeneral->tlOff->setText(i18n("Thinkpad Buttons KMilo Plugin Ready For Configuration"));
+ }
+
+ connect( m_KCMThinkpadGeneral, SIGNAL(changed()), SLOT(changed()));
+
+}
+
+void KCMThinkpadModule::save() {
+ if (!m_nvramReadable) {
+ return;
+ }
+ DCOPClient client;
+
+ KConfig config(CONFIG_FILE);
+ config.setGroup("thinkpad");
+
+ config.writeEntry("run", m_KCMThinkpadGeneral->mCbRun->isChecked());
+ config.writeEntry("softwareVolume", m_KCMThinkpadGeneral->mCbSoftwareVolume->isChecked());
+ config.writeEntry("volumeStep", m_KCMThinkpadGeneral->mSpinboxVolumeStep->value());
+ config.writeEntry("buttonThinkpad", m_KCMThinkpadGeneral->commandExec->url());
+ config.writeEntry("buttonHome", m_KCMThinkpadGeneral->commandExecHome->url());
+ config.writeEntry("buttonSearch", m_KCMThinkpadGeneral->commandExecSearch->url());
+ config.writeEntry("buttonMail", m_KCMThinkpadGeneral->commandExecMail->url());
+ config.writeEntry("buttonZoom", m_KCMThinkpadGeneral->commandExecZoom->url());
+ config.sync();
+
+ if (client.attach()) {
+ QByteArray data, replyData;
+ QCString replyType;
+
+ if (!client.call("kded", "kmilod", "reconfigure()", data, replyType, replyData)) {
+ kdDebug() << "KCMThinkpad::showTextMsg: "
+ << "there was an error using DCOP on kmilod::reconfigure()." << endl;
+ }
+ } else {
+ kdDebug() << "KCMThinkpadModule: cannot attach to DCOP server, "
+ << "no automatic config update." << endl;
+ }
+}
+
+void KCMThinkpadModule::load() {
+ load( false );
+}
+
+void KCMThinkpadModule::load(bool useDefaults) {
+ KConfig config(CONFIG_FILE);
+
+ config.setReadDefaults( useDefaults );
+
+ config.setGroup("thinkpad");
+
+ m_KCMThinkpadGeneral->mCbRun->setChecked(config.readBoolEntry("run", false));
+ m_KCMThinkpadGeneral->mCbSoftwareVolume->setChecked(config.readBoolEntry("softwareVolume", true));
+ m_KCMThinkpadGeneral->mSpinboxVolumeStep->setValue(config.readNumEntry("volumeStep", 14));
+ m_KCMThinkpadGeneral->commandExec->setURL(config.readEntry("buttonThinkpad", KDE_BINDIR "/konsole"));
+ m_KCMThinkpadGeneral->commandExecHome->setURL(config.readEntry("buttonHome", KDE_BINDIR "/konqueror"));
+ m_KCMThinkpadGeneral->commandExecSearch->setURL(config.readEntry("buttonSearch", KDE_BINDIR "/kfind"));
+ m_KCMThinkpadGeneral->commandExecMail->setURL(config.readEntry("buttonMail", KDE_BINDIR "/kmail"));
+ m_KCMThinkpadGeneral->commandExecZoom->setURL(config.readEntry("buttonZoom", KDE_BINDIR "/ksnapshot"));
+ m_nvramFile = config.readEntry("nvram", "/dev/nvram");
+
+ emit changed( useDefaults );
+}
+
+void KCMThinkpadModule::defaults() {
+ load( true );
+}
+
diff --git a/kmilo/thinkpad/kcmthinkpad/main.h b/kmilo/thinkpad/kcmthinkpad/main.h
new file mode 100644
index 0000000..53534ed
--- /dev/null
+++ b/kmilo/thinkpad/kcmthinkpad/main.h
@@ -0,0 +1,49 @@
+/*
+ * main.h
+ *
+ * Copyright (C) 2004 Jonathan Riddell <jr@jriddell.org>
+ *
+ * Based on kcm_kvaio
+ * Copyright (C) 2003 Mirko Boehm (mirko@kde.org)
+ *
+ * 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 2 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, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef KCMTHINKPAD_MAIN_H
+#define KCMTHINKPAD_MAIN_H
+
+#include <kcmodule.h>
+
+class KCMThinkPadGeneral;
+
+class KCMThinkpadModule : public KCModule {
+ Q_OBJECT
+
+ public:
+ KCMThinkpadModule(QWidget* parent, const char* name, const QStringList&);
+
+ void save();
+ void load();
+ void load(bool useDefaults);
+ void defaults();
+ private:
+ KCMThinkpadGeneral* m_KCMThinkpadGeneral;
+ QString m_nvramFile;
+ bool m_nvramReadable;
+ bool m_nvramWriteable;
+};
+
+#endif
diff --git a/kmilo/thinkpad/kcmthinkpad/thinkpad.desktop b/kmilo/thinkpad/kcmthinkpad/thinkpad.desktop
new file mode 100644
index 0000000..720a69f
--- /dev/null
+++ b/kmilo/thinkpad/kcmthinkpad/thinkpad.desktop
@@ -0,0 +1,145 @@
+[Desktop Entry]
+Type=Application
+Exec=kcmshell thinkpad
+Icon=laptop
+DocPath=kcontrol/thinkpad/index.html
+
+X-KDE-Library=thinkpad
+X-KDE-ParentApp=kcontrol
+
+Name=IBM Thinkpad Laptop
+Name[ar]=حاسوب IBM Thinkpad المحمول
+Name[bg]=Лаптоп IBM Thinkpad
+Name[br]=Hezoug IBM Thinkpad
+Name[bs]=IBM Thinkpad laptop
+Name[ca]=Portàtil IBM Thinkpad
+Name[cy]=Gliniadur IBM Thinkpad
+Name[da]=IBM Thinkpad bærbar
+Name[de]=IBM Thinkpad Notebook
+Name[el]=Φορητός υπολογιστής IBM Thinkpad
+Name[es]=Portátil IBM Thinkpad
+Name[et]=IBM Thinkpadi sülearvuti
+Name[eu]=IBM Thinkpad Magalekoa
+Name[fa]=IBM Thinkpad رایانۀ کیفی
+Name[fi]=IBM Thinkpad -kannettava
+Name[fr]=Portable Thinkpad d'IBM
+Name[ga]=Ríomhaire Glúine IBM Thinkpad
+Name[he]=מחשב ברכיים מסוג IBM Thinkpad
+Name[hu]=IBM Thinkpad noteszgép
+Name[is]=IBM ferðavél
+Name[it]=Portatile IBM Thinkpad
+Name[ja]=IBM シンクパッド ラップトップ
+Name[kk]=IBM Thinkpad ноутбугі
+Name[km]=កុំព្យូទ័រ​យួរដៃ IBM Thinkpad
+Name[mk]=Лаптоп IBM Thinkpad
+Name[nb]=IBM Thinkpad Bærbar PC
+Name[nds]=IBM Thinkpad-Klappreekner
+Name[ne]=IBM थिङ्कप्याड ल्यापटप
+Name[nn]=IBM Thinkpad-bærbar
+Name[pa]=IBM Thinkpad ਲੈਪਟਾਪ
+Name[pl]=Laptop IBM Thinkpad
+Name[pt]=Portátil IBM Thinkpad
+Name[pt_BR]=Laptop IBM Thinkpad
+Name[ro]=Laptop IBM Thinkpad
+Name[ru]=Ноутбук IBM Thinkpad
+Name[sk]=IBM Thinkpad
+Name[sl]=Prenosnik IBM Thinkpad
+Name[sr]=IBM-ов Thinkpad лаптоп
+Name[sr@Latn]=IBM-ov Thinkpad laptop
+Name[sv]=IBM Thinkpad bärbar dator
+Name[ta]=ஐபிஎம் திங்க்பாட் மடிக்கணினி
+Name[tr]=IBM Thinkpad Dizüstü
+Name[uk]=Лептоп IBM Thinkpad
+Name[uz]=IBM Thinkpad laptopi
+Name[uz@cyrillic]=IBM Thinkpad лаптопи
+Name[zh_CN]=ThinkPad 便携电脑
+Name[zh_TW]=IBM Thinkpad 筆記型電腦
+Comment=Configure the KDE Interface to the IBM Thinkpad Special Controls
+Comment[ar]=إعداد واجهة كدى لمُتَحكّمات IBM Thinkpad الخاصة
+Comment[bg]=Настройване на IBM Thinkpad
+Comment[bs]=Podesite KDE interfejs za IBM Thinkpad posebne kontrole
+Comment[ca]=Configura la interfície entre KDE i els controls especials de IBM Thinkpad
+Comment[cs]=Nastavení KDE rozhraní ovládání notebooků IBM Thinkpad
+Comment[cy]=Ffurfweddu'r Rhyngwyneb KDE i'r Rheolau Arbennig IBM Thinkpad
+Comment[da]=Indstil KDE's grænseflade til IBM Thinkpads specielle kontroller
+Comment[de]=KDE Schnittstelle zu den Sonderfunktionen von IBM Thinkpads einrichten
+Comment[el]=Ρυθμίστε το περιβάλλον χρήσης του KDE για τα ειδικά χειριστήρια του IBM Thinkpad
+Comment[es]=Configurar la interfaz de KDE para los controles especiales del IBM Thinkpad
+Comment[et]=KDE liides IBM Thinkpadi eriklahvide seadistamiseks
+Comment[eu]=IBM Thinkpad-en Aginte Berezientzako KDE Interfazea Konfiguratu
+Comment[fa]=پیکربندی واسط KDEدر کلیدهای مهار ویژۀ IBM Thinkpad
+Comment[fi]=Aseta KDE:n liityntää IBM Thinkpadin ohjelmoitavalle keskeytysajurille
+Comment[fr]=Configuration de l'interface KDE pour le paramètrage des Thinkpad d'IBM
+Comment[ga]=Cumraigh comhéadan KDE do Rialtáin Speisialta IBM Thinkpad
+Comment[he]=הגדר את המנשק של KDE להתאים למקשים המיוחדים של IBM Thinkpad
+Comment[hu]=Az IBM Thinkpad noteszgépek speciális kezelőelemeinek beállítása
+Comment[is]=Stilla viðmót KDE á IBM Thinkpad stýringuna
+Comment[it]=Configura l'interfaccia KDE ai controlli speciali dei Thinkpad IBM
+Comment[ja]=IBM シンクパッド特殊コントロールの KDE インターフェースを設定
+Comment[ka]= KDE ინტერფეისის IBM Thinkpad-ის სპეციალური კონტროლებისთვის კონფიგურაცია
+Comment[kk]=IBM Thinkpad арнаулы тетіктерінің KDE интерфейсін баптау
+Comment[km]=កំណត់​រចនា​សម្ព័ន្ធ​ចំណុច​ប្រទាក់ KDE ទៅ​ការត្រួតពិនិត្យ IBM Thinkpad ពិសេស
+Comment[lt]=IBM Thinkpad ypatingiems valdymo moduliams KDE sąsaja
+Comment[mk]=Го конфигурира интерфејсот на KDE за спец. контроли на IBM Thinkpad
+Comment[nb]=Sett opp KDE-grensesnitt til IBM Thinkpad spesial kontroller
+Comment[nds]=KDE-Koppelsteedinstellen för de IBM Thinkpad-Sünnerfunkschonenkuntrull
+Comment[ne]=IBM थिङ्कप्याड विशेष नियन्त्रणका लागि KDE इन्टरफेस कन्फिगर गर्नुहोस्
+Comment[nl]=Voor het instellen van KDE's communicatie met de IBM Thinkpad Special Controls
+Comment[nn]=Set opp KDE-grensesnittet til spesialfunksjonar på IBM Thinkpad
+Comment[pa]=IBM ਥਿੰਕਪੈਂਡ ਕੰਟਰੋਲਾਂ ਲਈ KDE ਇੰਟਰਫੇਸ ਸੰਰਚਨਾ
+Comment[pl]=Konfiguracja specjalnych funkcji IBM Thinkpad
+Comment[pt]=Configurar a Interface para o KDE dos Comandos Especiais do IBM Thinkpad
+Comment[pt_BR]=Configura a Interface do KDE para os Controles Especiais do IBM Thinkpad
+Comment[ro]=Configurează interfaţa KDE către laptop-uri IBM Thinkpad
+Comment[ru]=Настройка интерфейса KDE для специальных клавиш ноутбука IBM Thinkpad
+Comment[sk]=Nastavenie rozhrania KDE k špeciálnym ovládacím prvkom notebooku IBM Thinkpad
+Comment[sl]=Nastavite vmesnik KDE za posebne kontrole IBM Thinkpada
+Comment[sr]=Подесите KDE-ов интерфејс за посебне контроле IBM-ових Thinkpad-ова
+Comment[sr@Latn]=Podesite KDE-ov interfejs za posebne kontrole IBM-ovih Thinkpad-ova
+Comment[sv]=Anpassa KDE:s gränssnitt till IBM Thinkpads specialstyrning
+Comment[ta]=ஐபிஎம் திங்க்பேட் விசேஷ கட்டுப்பாட்டிற்கு கேடிஇ இடைமுகத்தை வடிவமை
+Comment[tr]=KDE Arayüzünü Sony IBM Thinkpad Özel Denetimlerine Ayarla
+Comment[uk]=Налаштування інтерфейсу KDE до спеціальних функцій IBM Thinkpad
+Comment[zh_CN]=配置 KDE 界面使用 ThinkPad 特殊控制
+Comment[zh_TW]=設定 IBM Thinkpad 特殊控制的 KDE 介面
+Keywords=IBM, Thinkpad, brightness, mute, Jog Dial
+Keywords[bs]=IBM, Thinkpad, brightness, mute, Jog Dial, svjetlost
+Keywords[ca]=IBM, Thinkpad, brillantor, silenci, Jog Dial
+Keywords[cs]=IBM,Thinkpad,jas,ztlumení,Jog Dial
+Keywords[cy]=IBM,Thinkpad,gloywder, mud, Jog Dial
+Keywords[da]=IBM. Thinkpad, lysstyrke, stum, Jog Dial
+Keywords[de]=IBM, Thinkpad, Helligkeit, Abschalten, Jog Dial
+Keywords[el]=IBM, Thinkpad, φωτεινότητα, κλείσιμο ήχου, Jog Dial
+Keywords[es]=IBM, Thinkpad, brillo, mute, Jog Dial
+Keywords[et]=IDM, Thinkpad, heledus, tumm, Jog Dial
+Keywords[eu]=IBM, Thinkpad, distira, mutu, Jog Dial
+Keywords[fa]=IBM، Thinkpad، روشنایی، بدون صدا، Jog Dial
+Keywords[fi]=IBM, Thinkpad, kirkkaus, vaimenna, Jog Dial
+Keywords[fr]=IBM, Thinkpad, luminosité, sourdine, mute, Jog Dial
+Keywords[ga]=IBM, Thinkpad, gile, gan fuaim, Jog Dial
+Keywords[hu]=IBM,Thinkpad,fényerő,elnémítás,tárcsagomb
+Keywords[it]=IBM,Thinkpad,luminosità,muto,Jog Dial
+Keywords[ja]=IBM, シンクパッド, 明るさ, ミュート, ジョグダイアル
+Keywords[mk]=IBM, Thinkpad, brightness, mute, Jog Dial, осветленост, пригушување
+Keywords[nb]=IBM, Thinkpad, lysstyrke, dempet, Jog Dial
+Keywords[nds]=IBM, Thinkpad, Helligkeit, stumm, Jog Dial
+Keywords[ne]=IBM, थिङ्कप्याड, चम्किलोपना, चुप लाग्नु, जोग डायल
+Keywords[nl]=IBM, Thinkpad, brightness, mute, Jog Dial, Helderheid, dempen
+Keywords[nn]=IBM,Thinkpad,lysstyrke,demping,snurrehjul
+Keywords[pa]=IBM, Thinkpad, brightness, mute, Jog Dial, ਲੈਪਟਾਪ
+Keywords[pl]=IBM, Thinkpad, jasność, wycisz, Jog Dial
+Keywords[pt]=IBM, Thinkpad, brilho, sem som, Jog Dial
+Keywords[pt_BR]=IBM,Thinkpad,brilho, mudo, Jog Dial
+Keywords[ro]=IBM,Thinkpad,strălucire,fără sunet,jog dial
+Keywords[ru]=IBM, Thinkpad, brightness, mute, Jog Dial, яркость, звук
+Keywords[sk]=IBM, Thinkpad,jas,potichu
+Keywords[sl]=IBM, Thinkpad, svetlost, tiho, Jog Dial
+Keywords[sr]=Sony, Vaio, kvaio, brightness, mute, Jog Dial, светлина
+Keywords[sr@Latn]=Sony, Vaio, kvaio, brightness, mute, Jog Dial, svetlina
+Keywords[sv]=IBM, Thinkpad, ljusstyrka, tyst, rullhjul
+Keywords[ta]=ஐபிஎம், திங்க்பேட்,ஒளித்தன்மை,ஓசையற்ற,ஜோக் டையல்
+Keywords[tr]=IBM, Thinkpad, parlaklık, sessiz, gösterme itmesi
+Keywords[uk]=IBM, Thinkpad, яскравість, вимкнення звуку, Jog Dial
+Keywords[zh_CN]=IBM, Lenovo, Thinkpad, brightness, mute, Jog Dial,亮度,静音,联想,导航键
+
+Categories=Qt;KDE;X-KDE-settings-system;