1 | /* |
2 | * backgroundchecker_p.h |
3 | * |
4 | * SPDX-FileCopyrightText: 2009 Jakub Stachowski <qbast@go2.pl> |
5 | * |
6 | * SPDX-License-Identifier: LGPL-2.1-or-later |
7 | */ |
8 | #ifndef SONNET_BACKGROUNDCHECKER_P_H |
9 | #define SONNET_BACKGROUNDCHECKER_P_H |
10 | |
11 | #include "backgroundchecker.h" |
12 | #include "languagefilter_p.h" |
13 | #include "speller.h" |
14 | #include "tokenizer_p.h" |
15 | |
16 | #include <QObject> |
17 | |
18 | namespace Sonnet |
19 | { |
20 | |
21 | class BackgroundCheckerPrivate : public QObject |
22 | { |
23 | Q_OBJECT |
24 | public: |
25 | /*! |
26 | */ |
27 | BackgroundCheckerPrivate() |
28 | : mainTokenizer(new SentenceTokenizer) |
29 | , sentenceOffset(-1) |
30 | { |
31 | autoDetectLanguageDisabled = false; |
32 | } |
33 | |
34 | /*! |
35 | */ |
36 | void start(); |
37 | /*! |
38 | */ |
39 | void continueChecking(); |
40 | |
41 | LanguageFilter mainTokenizer; |
42 | WordTokenizer words; |
43 | Token lastMisspelled; |
44 | Speller currentDict; |
45 | int sentenceOffset; |
46 | bool autoDetectLanguageDisabled; |
47 | |
48 | private Q_SLOTS: |
49 | /*! |
50 | */ |
51 | void checkNext(); |
52 | Q_SIGNALS: |
53 | /*! |
54 | */ |
55 | void misspelling(const QString &, int); |
56 | /*! |
57 | */ |
58 | void done(); |
59 | }; |
60 | |
61 | } |
62 | |
63 | #endif |
64 | |