settings.h
00001 // -*- Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- 00022 #ifndef TDESPELL_SETTINGS_H 00023 #define TDESPELL_SETTINGS_H 00024 00025 #include <tqstringlist.h> 00026 #include <tqstring.h> 00027 #include <tdelibs_export.h> 00028 00029 class TDESharedConfig; 00030 00031 namespace KSpell2 00032 { 00033 class Broker; 00034 00035 class KDE_EXPORT Settings 00036 { 00037 public: 00038 ~Settings(); 00039 00040 void setDefaultLanguage( const TQString& lang ); 00041 TQString defaultLanguage() const; 00042 00043 void setDefaultClient( const TQString& client ); 00044 TQString defaultClient() const; 00045 00046 void setCheckUppercase( bool ); 00047 bool checkUppercase() const; 00048 00049 void setSkipRunTogether( bool ); 00050 bool skipRunTogether() const; 00051 00052 void setBackgroundCheckerEnabled( bool ); 00053 bool backgroundCheckerEnabled() const; 00054 00055 void setCurrentIgnoreList( const TQStringList& ignores ); 00056 void addWordToIgnore( const TQString& word ); 00057 TQStringList currentIgnoreList() const; 00058 bool ignore( const TQString& word ); 00059 00060 void save(); 00061 00062 TDESharedConfig *sharedConfig() const; 00063 00064 private: 00065 void loadConfig(); 00066 void readIgnoreList(); 00067 void setQuietIgnoreList( const TQStringList& ignores ); 00068 00069 private: 00070 friend class Broker; 00071 Settings( Broker *broker, TDESharedConfig *config ); 00072 private: 00073 class Private; 00074 Private *d; 00075 }; 00076 } 00077 00078 #endif