• Skip to content
  • Skip to link menu
KDE 4.1 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

Sonnet

kspell_aspellclient.cpp

Go to the documentation of this file.
00001 
00021 #include "kspell_aspellclient.h"
00022 
00023 #include "kspell_aspelldict.h"
00024 
00025 #include <kpluginfactory.h>
00026 #include <kpluginloader.h>
00027 #include <kdebug.h>
00028 
00029 K_PLUGIN_FACTORY( ASpellClientFactory, registerPlugin<ASpellClient>(); )
00030 K_EXPORT_PLUGIN( ASpellClientFactory( "kspell_aspell" ) )
00031 
00032 using namespace Sonnet;
00033 
00034 ASpellClient::ASpellClient( QObject *parent, const QVariantList& /* args */  )
00035     : Client( parent )
00036 {
00037     m_config = new_aspell_config();
00038 }
00039 
00040 ASpellClient::~ASpellClient()
00041 {
00042     delete_aspell_config( m_config );
00043 }
00044 
00045 SpellerPlugin *ASpellClient::createSpeller(const QString &language)
00046 {
00047     ASpellDict *ad = new ASpellDict( language );
00048     return ad;
00049 }
00050 
00051 QStringList ASpellClient::languages() const
00052 {
00053     AspellDictInfoList *l = get_aspell_dict_info_list( m_config );
00054     AspellDictInfoEnumeration *el = aspell_dict_info_list_elements( l );
00055 
00056     QStringList langs;
00057     const AspellDictInfo *di = 0;
00058     while ( ( di = aspell_dict_info_enumeration_next( el ) ) ) {
00059         langs.append( di->name );
00060     }
00061 
00062     delete_aspell_dict_info_enumeration( el );
00063 
00064     return langs;
00065 }
00066 
00067 #include "kspell_aspellclient.moc"

Sonnet

Skip menu "Sonnet"
  • Main Page
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • KIO
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal