Show webfinger if displayName is unknown for an author.
[larjonas-pumpa.git] / src / qaspell.h
blobcc8c7586c7aa15d5edd32483f21b023083075482
1 /*
2 Copyright 2013-2015 Mats Sjöberg
4 This file is part of the Pumpa programme.
6 Pumpa is free software: you can redistribute it and/or modify it
7 under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
11 Pumpa is distributed in the hope that it will be useful, but WITHOUT
12 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
14 License for more details.
16 You should have received a copy of the GNU General Public License
17 along with Pumpa. If not, see <http://www.gnu.org/licenses/>.
20 /** QASpell
21 Tries to be a wrapper around libaspell, following this:
22 http://aspell.net/man-html/Through-the-C-API.html#Through-the-C-API
23 **/
25 #ifndef _QASPELL_H_
26 #define _QASPELL_H_
28 #include <QtCore>
30 #ifdef USE_ASPELL
32 #include <aspell.h>
34 class QASpell : public QObject {
35 public:
36 QASpell(QObject* parent=0);
38 ~QASpell();
40 bool checkWord(const QString& word) const;
41 QStringList suggestions(const QString& word) const;
42 static void setLocale(QString locale);
44 protected:
45 AspellConfig* spell_config;
46 AspellSpeller* spell_checker;
48 bool checksOK() const;
50 bool ok;
51 static QString s_locale;
54 #else
56 // dummy class
57 class QASpell : public QObject {
58 public:
59 QASpell() {}
60 ~QASpell() {}
63 #endif
65 #endif /* _QASPELL_H_ */