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 / settings.h < prev   
Encoding:
C/C++ Source or Header  |  2005-10-10  |  2.1 KB  |  79 lines

  1. // -*- Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*-
  2. /**
  3.  * settings.h
  4.  *
  5.  * Copyright (C)  2003  Zack Rusin <zack@kde.org>
  6.  *
  7.  * This library is free software; you can redistribute it and/or
  8.  * modify it under the terms of the GNU Lesser General Public
  9.  * License as published by the Free Software Foundation; either
  10.  * version 2.1 of the License, or (at your option) any later version.
  11.  *
  12.  * This library is distributed in the hope that it will be useful,
  13.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  15.  * Lesser General Public License for more details.
  16.  *
  17.  * You should have received a copy of the GNU Lesser General Public
  18.  * License along with this library; if not, write to the Free Software
  19.  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  20.  * 02110-1301  USA
  21.  */
  22. #ifndef KSPELL_SETTINGS_H
  23. #define KSPELL_SETTINGS_H
  24.  
  25. #include <qstringlist.h>
  26. #include <qstring.h>
  27. #include <kdelibs_export.h>
  28.  
  29. class KSharedConfig;
  30.  
  31. namespace KSpell2
  32. {
  33.     class Broker;
  34.  
  35.     class KDE_EXPORT Settings
  36.     {
  37.     public:
  38.         ~Settings();
  39.  
  40.         void setDefaultLanguage( const QString& lang );
  41.         QString defaultLanguage() const;
  42.  
  43.         void setDefaultClient( const QString& client );
  44.         QString defaultClient() const;
  45.  
  46.         void setCheckUppercase( bool );
  47.         bool checkUppercase() const;
  48.  
  49.         void setSkipRunTogether( bool );
  50.         bool skipRunTogether() const;
  51.  
  52.         void setBackgroundCheckerEnabled( bool );
  53.         bool backgroundCheckerEnabled() const;
  54.  
  55.         void setCurrentIgnoreList( const QStringList& ignores );
  56.         void addWordToIgnore( const QString& word );
  57.         QStringList currentIgnoreList() const;
  58.         bool ignore( const QString& word );
  59.  
  60.         void save();
  61.  
  62.         KSharedConfig *sharedConfig() const;
  63.  
  64.     private:
  65.         void loadConfig();
  66.         void readIgnoreList();
  67.         void setQuietIgnoreList( const QStringList& ignores );
  68.  
  69.     private:
  70.         friend class Broker;
  71.         Settings( Broker *broker, KSharedConfig *config );
  72.     private:
  73.         class Private;
  74.         Private *d;
  75.     };
  76. }
  77.  
  78. #endif
  79.