From 2bda8f7717adf28da4af0d34fb82f63d2868c31d Mon Sep 17 00:00:00 2001 From: toma Date: Wed, 25 Nov 2009 17:56:58 +0000 Subject: 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 --- kmilo/kmilo_kvaio/kcmkvaio/Makefile.am | 15 ++ kmilo/kmilo_kvaio/kcmkvaio/kcmkvaio_general.ui | 273 +++++++++++++++++++++++ kmilo/kmilo_kvaio/kcmkvaio/kcmkvaio_general.ui.h | 15 ++ kmilo/kmilo_kvaio/kcmkvaio/kvaio.desktop | 146 ++++++++++++ kmilo/kmilo_kvaio/kcmkvaio/main.cpp | 176 +++++++++++++++ kmilo/kmilo_kvaio/kcmkvaio/main.h | 53 +++++ 6 files changed, 678 insertions(+) create mode 100644 kmilo/kmilo_kvaio/kcmkvaio/Makefile.am create mode 100644 kmilo/kmilo_kvaio/kcmkvaio/kcmkvaio_general.ui create mode 100644 kmilo/kmilo_kvaio/kcmkvaio/kcmkvaio_general.ui.h create mode 100644 kmilo/kmilo_kvaio/kcmkvaio/kvaio.desktop create mode 100644 kmilo/kmilo_kvaio/kcmkvaio/main.cpp create mode 100644 kmilo/kmilo_kvaio/kcmkvaio/main.h (limited to 'kmilo/kmilo_kvaio/kcmkvaio') diff --git a/kmilo/kmilo_kvaio/kcmkvaio/Makefile.am b/kmilo/kmilo_kvaio/kcmkvaio/Makefile.am new file mode 100644 index 0000000..6555b6c --- /dev/null +++ b/kmilo/kmilo_kvaio/kcmkvaio/Makefile.am @@ -0,0 +1,15 @@ +kde_module_LTLIBRARIES = kcm_kvaio.la + +kcm_kvaio_la_SOURCES = kcmkvaio_general.ui main.cpp + +kcm_kvaio_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries) +kcm_kvaio_la_LIBADD = ../kvaiodriverinterface.lo $(LIB_KDEUI) + +INCLUDES= $(all_includes) + +kcm_kvaio_la_METASOURCES = AUTO + +messages: rc.cpp + $(XGETTEXT) *.cpp -o $(podir)/kcmkvaio.pot + +xdg_apps_DATA = kvaio.desktop diff --git a/kmilo/kmilo_kvaio/kcmkvaio/kcmkvaio_general.ui b/kmilo/kmilo_kvaio/kcmkvaio/kcmkvaio_general.ui new file mode 100644 index 0000000..ac376f3 --- /dev/null +++ b/kmilo/kmilo_kvaio/kcmkvaio/kcmkvaio_general.ui @@ -0,0 +1,273 @@ + +KCMKVaioGeneral + + + KCMKVaioGeneral + + + + 0 + 0 + 536 + 226 + + + + KVaio: General Options + + + + unnamed + + + 0 + + + + tlOff + + + NoFrame + + + Plain + + + Cannot find the <i>Sony Programmable Interrupt Controller</i>. If this is a Sony Vaio Laptop, make sure the <b>sonypi</b> driver module loads without failures. + + + + + frameMain + + + NoFrame + + + Plain + + + + unnamed + + + 0 + + + + bgBattery + + + System Power + + + + unnamed + + + + mTLBattery + + + Remaining battery capacity: + + + AlignVCenter|AlignRight + + + + + mKPBattery + + + + + kledAC + + + Off + + + Rectangular + + + + 0 + 255 + 0 + + + + + + tlAC + + + + + + + AC + + + AlignVCenter|AlignLeft + + + + + kledBat1 + + + + 5 + 5 + 0 + 0 + + + + Off + + + Rectangular + + + + 255 + 255 + 0 + + + + + + tlBat1 + + + + + + + Bat 1 + + + AlignVCenter|AlignLeft + + + + + kledBat2 + + + Off + + + Rectangular + + + Raised + + + + 255 + 255 + 0 + + + + + + tlBat2 + + + + + + + Bat 2 + + + AlignVCenter|AlignLeft + + + + + + + bgGeneral + + + Other Options + + + + unnamed + + + + mCbPowerMsgs + + + Periodically inform about battery and AC adapter status + + + + + mCbBackButtonMsg + + + Show battery and AC status on Back button press + + + + + cbReportUnknownEvents + + + Report unhandled events using On Screen Display + + + + + + + + + + + cbReportUnknownEvents + toggled(bool) + KCMKVaioGeneral + slotChanged() + + + mCbPowerMsgs + toggled(bool) + KCMKVaioGeneral + slotChanged() + + + mCbBackButtonMsg + toggled(bool) + KCMKVaioGeneral + slotChanged() + + + + kcmkvaio_general.ui.h + + + changed(); + + + slotChanged() + + + + + kprogress.h + kled.h + kled.h + kled.h + + diff --git a/kmilo/kmilo_kvaio/kcmkvaio/kcmkvaio_general.ui.h b/kmilo/kmilo_kvaio/kcmkvaio/kcmkvaio_general.ui.h new file mode 100644 index 0000000..96d4938 --- /dev/null +++ b/kmilo/kmilo_kvaio/kcmkvaio/kcmkvaio_general.ui.h @@ -0,0 +1,15 @@ +/**************************************************************************** +** 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 + +void KCMKVaioGeneral::slotChanged() +{ + emit(changed()); +} + diff --git a/kmilo/kmilo_kvaio/kcmkvaio/kvaio.desktop b/kmilo/kmilo_kvaio/kcmkvaio/kvaio.desktop new file mode 100644 index 0000000..12be7eb --- /dev/null +++ b/kmilo/kmilo_kvaio/kcmkvaio/kvaio.desktop @@ -0,0 +1,146 @@ +[Desktop Entry] +Type=Application +Exec=kcmshell kvaio +Icon=laptop +DocPath=kcontrol/kvaio/index.html + +X-KDE-Library=kvaio +X-KDE-ParentApp=kcontrol + +Name=Sony Vaio Laptop +Name[ar]=حاسوب سونى فايو المحمولة +Name[bg]=Лаптоп Sony Vaio +Name[br]=Hezoug Sony Vaio +Name[bs]=Sony Vaio laptop +Name[ca]=Portàtil Sony Vaio +Name[cs]=Sony Vaio notebook +Name[cy]=Gluniadur Sony Vaio +Name[da]=Sony Vaio bærbar +Name[de]=Sony Vaio Notebook +Name[el]=Φορητός υπολογιστής Sony Vaio +Name[es]=Portátil Sony Vaio +Name[et]=Sony Vaio sülearvuti +Name[eu]=Sony Vaio Magalekoa +Name[fa]=Sony Vaio رایانۀ کیفی +Name[fi]=Sony Vaio -liitännäinen +Name[fr]=Portable Vaio de Sony +Name[ga]=Ríomhaire Glúine Sony Vaio +Name[he]=מחשב ברכיים מסוג Sony Vaio +Name[hu]=Sony Vaio noteszgép +Name[is]=Sony Vaio kjöltutölva +Name[it]=Portatile Sony Vaio +Name[ja]=Sony Vaio ラップトップ +Name[kk]=Sony Vaio ноутбугі +Name[km]=កុំព្យូទ័រ​យួរដៃ Sony Vaio +Name[mk]=Лаптоп Sony Vaio +Name[nb]=Programtillegg for Sony Vaio +Name[nds]=Sony Vaio-Klappreekner +Name[ne]=सोनी भाइयो लयापटप +Name[nn]=Sony Vaio-bærbar +Name[pa]=Sony Vaio ਲੈਪਟਾਪ +Name[pl]=Wtyczka Sony Vaio +Name[pt]='Plugin' para o Sony Vaio +Name[pt_BR]=Laptop Sony Vaio +Name[ro]=Laptop Sony Vaio +Name[ru]=Ноутбук Sony Vaio +Name[sk]=Sony Vaio +Name[sl]=Prenosnik Sony Vaio +Name[sr]=Sony-јев Vaio лаптоп +Name[sr@Latn]=Sony-jev Vaio laptop +Name[sv]=Sony Vaio bärbar dator +Name[ta]=சோனி வையோ மடிக் கணிப்பொறி +Name[tr]=Sony Vaio Dizüstü +Name[uk]=Лептоп Sony Vaio +Name[uz]=Sony Vaio laptopi +Name[uz@cyrillic]=Sony Vaio лаптопи +Name[zh_CN]=索尼 Vaio 插件 +Name[zh_TW]=Sony Vaio 筆記型電腦 +Comment=Configure the KDE Interface to the Sony Programmable Interrupt Controller Driver +Comment[ar]=إعداد واجهة كدى لجهاز لمشغل التحكّم بالمقاطعة القابل للبرمجة من سونى +Comment[bg]=Настройване на Sony Programmable Interrupt Controller Driver +Comment[bs]=Podesite KDE interfejs za Sony Programmable Interrupt Controler drajver +Comment[ca]=Configura la interfície entre KDE i el controlador d'interrupcions programables Sony +Comment[cs]=Nastavení KDE rozhraní ovladače programovatelného řadiče přerušení Sony +Comment[cy]=Ffurfweddu'r Rhyngwyneb KDE i'r Gyrrydd Rheolydd Ymyriadau Rhaglenadwy Sony +Comment[da]=Indstil KDE's grænseflade til Sony's programmerbare Interrupt Controller Driver +Comment[de]=Einrichten der KDE-Schnittstelle zum "Sony Programmable Interrupt Controller" Treiber +Comment[el]=Ρυθμίστε το περιβάλλον χρήσης του KDE για τον Sony Programmable Interrupt Controller Driver +Comment[es]=Configurar la interfaz de KDE para el controlador programable de interrupciones de Sony +Comment[et]=KDE liides Sony programmeeritava katkestuskontrolleri draiveri seadistamiseks +Comment[eu]=Konfiguratu Sonyren Interrupzio Kontrolatzaile Programagarriaren Gidariarentzako KDE Interfazea +Comment[fa]=پیکربندی واسط KDE در گردانندۀ کنترل‌کنندۀ قابل برنامه‌ریزی دارای وقفه +Comment[fi]=Aseta KDE:n liityntää Sonyn ohjelmoitavalle keskeytysajurille +Comment[fr]=Configuration de l'interface KDE pour le pilote du contrôleur d'interruption programmable de Sony +Comment[ga]=Cumraigh comhéadan KDE do Tiománaí an Rialtóir Idirbhriste Inríomhchláraithe Sony +Comment[hi]=केडीई इंटरफेस को सोनी प्रोग्रामेबल इंटरप्ट कन्ट्रोलर ड्राइवर के लिए कॉन्फ़िगर करता है +Comment[hu]=A Sony Vaio noteszgépek speciális kezelőelemeinek beállítása +Comment[is]=Stilla viðmót KDE á Sony Programmable Interrupt stýringuna +Comment[it]=Configura l'interfaccia KDE al driver del controller programmabile interrupt Sony +Comment[ja]=Sony Programmable Interrupt Controller Driver の KDE インターフェースを設定 +Comment[kk]=Sony бағдарламаулы үзілім контроллердің драйверінің KDE интерфейсін баптау +Comment[km]=កំណត់​រចនា​សម្ព័ន្ធ​ចំណុច​ប្រទាក់ KDE ទៅ​កម្មវិធី​បញ្ជា Sony Programmable Interrupt Controller +Comment[lt]=KDE sąsaja Sony Programmable Interrupt Controller Driver konfigūravimui +Comment[ms]= Selaraskan Antaramuka KDE untuk Pemacu Pengawal Gangguan Boleh Aturcara Sony +Comment[nb]=Sett opp KDE-grensesnitt til Sony Programmable Interrupt Controller Driver +Comment[nds]=KDE-Koppelsteedinstellen för den programmeerboren Interrupt-Controller-Driever vun Sony +Comment[ne]=सोनी कार्यक्रमयोग्य अवरोध नियन्त्रक ड्राइभरमा KDE इन्टरफेस कन्फिगर गर्नुहोस् +Comment[nl]=Voor het instellen van KDE's communicatie met het stuurprogramma van de Sony Programmeerbare Interrupt Controller +Comment[nn]=Set opp KDE-grensesnittet til Sony Programmable Interrupt Controller Driver +Comment[pl]=Konfigurujacja sterownika programowalnego kontrolora przerwań Sony w KDE +Comment[pt]=Configurar a Interface para o KDE do Controlador do Programmable Interrupt Controller da Sony +Comment[pt_BR]=Configura a Interface do KDE para o Driver Controlador de Interrupção Programável da Sony +Comment[ro]=Configurează interfaţa KDE către modulul Sony de control al întreruperilor +Comment[ru]=Настройка интерфейса KDE для драйвера программируемого контроллера прерываний Sony +Comment[sk]=Nastavenie rozhrania KDE k Sony Programmable Interrupt Controller Driver +Comment[sl]=Nastavite vmesnik KDE za gonilnik Sony Programmable Interrupt Controller +Comment[sr]=Подесите KDE-ов интерфејс за управљачки програм Sony-јевог програмабилног контролера прекида +Comment[sr@Latn]=Podesite KDE-ov interfejs za upravljački program Sony-jevog programabilnog kontrolera prekida +Comment[sv]=Anpassa KDE:s gränssnitt till Sonys drivrutin för programmerbar avbrottshantering +Comment[ta]=சோனி நிரல் தடங்கல் கட்டுப்பாட்டு சாதனத்துக்கு கேடிஇ இடைமுகத்தை வடிவமை +Comment[tg]=Танзимкунии Интерфейси KDE барои Гардонандаи Танзимкунандаи кандашавии барномавии Sony +Comment[tr]=KDE arayüzünü Sony Programlanabilir Kesilme Kontrolör Sürücüsüne ayarla +Comment[uk]=Налаштування інтерфейсу KDE до драйвера перепин Sony +Comment[zh_CN]=配置 KDE 界面使用索尼可编程中断控制器驱动程序 +Comment[zh_TW]=設定 Sony 可編程中斷控制器驅動程式的 KDE 介面 +Keywords=Sony, Vaio, kvaio, brightness, mute, Jog Dial +Keywords[ca]=Sony, Vaio, kvaio, brillantor, silenci, Jog Dial +Keywords[cs]=Sony,Vaio,kvaio,jas,ztlumení,Jog Dial +Keywords[cy]=Sony, Vaio, kvaio, gloywder, mud, Jog Dial +Keywords[da]=Sony, Vaio, kvaio, lysstyrke, stum, Jog Dial +Keywords[de]=Sony, Vaio, kvaio, brightness, mute, Jog Dial, stumm, hell, dunkel +Keywords[el]=Sony, Vaio, kvaio, φωτεινότητα, κλείσιμο ήχου, Jog Dial +Keywords[es]=Sony, Vaio, kvaio, brillo, mute, Jog Dial +Keywords[et]=Sony, Vaio, kvaio, heledus, tumm, Jog Dial +Keywords[eu]=Sony, Vaio, kvaio, distira, mutu, Jog Dial +Keywords[fa]=Sony،Vaio، kvaio، روشنایی، بدون صدا، Jog Dial +Keywords[fi]=Sony, Vaio, kvaio, kirkkaus, vaimenna, Jog Dial +Keywords[fr]=Sony, Vaio, kvaio, luminosité, sourdine, mute, Jog Dial +Keywords[ga]=Sony, Vaio, kvaio, gile, gan fuaim, Jog Dial +Keywords[hi]=सोनी,वायो,के-वायो,चमकीलापन,म्यूट,जॉग डायल +Keywords[hu]=Sony,Vaio,kvaio,fényerő,elnémítás,tárcsagomb +Keywords[it]=Sony,Vaio,kvaio,luminosità,muto,Jog Dial +Keywords[ja]=Sony, Vaio, kvaio, 明るさ, ミュート, ジョグダイアル +Keywords[mk]=Sony, Vaio, kvaio, brightness, mute, Jog Dial, Сони, осветленост, пригушување +Keywords[ms]= kecerahan,bisu,Sony, Vaio, kvaio, brightness, mute, Jog Dial +Keywords[nb]=Sony, Vaio, kvaio, lysstyrke, lydsperre, Jog Dial +Keywords[nds]=Sony, Vaio, kvaio, Helligkeit, stumm, Jog Dial +Keywords[ne]=सोनी, भाइयो, केभाइयो, चम्किलोपना, चुप लाग्नु, जोग डायल +Keywords[nl]=Sony,Vaio,kvaio,brightness,helderheid,mute,Jog Dial +Keywords[nn]=Sony,vaio,kvaio,lysstyrke,lydsperre,hjul +Keywords[pl]=Sony, Vaio, kvaio, jasność, Jog Dial,jog,jogdial +Keywords[pt]=Sony, Vaio, kvaio, brilho, sem som, Jog Dial +Keywords[pt_BR]=Sony, Vaio, kvaio,brilho, mudo, Jog Dial +Keywords[ro]=Sony,Vaio,kvaio,strălucire,fără sunet,jog dial +Keywords[ru]=Sony, Vaio, kvaio, brightness, mute, Jog Dial, яркость, звук +Keywords[sk]=Sony, Vaio, kvaio, jas, potichu, Jog Dial +Keywords[sl]=Sony, Vaio, kvaio, 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]=Sony, Vaio, kvaio, ljusstyrka, tyst, rullhjul +Keywords[ta]=சோனி, வையொ, வெளிச்சம்,சத்தமில்லாத,ஜோக் டயல் +Keywords[tg]=Sony, Vaio, kvaio, равшанӣ, хомӯшӣ, Jog Dial +Keywords[tr]=Sony, Vaio, kvaio, parlaklık, sessiz, gösterme itmesi +Keywords[uk]=Sony, Vaio, kvaio, яскравість, вимкнення звуку +Keywords[zh_CN]=Sony, Vaio, kvaio, brightness, mute, Jog Dial,索尼,亮度,静音 + +Categories=Qt;KDE;X-KDE-settings-system; diff --git a/kmilo/kmilo_kvaio/kcmkvaio/main.cpp b/kmilo/kmilo_kvaio/kcmkvaio/main.cpp new file mode 100644 index 0000000..ce27c94 --- /dev/null +++ b/kmilo/kmilo_kvaio/kcmkvaio/main.cpp @@ -0,0 +1,176 @@ +/* + * main.cpp + * + * 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 +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include "kcmkvaio_general.h" + +#include + +#include "main.h" +#include "main.moc" + +typedef KGenericFactory KVaioModuleFactory; +K_EXPORT_COMPONENT_FACTORY( kcm_kvaio, KVaioModuleFactory("kcmkvaio")) + +#define CONFIG_FILE "kmilodrc" + + +KVaioModule::KVaioModule(QWidget *parent, const char *name, const QStringList &) + : KCModule(KVaioModuleFactory::instance(), parent, name) +{ + KAboutData *about = + new KAboutData(I18N_NOOP("kcmkvaio"), + I18N_NOOP("KDE Control Module for Sony " + "Vaio Laptop Hardware"), + 0, 0, KAboutData::License_GPL, + "(c) 2003 Mirko Boehm"); + + about->addAuthor("Mirko Boehm", + I18N_NOOP("Original author"), + "mirko@kde.org"); + setAboutData( about ); + + QVBoxLayout *layout = new QVBoxLayout(this); + mKVaioGeneral = new KCMKVaioGeneral(this); + layout->addWidget( mKVaioGeneral ); + layout->addStretch(); + + mDriver = new KVaioDriverInterface(this); + mDriverAvailable = mDriver->connectToDriver(false); + mTimer = new QTimer(this); + mTimer->start(231); + + load(); + if (! mDriverAvailable) + { + mKVaioGeneral->tlOff->show(); + mKVaioGeneral->frameMain->setEnabled(false); + setButtons(buttons() & ~Default); + } else { + mKVaioGeneral->tlOff->hide(); + // mKVaioGeneral->frameMain->setEnabled (true); + } + + connect(mKVaioGeneral, SIGNAL(changed()), + SLOT(changed())); + connect(mTimer, SIGNAL(timeout()), SLOT(timeout())); + connect(mDriver, SIGNAL (vaioEvent(int)), SLOT (vaioEvent(int) ) ); +} + +void KVaioModule::save() +{ + if (! mDriverAvailable) return; + DCOPClient mClient; + + kdDebug() << "KVaioModule: saving." << endl; + KConfig config(CONFIG_FILE); + + config.setGroup("KVaio"); + + config.writeEntry("Report_Unknown_Events", + mKVaioGeneral->cbReportUnknownEvents->isChecked()); + config.writeEntry("PeriodicallyReportPowerStatus", + mKVaioGeneral->mCbPowerMsgs->isChecked() ); + config.writeEntry("PowerStatusOnBackButton", + mKVaioGeneral->mCbBackButtonMsg->isChecked() ); + config.sync(); + + if(mClient.attach()) + { + QByteArray data, replyData; + QCString replyType; + + if (!mClient.call("kded", "kmilod", "reconfigure()", + data, replyType, replyData)) + { + kdDebug() << "KVaio::showTextMsg: " + << "there was some error using DCOP." << endl; + } + } else { + kdDebug() << "KVaioModule: cannot attach to DCOP server, " + << "no automatic config update." << endl; + } +} + +void KVaioModule::load() +{ + load( false ); +} + +void KVaioModule::load(bool useDefaults) +{ + kdDebug() << "KVaioModule: loading." << endl; + KConfig config(CONFIG_FILE); + + config.setReadDefaults( useDefaults ); + + config.setGroup("KVaio"); + mKVaioGeneral->cbReportUnknownEvents->setChecked + (config.readBoolEntry("Report_Unknown_Events", false)); + mKVaioGeneral->mCbPowerMsgs->setChecked + (config.readBoolEntry("PeriodicallyReportPowerStatus", false) ); + mKVaioGeneral->mCbBackButtonMsg->setChecked + (config.readBoolEntry("PowerStatusOnBackButton", true) ); + + emit changed( useDefaults ); +} + +void KVaioModule::defaults() +{ + load( true ); +} + +void KVaioModule::timeout() +{ + bool bat1Avail = false, bat2Avail = false, acConnected = false; + int bat1Remaining = 0, bat1Max = 0, bat2Remaining = 0, bat2Max = 0; + + if(mDriver->getBatteryStatus(bat1Avail, bat1Remaining, bat1Max, + bat2Avail, bat2Remaining, bat2Max, + acConnected) ) + { + } + int remaining = (int)(100.0*(bat1Remaining+bat2Remaining) + / (bat1Max+bat2Max)); + mKVaioGeneral->mKPBattery->setValue(remaining); + mKVaioGeneral->kledBat1->setState(bat1Avail ? KLed::On : KLed::Off); + mKVaioGeneral->kledBat2->setState(bat2Avail ? KLed::On : KLed::Off); + mKVaioGeneral->kledAC->setState(acConnected ? KLed::On : KLed::Off); +} + +void KVaioModule::vaioEvent (int e) +{ + kdDebug () << "KVaioModule::vaioEvent: event: " << e << endl; +} + diff --git a/kmilo/kmilo_kvaio/kcmkvaio/main.h b/kmilo/kmilo_kvaio/kcmkvaio/main.h new file mode 100644 index 0000000..c19b648 --- /dev/null +++ b/kmilo/kmilo_kvaio/kcmkvaio/main.h @@ -0,0 +1,53 @@ +/* + * main.h + * + * 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 KCMKVAIO_MAIN_H +#define KCMKVAIO_MAIN_H + +#include +#include "../kvaiodriverinterface.h" + +class QTimer; +class KCMKVaioGeneral; + +class KVaioModule : public KCModule +{ + Q_OBJECT + +public: + KVaioModule(QWidget *parent, const char *name, const QStringList &); + + void save(); + void load(); + void load(bool useDefaults); + void defaults(); + +protected slots: + void timeout(); + void vaioEvent (int); +private: + KCMKVaioGeneral *mKVaioGeneral; + KVaioDriverInterface *mDriver; + QTimer *mTimer; + bool mDriverAvailable; +}; + +#endif // KCMKVAIO_MAIN_H -- cgit v1.2.1