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

KDECore

  • sources
  • kde-4.14
  • kdelibs
  • kdecore
  • sonnet
spellerplugin.cpp
Go to the documentation of this file.
1 // -*- Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*-
21 #include "spellerplugin_p.h"
22 
23 namespace Sonnet
24 {
25 
26 class SpellerPlugin::Private
27 {
28 public:
29  QString language;
30 };
31 
32 SpellerPlugin::SpellerPlugin(const QString &lang)
33  : d(new Private)
34 {
35  d->language = lang;
36 }
37 
38 SpellerPlugin::~SpellerPlugin()
39 {
40  delete d;
41 }
42 
43 QString SpellerPlugin::language() const
44 {
45  return d->language;
46 }
47 
48 bool SpellerPlugin::isMisspelled(const QString &word) const
49 {
50  return !isCorrect(word);
51 }
52 
53 bool SpellerPlugin::checkAndSuggest(const QString &word,
54  QStringList &suggestions) const
55 {
56  bool c = isCorrect(word);
57  if (!c)
58  suggestions = suggest(word);
59  return c;
60 }
61 
62 }
Sonnet::SpellerPlugin::suggest
virtual QStringList suggest(const QString &word) const =0
Fetches suggestions for the word.
Sonnet::SpellerPlugin::checkAndSuggest
virtual bool checkAndSuggest(const QString &word, QStringList &suggestions) const
Convience method calling isCorrect() and suggest() if the word isn't correct.
Definition: spellerplugin.cpp:53
Sonnet::SpellerPlugin::isMisspelled
bool isMisspelled(const QString &word) const
Checks the given word.
Definition: spellerplugin.cpp:48
Sonnet::SpellerPlugin::~SpellerPlugin
virtual ~SpellerPlugin()
Definition: spellerplugin.cpp:38
spellerplugin_p.h
QString
QStringList
Sonnet::SpellerPlugin::isCorrect
virtual bool isCorrect(const QString &word) const =0
Checks the given word.
Sonnet::SpellerPlugin::language
QString language() const
Returns language supported by this dictionary.
Definition: spellerplugin.cpp:43
Sonnet::SpellerPlugin::SpellerPlugin
SpellerPlugin(const QString &lang)
Definition: spellerplugin.cpp:32
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:22:12 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDECore

Skip menu "KDECore"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • 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