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

Sonnet

  • 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
30K_PLUGIN_FACTORY( HunspellClientFactory, registerPlugin<HunspellClient>(); )
31K_EXPORT_PLUGIN( HunspellClientFactory( "kspell_hunspell" ) )
32
33using namespace Sonnet;
34
35HunspellClient::HunspellClient( QObject *parent, const QVariantList& /* args */ )
36 : Client( parent )
37{
38 kDebug()<<" HunspellClient::HunspellClient";
39}
40
41HunspellClient::~HunspellClient()
42{
43}
44
45SpellerPlugin *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
52QStringList HunspellClient::languages() const
53{
54 QStringList lst;
55 QDir dir("/usr/share/myspell/");
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"
HunspellClient
Definition: kspell_hunspellclient.h:35
HunspellClient::languages
virtual QStringList languages() const
Definition: kspell_hunspellclient.cpp:52
HunspellClient::~HunspellClient
~HunspellClient()
Definition: kspell_hunspellclient.cpp:41
HunspellClient::createSpeller
virtual SpellerPlugin * createSpeller(const QString &language)
Definition: kspell_hunspellclient.cpp:45
HunspellDict
kspell_aspelldict.h
Definition: kspell_hunspelldict.h:28
K_PLUGIN_FACTORY
#define K_PLUGIN_FACTORY(name, pluginRegistrations)
K_EXPORT_PLUGIN
#define K_EXPORT_PLUGIN(factory)
QObject
Sonnet::Client
Sonnet::SpellerPlugin
kDebug
#define kDebug
kdebug.h
kpluginfactory.h
kpluginloader.h
kspell_hunspellclient.h
kspell_hunspelldict.h
Sonnet
kspell_aspellclient.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

Sonnet

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

kdelibs-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 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
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