KDE3Support
k3sconfig.h
Go to the documentation of this file.
00001 /* This file is part of the KDE libraries 00002 Copyright (C) 1997 David Sweet <dsweet@kde.org> 00003 Copyright (C) 2007-2008 Kevin Kofler <Kevin@tigcc.ticalc.org> 00004 00005 This library is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU Library General Public 00007 License version 2 as published by the Free Software Foundation. 00008 00009 This library is distributed in the hope that it will be useful, 00010 but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 Library General Public License for more details. 00013 00014 You should have received a copy of the GNU Library General Public License 00015 along with this library; see the file COPYING.LIB. If not, write to 00016 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00017 Boston, MA 02110-1301, USA. 00018 */ 00019 #ifndef KDELIBS_KSCONFIG_H 00020 #define KDELIBS_KSCONFIG_H 00021 00022 #include <kde3support_export.h> 00023 #include <ksharedconfig.h> 00024 00025 #include <QtGui/QWidget> 00026 #include <QtCore/QStringList> 00027 00028 class QCheckBox; 00029 class QComboBox; 00030 class QLabel; 00031 00032 class K3SpellConfigPrivate; 00033 00041 enum Encoding { 00042 KS_E_ASCII=0, 00043 KS_E_LATIN1=1, 00044 KS_E_LATIN2=2, 00045 KS_E_LATIN3=3, 00046 KS_E_LATIN4=4, 00047 KS_E_LATIN5=5, 00048 KS_E_LATIN7=6, 00049 KS_E_LATIN8=7, 00050 KS_E_LATIN9=8, 00051 KS_E_LATIN13=9, 00052 KS_E_LATIN15=10, 00053 KS_E_UTF8=11, 00054 KS_E_KOI8R=12, 00055 KS_E_KOI8U=13, 00056 KS_E_CP1251=14, 00057 KS_E_CP1255=15 00058 }; 00059 00060 enum K3SpellClients { 00061 KS_CLIENT_ISPELL=0, 00062 KS_CLIENT_ASPELL=1, 00063 KS_CLIENT_HSPELL=2, 00064 KS_CLIENT_ZEMBEREK=3, 00065 KS_CLIENT_HUNSPELL=4 00066 }; 00067 00088 class KDE3SUPPORT_EXPORT_DEPRECATED K3SpellConfig : public QWidget 00089 { 00090 Q_OBJECT 00091 00092 public: 00103 explicit K3SpellConfig( QWidget *parent=0, 00104 K3SpellConfig *spellConfig=0, bool addHelpButton = true ); 00105 00106 K3SpellConfig( const K3SpellConfig & ); 00107 00112 virtual ~K3SpellConfig(); 00113 00114 void operator=( const K3SpellConfig &ksc ); 00115 00132 void fillDicts( QComboBox* box, QStringList* dictionaries = 0 ); 00133 00148 void setIgnoreList( const QStringList &_ignorelist ); 00149 00155 void setReplaceAllList( const QStringList &_replaceAllList ); 00156 00162 void setNoRootAffix( bool ); 00163 00167 void setDoSpellChecking( bool b); 00168 00174 void setRunTogether( bool ); 00175 00179 void setDictionary( const QString qs ); 00180 void setDictFromList( bool dfl ); 00181 //void setPersonalDict (const char *s); 00182 00186 void setEncoding( int enctype ); 00187 void setClient( int client ); 00188 00192 bool doSpellChecking() const; 00193 bool noRootAffix() const; 00194 bool runTogether() const; 00195 const QString dictionary() const; 00196 bool dictFromList() const; 00197 //QString personalDict () const; 00198 int encoding() const; 00199 QStringList ignoreList() const; 00200 QStringList replaceAllList() const; 00201 00202 int client() const; 00203 00209 bool writeGlobalSettings(); 00210 00211 bool readGlobalSettings(); 00212 protected: 00213 void fillInDialog(); 00214 00228 bool interpret( const QString &fname, QString &lname, QString &hname ); 00229 00230 00231 public Q_SLOTS: 00240 void activateHelp( void ); 00241 00242 00243 protected Q_SLOTS: 00247 void sHelp(); 00248 //void sBrowseDict(); 00249 //void sBrowsePDict(); 00250 void sDoSpell(); 00251 void sNoAff( bool ); 00252 void sRunTogether( bool ); 00253 void sDictionary( bool ); 00254 void sPathDictionary( bool ); 00255 void sSetDictionary( int ); 00256 void sChangeEncoding( int ); 00257 void sChangeClient( int ); 00258 //void textChanged1 (const char *); 00259 //void textChanged2 (const char *); 00260 00261 protected: 00262 // The options 00263 int enc; // 1 ==> -Tlatin1 00264 bool bdospellchecking; 00265 bool bnorootaffix; // -m 00266 bool bruntogether; // -B 00267 bool dictfromlist; 00268 bool nodialog; 00269 QString qsdict; // -d [dict] 00270 QString qspdict; // -p [dict] 00271 QStringList ignorelist; 00272 enum {rdictlist=3, rencoding=4, rhelp=6}; 00273 KSharedConfig::Ptr kc; 00274 int iclient; // defaults to ispell, may be aspell, too 00275 00276 QCheckBox *cb0, *cb1, *cb2; 00277 //KLineEdit *kle1, *kle2; 00278 //QButtonGroup *dictgroup; 00279 //QRadioButton *dictlistbutton, *dicteditbutton; 00280 QLabel *dictlist; 00281 QComboBox *dictcombo, *encodingcombo, *clientcombo; 00282 //QPushButton *browsebutton1; 00283 QStringList langfnames; 00284 00285 Q_SIGNALS: 00286 void configChanged(); 00287 00288 private: 00289 K3SpellConfigPrivate *const d; 00290 void getAvailDictsIspell(); 00291 void getAvailDictsAspell(); 00292 void getAvailDictsHunspell(); 00293 }; 00294 00295 #endif // KDELIBS_KSCONFIG_H 00296 00297 00298 00299 00300
KDE 4.6 API Reference