diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | 4aed2c8219774f5d797760606b8489a92ddc5163 (patch) | |
tree | 3f8c130f7d269626bf6a9447407ef6c35954426a /kcontrol/spellchecking | |
download | tdebase-4aed2c8219774f5d797760606b8489a92ddc5163.tar.gz tdebase-4aed2c8219774f5d797760606b8489a92ddc5163.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/kdebase@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kcontrol/spellchecking')
-rw-r--r-- | kcontrol/spellchecking/Makefile.am | 16 | ||||
-rw-r--r-- | kcontrol/spellchecking/spellchecking.cpp | 74 | ||||
-rw-r--r-- | kcontrol/spellchecking/spellchecking.desktop | 232 | ||||
-rw-r--r-- | kcontrol/spellchecking/spellchecking.h | 41 |
4 files changed, 363 insertions, 0 deletions
diff --git a/kcontrol/spellchecking/Makefile.am b/kcontrol/spellchecking/Makefile.am new file mode 100644 index 000000000..e4740eb8e --- /dev/null +++ b/kcontrol/spellchecking/Makefile.am @@ -0,0 +1,16 @@ +kde_module_LTLIBRARIES = kcm_spellchecking.la + +kcm_spellchecking_la_SOURCES = spellchecking.cpp + +kcm_spellchecking_la_LDFLAGS = $(all_libraries) -module -avoid-version -no-undefined +kcm_spellchecking_la_LIBADD = -lkdeui + +AM_CPPFLAGS= $(all_includes) + +METASOURCES = spellchecking.moc + +messages: + $(XGETTEXT) $(kcm_spellchecking_la_SOURCES) -o $(podir)/kcmspellchecking.pot + +xdg_apps_DATA = spellchecking.desktop + diff --git a/kcontrol/spellchecking/spellchecking.cpp b/kcontrol/spellchecking/spellchecking.cpp new file mode 100644 index 000000000..d4e781844 --- /dev/null +++ b/kcontrol/spellchecking/spellchecking.cpp @@ -0,0 +1,74 @@ +/* + Copyright (c) 2001 Laurent Montel <[email protected]> + 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 <qlayout.h> +#include <qvgroupbox.h> + +#include <dcopclient.h> + +#include <kapplication.h> +#include <kdialog.h> +#include <kgenericfactory.h> +#include <kspell.h> + +#include "spellchecking.h" + +typedef KGenericFactory<KSpellCheckingConfig, QWidget > SpellFactory; +K_EXPORT_COMPONENT_FACTORY (kcm_spellchecking, SpellFactory("kcmspellchecking") ) + + +KSpellCheckingConfig::KSpellCheckingConfig(QWidget *parent, const char *name, const QStringList &): + KCModule(SpellFactory::instance(), parent, name) +{ + QBoxLayout *layout = new QVBoxLayout(this, 0, KDialog::spacingHint()); + QGroupBox *box = new QVGroupBox( i18n("Spell Checking Settings"), this ); + box->layout()->setSpacing( KDialog::spacingHint() ); + layout->addWidget(box); + + spellConfig = new KSpellConfig(box, 0L ,0L, false ); + layout->addStretch(1); + connect(spellConfig,SIGNAL(configChanged()), SLOT( changed() )); + + setQuickHelp( i18n("<h1>Spell Checker</h1><p>This control module allows you to configure the KDE spell checking system. You can configure:<ul><li> which spell checking program to use<li> which types of spelling errors are identified<li> which dictionary is used by default.</ul><br>The KDE spell checking system (KSpell) provides support for two common spell checking utilities: ASpell and ISpell. This allows you to share dictionaries between KDE applications and non-KDE applications.</p>")); + +} + +void KSpellCheckingConfig::load() +{ + spellConfig->readGlobalSettings(); +} + +void KSpellCheckingConfig::save() +{ + spellConfig->writeGlobalSettings(); + QByteArray data; + if ( !kapp->dcopClient()->isAttached() ) + kapp->dcopClient()->attach(); + kapp->dcopClient()->send( "konqueror*", "KonquerorIface", "reparseConfiguration()", data ); +} + +void KSpellCheckingConfig::defaults() +{ + spellConfig->setNoRootAffix(0); + spellConfig->setRunTogether(0); + spellConfig->setDictionary(""); + spellConfig->setDictFromList(FALSE); + spellConfig->setEncoding (KS_E_ASCII); + spellConfig->setClient (KS_CLIENT_ISPELL); +} + +#include "spellchecking.moc" diff --git a/kcontrol/spellchecking/spellchecking.desktop b/kcontrol/spellchecking/spellchecking.desktop new file mode 100644 index 000000000..9c21a5756 --- /dev/null +++ b/kcontrol/spellchecking/spellchecking.desktop @@ -0,0 +1,232 @@ +[Desktop Entry] +Exec=kcmshell spellchecking +Icon=spellcheck +Type=Application +DocPath=kcontrol/spellchecking/index.html + + +X-KDE-Library=spellchecking +X-KDE-ParentApp=kcontrol + +Name=Spell Checker +Name[af]=Spel Toetser +Name[ar]=المدقق الإملائي +Name[be]=Праверка правапісу +Name[bg]=Проверка на правописа +Name[bn]=বানান পরীক্ষক +Name[br]=Gwirieker ar skritur +Name[bs]=Provjera pravopisa +Name[ca]=Comprovació de l'ortografia +Name[cs]=Kontrola pravopisu +Name[csb]=Sprôwdzanié pisënkù +Name[cy]=Cywirydd Sillafu +Name[da]=Stavekontrol +Name[de]=Rechtschreibprüfung +Name[el]=Ορθογραφικός έλεγχος +Name[eo]=Literumilo +Name[es]=Corrector ortográfico +Name[et]=Õigekirja kontroll +Name[eu]=Ortografia zuzentzailea +Name[fa]=غلطگیر +Name[fi]=Oikoluku +Name[fr]=Vérificateur orthographique +Name[fy]=Staveringshifker +Name[ga]=Litreoir +Name[gl]=Corrector Ortográfico +Name[he]=בודק האיות +Name[hi]=वर्तनी शोधक +Name[hr]=Alat za provjeru pravopisa +Name[hu]=Helyesírás-ellenőrző +Name[is]=Stafsetningarleiðrétting +Name[it]=Controllo ortografico +Name[ja]=スペルチェッカー +Name[ka]=მარლთწერის შემოწმება +Name[kk]=Емле тексеруі +Name[km]=កម្មវិធីពិនិត្យអក្ខរាវិរុទ្ធ +Name[lo]=ເຄື່ອງມືກວດຄຳສະກົດ +Name[lt]=Rašybos tikrinimo įrankis +Name[lv]=Pareizrakstības pārbaudes rīks +Name[mk]=Проверка на правопис +Name[mn]=Зөв бичиг шалгалт +Name[ms]=Penyemak Eja +Name[nb]=Stavekontroll +Name[nds]=Klookschriever +Name[ne]=हिज्जे परीक्षक +Name[nl]=Spellingcontrole +Name[nn]=Stavekontroll +Name[nso]=Molebeledi wa Mongwalo +Name[pa]=ਸ਼ਬਦ-ਜੋੜ ਜਾਂਚਕਾਰ +Name[pl]=Sprawdzanie pisowni +Name[pt]=Verificador Ortográfico +Name[pt_BR]=Corretor Ortográfico +Name[ro]=Verificatorul ortografic +Name[ru]=Проверка орфографии +Name[rw]=Igenzuranyuguti +Name[se]=Čállindárkkisteapmi +Name[sk]=Kontrola pravopisu +Name[sl]=Preverjanje črkovanja +Name[sr]=Провера правописа +Name[sr@Latn]=Provera pravopisa +Name[sv]=Stavningskontroll +Name[ta]=எழுத்துப்பிழை திருத்துங்கருவி +Name[tg]=Тафтиши Имло +Name[th]=ตรวจคำสะกด +Name[tr]=İmla Denetim Programı +Name[tt]=Yazma Döreslege +Name[uk]=Перевірка правопису +Name[uz]=Imloni tekshiruvchi +Name[uz@cyrillic]=Имлони текширувчи +Name[ven]=Tshisedzi tsha tshipelini +Name[vi]=Công cụ kiểm tra chính tả +Name[wa]=Coridjrece ortografike +Name[xh]=Umkhangeki Wopelo +Name[zh_CN]=拼写检查工具 +Name[zh_TW]=拼字檢查工具 +Name[zu]=Umbheki wokubizelwa kwamagama + +Comment=Configure the spell checker +Comment[af]=Konfigureer die spel toetser +Comment[ar]=قم بإعداد المدقق الإملائي +Comment[be]=Настаўленне спраўджвання правапісу +Comment[bg]=Настройване проверката на правописа +Comment[bn]=বানান পরীক্ষক কনফিগার করুন +Comment[br]=Kefluniañ an ostilh gwiriekaat +Comment[bs]=Podesite provjeru pravopisa +Comment[ca]=Aquí podeu configurar el corrector ortogràfic +Comment[cs]=Nastavení kontroly pravopisu +Comment[csb]=Kònfigùracëjô sprôwdzaniô bezzmiłkòwòscë pisënkù +Comment[cy]=Ffurfweddu'r cywirydd sillafu +Comment[da]=Indstil stavekontrollen +Comment[de]=Rechtschreibprüfung einrichten +Comment[el]=Ρυθμίστε τον ελεγκτή ορθογραφίας +Comment[eo]=Agordo de la literumilo +Comment[es]=Configuración del corrector ortográfico +Comment[et]=Õigekirja kontrolli seadistamine +Comment[eu]=Konfiguratu ortografia zuzentzailea +Comment[fa]=پیکربندی غلطگیر +Comment[fi]=Oikolukuasetukset +Comment[fr]=Configurer la vérification orthographique +Comment[fy]=Hjir kinne jo de staveringshifker ynstelle +Comment[ga]=Cumraigh an litreoir +Comment[gl]=Configurar o corrector ortográfico +Comment[he]=שינוי הגדרות בודק האיות +Comment[hi]=वर्तनी शोधक कॉन्फ़िगर करें +Comment[hr]=Konfiguriranje provjere pravopisa +Comment[hu]=A helyesírás-ellenőrző beállításai +Comment[is]=Stilla stafsetningarleiðréttingu +Comment[it]=Configura il correttore ortografico +Comment[ja]=スペルチェッカーの設定 +Comment[ka]=მარლთწერის სემოწმების კონფიგურაცია +Comment[kk]=Емле тексерушіні баптау +Comment[km]=កំណត់រចនាសម្ព័ន្ធកម្មវិធីពិនិត្យអក្ខរាវិរុទ្ធ +Comment[ko]=패널 작업 표시줄 설정 +Comment[lo]=ປັບແຕ່ງການຕັ້ງຄ່າລະບົບແຄຊທີ່ນີ້ +Comment[lt]=Konfigūruoti rašybos tikrinimą +Comment[lv]=Šeit Jūs varat konfigurēt pareizrakstības pārbaudītāja parametrus +Comment[mk]=Конфигурирајте ја проверката на правопис +Comment[mn]=Зөв бичиг шалгалт тохируулах +Comment[ms]=Konfigur penyemak eja +Comment[mt]=Ikkonfigura l-iċċekkjar tal-ortografija +Comment[nb]=Oppsett av stavekontroll +Comment[nds]=Instellen för dat Kuntrulleren vun Schriefwiesen +Comment[ne]=हिज्जे परीक्षक कन्फिगर गर्नुहोस् +Comment[nl]=Hier kunt u de spellingcontrole instellen +Comment[nn]=Oppsett av stavekontroll +Comment[nso]=Beakanya molebeledi wa mongwalo +Comment[pa]=ਸ਼ਬਦ-ਜੋੜ ਜਾਂਚਕਾਰ ਦੀ ਸੰਰਚਨਾ +Comment[pl]=Konfiguracja sprawdzania poprawności pisowni +Comment[pt]=Configuração do verificador ortográfico +Comment[pt_BR]=Configura o corretor ortográfico +Comment[ro]=Configurează opțiunile verificatorului ortografic +Comment[ru]=Настройка проверки орфографии +Comment[rw]=Kuboneza igenzuranyuguti +Comment[se]=Heivet čállindárkkisteaddji +Comment[sk]=Nastavenie kontroly pravopisu +Comment[sl]=Tu lahko nastavite črkovalnik +Comment[sr]=Подешавање провере правописа +Comment[sr@Latn]=Podešavanje provere pravopisa +Comment[sv]=Anpassa stavningskontroll +Comment[ta]=சொல் திருத்தியை வடிவமை +Comment[tg]=Танзими тафтиши имло +Comment[th]=ปรับแต่งเครื่องมือตรวจคำสะกด +Comment[tr]=İmla denetimini yapılandır +Comment[tt]=Döresyazu qoralın caylaw +Comment[uk]=Налаштування перевірки правопису +Comment[uz]=Imlo tekshiruvchini moslash +Comment[uz@cyrillic]=Имло текширувчини мослаш +Comment[ven]=Dzudzanyani tshisedzi tsha tshipelini +Comment[vi]=Cấu hình các bộ kiểm tra chính tả +Comment[wa]=Apontyî l' coridjrece ortografike +Comment[xh]=Qwalasela umkhangelo wopelo +Comment[zh_CN]=配置拼写检查工具 +Comment[zh_TW]=設定拼字檢查程式 +Comment[zu]=Hlanganisela umbheki wokubizelwa kwamagama + +Keywords=Spell +Keywords[af]=Spel +Keywords[ar]=التهجئة و الإملاء +Keywords[az]=İmla +Keywords[be]=Правапіс,Праверка,Spell +Keywords[bg]=проверка, правопис, коректор, правописен, Spell +Keywords[ca]=Ortografia +Keywords[cs]=Pravopis +Keywords[csb]=Lëterówczi,bezzmiłkòwòsc pisënkù +Keywords[cy]=Sillafu +Keywords[da]=Stav +Keywords[de]=Rechtschreibung +Keywords[el]=Ορθογραφία +Keywords[eo]=Literumo +Keywords[es]=Ortografía +Keywords[et]=õigekiri +Keywords[eu]=Ortografia +Keywords[fa]=هجی +Keywords[fi]=Oikoluku +Keywords[fr]=orthographe,vérification +Keywords[ga]=Litriú +Keywords[gl]=Ortografia +Keywords[he]=איות, Spell +Keywords[hi]=वर्तनी +Keywords[hr]=Spell,Provjera pravopisa +Keywords[hu]=Helyesírás-ellenőrző +Keywords[is]=Stafsetning +Keywords[it]=ortografia,controllo ortografico +Keywords[ja]=スペル +Keywords[km]=អក្ខរាវិរុទ្ធ +Keywords[lo]=ສະກົດ +Keywords[lt]=Spell, rašyba +Keywords[lv]=Pareizrakstība +Keywords[mk]=Правопис +Keywords[mn]=Зөв бичиг +Keywords[ms]=Eja +Keywords[mt]=Spell,Spelli +Keywords[nb]=Stavekontroll +Keywords[nds]=schrieven,Rechtschrieven,kuntrulleren,Schriefwies +Keywords[ne]=हिज्जे +Keywords[nn]=Stavekontroll +Keywords[nso]=Mongwalo +Keywords[pl]=Literówki,Poprawność pisowni +Keywords[pt]=Ortografia +Keywords[pt_BR]=Verificação ortográfica +Keywords[ro]=ortografie,scriere,verificare +Keywords[rw]=Kuvuga inyuguti +Keywords[se]=Čállindárkkisteapmi +Keywords[sk]=Pravopis +Keywords[sl]=Črkuj +Keywords[ss]=Phimisa +Keywords[sv]=Stava +Keywords[ta]=உச்சரி +Keywords[tg]=Имло +Keywords[th]=สะกด +Keywords[tr]=İmla +Keywords[uk]=Правопис +Keywords[uz]=Imlo +Keywords[uz@cyrillic]=Имло +Keywords[ven]=Tshipelini +Keywords[vi]=Chính tả +Keywords[wa]=coridjrece,ortografe,ortografike +Keywords[xh]=Pela +Keywords[zh_CN]=拼写 +Keywords[zh_TW]=拼字 +Keywords[zu]=Bizela + +Categories=Qt;KDE;X-KDE-settings-components; diff --git a/kcontrol/spellchecking/spellchecking.h b/kcontrol/spellchecking/spellchecking.h new file mode 100644 index 000000000..f709a873d --- /dev/null +++ b/kcontrol/spellchecking/spellchecking.h @@ -0,0 +1,41 @@ +/* + Copyright (c) 2001 Laurent Montel <[email protected]> + + 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 __spellchecking_h__ +#define __spellchecking_h__ + +#include "kcmodule.h" + +class KSpellConfig; + +class KSpellCheckingConfig : public KCModule +{ + Q_OBJECT + + public: + KSpellCheckingConfig(QWidget *parent, const char *name, const QStringList &); + + void load(); + void save(); + void defaults(); + + protected: + KSpellConfig *spellConfig; +}; + +#endif |