kspell_ispellclient.cpp

00001 /*
00002  * kspell_aspellclient.cpp
00003  *
00004  * Copyright (C)  2003  Zack Rusin <zack@kde.org>
00005  *
00006  * This library is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU Lesser General Public
00008  * License as published by the Free Software Foundation; either
00009  * version 2.1 of the License, or (at your option) any later version.
00010  *
00011  * This library is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014  * Lesser General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU Lesser General Public
00017  * License along with this library; if not, write to the Free Software
00018  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00019  * 02110-1301  USA
00020  */
00021 #include "kspell_ispellclient.h"
00022 
00023 #include "kspell_ispelldict.h"
00024 #include "ispell_checker.h"
00025 
00026 #include <kgenericfactory.h>
00027 #include <kdebug.h>
00028 
00029 typedef KGenericFactory<ISpellClient> ISpellClientFactory;
00030 K_EXPORT_COMPONENT_FACTORY( kspell_ispell, ISpellClientFactory( "kspell_ispell" )  )
00031 
00032 using namespace KSpell2;
00033 
00034 ISpellClient::ISpellClient( QObject *parent, const char *name, const QStringList& /* args */  )
00035     : Client( parent, name )
00036 {
00037 }
00038 
00039 ISpellClient::~ISpellClient()
00040 {
00041 }
00042 
00043 Dictionary* ISpellClient::dictionary( const QString& language )
00044 {
00045     ISpellDict *ad = new ISpellDict( language );
00046     return ad;
00047 }
00048 
00049 QStringList ISpellClient::languages() const
00050 {
00051     return ISpellChecker::allDics();
00052 }
00053 
00054 #include "kspell_ispellclient.moc"
KDE Home | KDE Accessibility Home | Description of Access Keys