settings.h00001
00022 #ifndef KSPELL_SETTINGS_H
00023 #define KSPELL_SETTINGS_H
00024
00025 #include <qstringlist.h>
00026 #include <qstring.h>
00027 #include <kdelibs_export.h>
00028
00029 class KSharedConfig;
00030
00031 namespace KSpell2
00032 {
00033 class Broker;
00034
00035 class KDE_EXPORT Settings
00036 {
00037 public:
00038 ~Settings();
00039
00040 void setDefaultLanguage( const QString& lang );
00041 QString defaultLanguage() const;
00042
00043 void setDefaultClient( const QString& client );
00044 QString 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 QStringList& ignores );
00056 void addWordToIgnore( const QString& word );
00057 QStringList currentIgnoreList() const;
00058 bool ignore( const QString& word );
00059
00060 void save();
00061
00062 KSharedConfig *sharedConfig() const;
00063
00064 private:
00065 void loadConfig();
00066 void readIgnoreList();
00067 void setQuietIgnoreList( const QStringList& ignores );
00068
00069 private:
00070 friend class Broker;
00071 Settings( Broker *broker, KSharedConfig *config );
00072 private:
00073 class Private;
00074 Private *d;
00075 };
00076 }
00077
00078 #endif
|