• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • kspell2
 

kspell2

  • kspell2
  • plugins
  • aspell
kspell_aspellclient.cpp
1 /*
2  * kspell_aspellclient.cpp
3  *
4  * Copyright (C) 2003 Zack Rusin <zack@kde.org>
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19  * 02110-1301 USA
20  */
21 #include "kspell_aspellclient.h"
22 
23 #include "kspell_aspelldict.h"
24 
25 #include <kgenericfactory.h>
26 #include <kdebug.h>
27 
28 typedef KGenericFactory<ASpellClient> ASpellClientFactory;
29 K_EXPORT_COMPONENT_FACTORY( kspell_aspell, ASpellClientFactory( "kspell_aspell" ) )
30 
31 using namespace KSpell2;
32 
33 ASpellClient::ASpellClient( TQObject *parent, const char *name, const TQStringList& /* args */ )
34  : Client( parent, name )
35 {
36  m_config = new_aspell_config();
37 }
38 
39 ASpellClient::~ASpellClient()
40 {
41  delete_aspell_config( m_config );
42 }
43 
44 Dictionary* ASpellClient::dictionary( const TQString& language )
45 {
46  ASpellDict *ad = new ASpellDict( language );
47  return ad;
48 }
49 
50 TQStringList ASpellClient::languages() const
51 {
52  AspellDictInfoList *l = get_aspell_dict_info_list( m_config );
53  AspellDictInfoEnumeration *el = aspell_dict_info_list_elements( l );
54 
55  TQStringList langs;
56  const AspellDictInfo *di = 0;
57  while ( ( di = aspell_dict_info_enumeration_next( el ) ) ) {
58  langs.append( di->name );
59  }
60 
61  delete_aspell_dict_info_enumeration( el );
62 
63  return langs;
64 }
65 
66 #include "kspell_aspellclient.moc"
ASpellDict
kspell_aspelldict.h
Definition: kspell_aspelldict.h:29
KSpell2::Client
The fact that this class inherits from TQObject makes me hugely unhappy.
Definition: client.h:42
KSpell2::Dictionary
Class is returned by from Broker.
Definition: dictionary.h:38
KSpell2
kspell_hspellclient.h
Definition: backgroundchecker.h:29

kspell2

Skip menu "kspell2"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members

kspell2

Skip menu "kspell2"
  • arts
  • dcop
  • dnssd
  • interfaces
  •     interface
  •     library
  •   kspeech
  •   ktexteditor
  • kabc
  • kate
  • kcmshell
  • kdecore
  • kded
  • kdefx
  • kdeprint
  • kdesu
  • kdeui
  • kdoctools
  • khtml
  • kimgio
  • kinit
  • kio
  •   bookmarks
  •   httpfilter
  •   kfile
  •   kio
  •   kioexec
  •   kpasswdserver
  •   kssl
  • kioslave
  •   http
  • kjs
  • kmdi
  •   kmdi
  • knewstuff
  • kparts
  • krandr
  • kresources
  • kspell2
  • kunittest
  • kutils
  • kwallet
  • libkmid
  • libkscreensaver
Generated for kspell2 by doxygen 1.9.1
This website is maintained by Timothy Pearson.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. |