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

KDECore

  • kdecore
  • sonnet
speller.h
Go to the documentation of this file.
1// -*- Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*-
2/*
3 *
4 * Copyright (C) 2007 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#ifndef SONNET_SPELLER_H
22#define SONNET_SPELLER_H
23
24#include <QtCore/QStringList>
25#include <QtCore/QString>
26
27#include <kdecore_export.h>
28
29class KConfig;
30
31namespace Sonnet
32{
38 class KDECORE_EXPORT Speller
39 {
40 public:
41 Speller(const QString &lang=QString());
42 ~Speller();
43
44 Speller(const Speller &speller);
45 Speller &operator=(const Speller &speller);
46
51 bool isValid() const;
52
56 void setLanguage(const QString &lang);
60 QString language() const;
61
66 bool isCorrect(const QString &word) const;
67
72 bool isMisspelled(const QString &word) const;
73
79 QStringList suggest(const QString &word) const;
80
85 bool checkAndSuggest(const QString &word,
86 QStringList &suggestions) const;
87
92 bool storeReplacement(const QString &bad,
93 const QString &good);
94
99 bool addToPersonal(const QString &word);
100
105 bool addToSession(const QString &word);
106
107 public: // Configuration API
108 enum Attribute {
109 CheckUppercase,
110 SkipRunTogether
111 };
112 void save(KConfig *config);
113 void restore(KConfig *config);
114
118 QStringList availableBackends() const;
119
125 QStringList availableLanguages() const;
131 QStringList availableLanguageNames() const;
132
137 QMap<QString, QString> availableDictionaries() const;
138
139
140 void setDefaultLanguage(const QString &lang);
141 QString defaultLanguage() const;
142
143 void setDefaultClient(const QString &client);
144 QString defaultClient() const;
145
146 void setAttribute(Attribute attr, bool b = true);
147 bool testAttribute(Attribute attr) const;
148 private:
149 class Private;
150 Private *const d;
151 };
152}
153#endif
KConfig
The central class of the KDE configuration data system.
Definition: kconfig.h:71
QMap
QStringList
QString
Sonnet::Speller
Spell checker object.
Definition: speller.h:39
Sonnet::Speller::Attribute
Attribute
Definition: speller.h:108
Sonnet::Speller::CheckUppercase
@ CheckUppercase
Definition: speller.h:109
kdecore_export.h
Sonnet
The sonnet namespace.
Definition: backgroundchecker.h:34
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.

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-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