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

Sonnet

  • sources
  • kde-4.14
  • kdelibs
  • sonnet
  • plugins
  • hunspell
kspell_hunspellclient.cpp
Go to the documentation of this file.
1 
21 #include "kspell_hunspellclient.h"
22 #include <QDir>
23 
24 #include "kspell_hunspelldict.h"
25 
26 #include <kpluginfactory.h>
27 #include <kpluginloader.h>
28 #include <kdebug.h>
29 
30 K_PLUGIN_FACTORY( HunspellClientFactory, registerPlugin<HunspellClient>(); )
31 K_EXPORT_PLUGIN( HunspellClientFactory( "kspell_hunspell" ) )
32 
33 using namespace Sonnet;
34 
35 HunspellClient::HunspellClient( QObject *parent, const QVariantList& /* args */ )
36  : Client( parent )
37 {
38  kDebug()<<" HunspellClient::HunspellClient";
39 }
40 
41 HunspellClient::~HunspellClient()
42 {
43 }
44 
45 SpellerPlugin *HunspellClient::createSpeller(const QString &language)
46 {
47  kDebug()<<" SpellerPlugin *HunspellClient::createSpeller(const QString &language) ;"<<language;
48  HunspellDict *ad = new HunspellDict( language );
49  return ad;
50 }
51 
52 QStringList HunspellClient::languages() const
53 {
54  QStringList lst;
55  QDir dir("/usr/share/myspell/dicts/");
56  if(dir.exists())
57  {
58  QStringList lstDic = dir.entryList(QStringList("*.dic"), QDir::Files );
59  foreach(const QString &tmp, lstDic)
60  {
61  lst<< tmp.remove(".dic");
62  }
63  }
64  kDebug()<<" lst !!!!!!!!!!!!!!!!!!!!!!!! :"<<lst;
65  return lst;
66 }
67 
68 #include "kspell_hunspellclient.moc"
kdebug.h
HunspellClient
Definition: kspell_hunspellclient.h:34
QString::remove
QString & remove(int position, int n)
HunspellClient::languages
virtual QStringList languages() const
Definition: kspell_hunspellclient.cpp:52
kDebug
static QDebug kDebug(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
K_PLUGIN_FACTORY
#define K_PLUGIN_FACTORY(name, pluginRegistrations)
QDir::exists
bool exists() const
QObject
kpluginloader.h
kspell_hunspelldict.h
QString
QStringList
Sonnet::SpellerPlugin
QDir
HunspellDict
kspell_aspelldict.h
Definition: kspell_hunspelldict.h:27
QDir::entryList
QStringList entryList(QFlags< QDir::Filter > filters, QFlags< QDir::SortFlag > sort) const
HunspellClient::createSpeller
virtual SpellerPlugin * createSpeller(const QString &language)
Definition: kspell_hunspellclient.cpp:45
kpluginfactory.h
kspell_hunspellclient.h
HunspellClient::~HunspellClient
~HunspellClient()
Definition: kspell_hunspellclient.cpp:41
K_EXPORT_PLUGIN
#define K_EXPORT_PLUGIN(factory)
Sonnet::Client
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:24:40 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

Sonnet

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

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal