KDECore
settings_p.h
Go to the documentation of this file.
00001 // -*- Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- 00002 /* 00003 * 00004 * Copyright (C) 2003 Zack Rusin <zack@kde.org> 00005 * 00006 * This library is free software; you can redistribute it and/or 00007 * modify it under the terms of the GNU Lesser General Public 00008 * License as published by the Free Software Foundation; either 00009 * version 2.1 of the License, or (at your option) any later version. 00010 * 00011 * This library is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 * Lesser General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU Lesser General Public 00017 * License along with this library; if not, write to the Free Software 00018 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 00019 * 02110-1301 USA 00020 */ 00021 #ifndef SONNET_SETTINGS_P_H 00022 #define SONNET_SETTINGS_P_H 00023 00024 #include <QtCore/QStringList> 00025 #include <QtCore/QString> 00026 #include <kdecore_export.h> 00027 00028 class KConfig; 00029 00030 namespace Sonnet 00031 { 00032 class Loader; 00033 00037 class KDECORE_EXPORT Settings 00038 { 00039 public: 00040 ~Settings(); 00041 00042 bool modified() const; 00043 void setModified(bool modified); 00044 00045 void setDefaultLanguage(const QString &lang); 00046 QString defaultLanguage() const; 00047 00048 void setDefaultClient(const QString &client); 00049 QString defaultClient() const; 00050 00051 void setCheckUppercase(bool); 00052 bool checkUppercase() const; 00053 00054 void setSkipRunTogether(bool); 00055 bool skipRunTogether() const; 00056 00057 void setBackgroundCheckerEnabled(bool); 00058 bool backgroundCheckerEnabled() const; 00059 00060 void setCheckerEnabledByDefault(bool); 00061 bool checkerEnabledByDefault() const; 00062 00063 void setCurrentIgnoreList(const QStringList &ignores); 00064 void addWordToIgnore(const QString &word); 00065 QStringList currentIgnoreList() const; 00066 bool ignore(const QString &word); 00067 00068 void save(KConfig *config); 00069 void restore(KConfig *config); 00070 00071 int disablePercentageWordError() const; 00072 int disableWordErrorCount() const; 00073 00074 private: 00075 void readIgnoreList(KConfig *config); 00076 void setQuietIgnoreList(const QStringList &ignores); 00077 00078 private: 00079 friend class Loader; 00080 Settings(Loader *loader); 00081 private: 00082 class Private; 00083 Private *const d; 00084 }; 00085 } 00086 00087 #endif // SONNET_SETTINGS_P_H
KDE 4.6 API Reference