home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / SLAX 6.0.8 / slax-6.0.8.iso / slax / base / 006-devel.lzm / usr / include / kspell2 / defaultdictionary.h < prev    next >
Encoding:
C/C++ Source or Header  |  2007-01-15  |  2.2 KB  |  72 lines

  1. /*
  2.  * defaultdictionary.h
  3.  *
  4.  * Copyright (C)  2004  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 KSPELL_DEFAULTDICTIONARY_H
  22. #define KSPELL_DEFAULTDICTIONARY_H
  23.  
  24. #include "dictionary.h"
  25.  
  26. #include <qobject.h>
  27. #include <qstringlist.h>
  28.  
  29. namespace KSpell2
  30. {
  31.     class Broker;
  32.     class DefaultDictionary : public QObject,
  33.                               public Dictionary
  34.     {
  35.         Q_OBJECT
  36.     public:
  37.         DefaultDictionary( const QString& lang, Broker *broker );
  38.         ~DefaultDictionary();
  39.     public:
  40.         /**
  41.          * Returns true whether the default dictionary object is
  42.          * valid.
  43.          * It might not be if there's no dictionary object
  44.          * for the default language.
  45.          */
  46.         bool isValid() const;
  47.  
  48.         //Dictionary interface
  49.         virtual bool check( const QString& word );
  50.         virtual QStringList suggest( const QString& word );
  51.         virtual bool checkAndSuggest( const QString& word,
  52.                                       QStringList& suggestions );
  53.         virtual bool storeReplacement( const QString& bad,
  54.                                        const QString& good );
  55.         virtual bool addToPersonal( const QString& word );
  56.         virtual bool addToSession( const QString& word );
  57.         //end of Dictionary interfaces
  58.  
  59.     signals:
  60.         void changed();
  61.  
  62.     protected slots:
  63.         void defaultConfigurationChanged();
  64.  
  65.     private:
  66.         class Private;
  67.         Private *d;
  68.     };
  69. }
  70.  
  71. #endif
  72.