lib

KoBgSpellCheck.h
1/* This file is part of the KDE project
2 Copyright (C) 2004 Zack Rusin <zack@kde.org>
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version.
8
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18*/
19
20#ifndef KOBGSPELLCHECK_H
21#define KOBGSPELLCHECK_H
22
23#include <tdespell2/broker.h>
24#include <tqobject.h>
25#include <tqstringlist.h>
26#include <koffice_export.h>
27class KoTextObject;
28class KoDocument;
29class KoTextParag;
30class KoTextIterator;
31
32class KOTEXT_EXPORT KoBgSpellCheck : public TQObject
33{
34 TQ_OBJECT
35
36public:
37 KoBgSpellCheck( const KSpell2::Broker::Ptr& broker, TQObject *parent =0,
38 const char *name =0 );
39 virtual ~KoBgSpellCheck();
40
41 void registerNewTextObject( KoTextObject *object );
42
43 virtual KoTextIterator *createWholeDocIterator() const=0;
44
45 bool enabled() const;
46
50 KSpell2::Settings *settings() const;
51
56 void setIntraWordEditing( KoTextParag* parag, int index );
57
58public slots:
59 void start();
60 void stop();
61 void setEnabled( bool b );
62
63protected slots:
64 void spellCheckerMisspelling(const TQString &, int );
65 void spellCheckerDone();
66 void checkerContinue();
67
68 void slotParagraphCreated( KoTextParag* parag );
69 void slotParagraphModified( KoTextParag* parag, int /*ParagModifyType*/, int pos, int length );
70 void slotParagraphDeleted( KoTextParag* parag );
71
72 void slotClearPara();
73
74protected:
75 void markWord( KoTextParag* parag, int pos, int length, bool misspelled );
76private:
77 class Private;
78 Private *d;
79};
80#endif
The KOffice document class.
Definition KoDocument.h:61
A convenient way to iterate over paragraphs, possibly in multiple textobjects, with many options (fro...
The KoTextObject is the high-level object that contains a KoTextDocument (the list of paragraphs),...