lib Library API Documentation

kospell.h

00001 /* This file is part of the KDE libraries
00002    Copyright (C) 1997 David Sweet <dsweet@kde.org>
00003    Copyright (C) 2004 Zack Rusin <zack@kde.org>
00004 
00005    This library is free software; you can redistribute it and/or
00006    modify it under the terms of the GNU Library General Public
00007    License version 2 as published by the Free Software Foundation.
00008 
00009    This library is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012    Library General Public License for more details.
00013 
00014    You should have received a copy of the GNU Library General Public License
00015    along with this library; see the file COPYING.LIB.  If not, write to
00016    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00017    Boston, MA 02111-1307, USA.
00018 */
00019 #ifndef KOSPELL_H
00020 #define KOSPELL_H
00021 
00023 #include <config.h>
00024 
00025 #ifdef HAVE_LIBKSPELL2
00026 
00027 #include <qobject.h>
00028 #include <qstringlist.h>
00029 #include <qstring.h>
00030 
00031 #include <kspell2/backgroundchecker.h>
00032 #include <koffice_export.h>
00033 class KoTextIterator;
00034 class KoTextParag;
00035 class KoTextObject;
00036 class KoTextDocument;
00037 namespace KSpell2
00038 {
00039     class Settings;
00040 }
00041 
00050 class KOTEXT_EXPORT KoSpell : public KSpell2::BackgroundChecker
00051 {
00052     Q_OBJECT
00053 
00054 public:
00055     KoSpell( const KSpell2::Broker::Ptr& broker, QObject *parent =0,
00056              const char *name =0 );
00061     virtual ~KoSpell();
00062 
00066     bool checking() const;
00067 
00075     virtual bool check( KoTextIterator *itr, bool dialog = false );
00076     virtual bool check( KoTextParag *parag );
00077     virtual bool checkWordInParagraph( KoTextParag *parag, int pos,
00078                                        QString& word, int& start );
00079 
00080     KoTextParag  *currentParag() const;
00081     KoTextObject *currentTextObject() const;
00082     int currentStartIndex() const;
00083 
00084     KoTextDocument *textDocument() const;
00085 
00089     KSpell2::Settings *settings() const;
00090 
00091 public slots:
00092     void slotCurrentParagraphDeleted();
00093 
00094 signals:
00098     void paragraphChecked( KoTextParag* );
00099 
00100     void aboutToFeedText();
00101 
00102 protected:
00103     virtual QString getMoreText();
00104     virtual void finishedCurrentFeed();
00105 
00106 private:
00107     class Private;
00108     Private *d;
00109 };
00110 #endif
00111 #endif
KDE Logo
This file is part of the documentation for lib Library Version 1.4.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Mon Feb 13 09:40:07 2006 by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2003