ksconfig.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef __KSCONFIG_H__
00019 #define __KSCONFIG_H__
00020
00021 #include <qwidget.h>
00022 #include <qstring.h>
00023 #include <qstringlist.h>
00024
00025 class QCheckBox;
00026 class QComboBox;
00027 class QLabel;
00028
00029 class KConfig;
00030 class KSpellConfigPrivate;
00031
00032
00033
00034
00035 enum Encoding {
00036 KS_E_ASCII=0,
00037 KS_E_LATIN1=1,
00038 KS_E_LATIN2=2,
00039 KS_E_LATIN3=3,
00040 KS_E_LATIN4=4,
00041 KS_E_LATIN5=5,
00042 KS_E_LATIN7=6,
00043 KS_E_LATIN8=7,
00044 KS_E_LATIN9=8,
00045 KS_E_LATIN13=9,
00046 KS_E_LATIN15=10,
00047 KS_E_UTF8=11,
00048 KS_E_KOI8R=12,
00049 KS_E_KOI8U=13,
00050 KS_E_CP1251=14
00051 };
00052
00053 enum KSpellClients {
00054 KS_CLIENT_ISPELL=0,
00055 KS_CLIENT_ASPELL=1
00056 };
00057
00079 class KSpellConfig : public QWidget
00080 {
00081 Q_OBJECT
00082
00083 public:
00095 KSpellConfig( QWidget *parent=0, const char *name=0,
00096 KSpellConfig *spellConfig=0, bool addHelpButton = true );
00097
00098 KSpellConfig (const KSpellConfig &);
00099
00100 virtual ~KSpellConfig ();
00101
00102 void operator= (const KSpellConfig &ksc);
00103
00118 void setIgnoreList (QStringList _ignorelist);
00119
00125 void setReplaceAllList (QStringList _replaceAllList);
00126
00132 void setNoRootAffix (bool);
00133
00139 void setRunTogether(bool);
00140
00144 void setDictionary (const QString qs);
00145 void setDictFromList (bool dfl);
00146
00147
00151 void setEncoding (int enctype);
00152 void setClient (int client);
00153
00157 bool noRootAffix () const;
00158 bool runTogether() const;
00159 const QString dictionary () const;
00160 bool dictFromList () const;
00161
00162 int encoding () const;
00163 QStringList ignoreList () const;
00164 QStringList replaceAllList () const;
00165
00166 int client () const;
00167
00173 bool writeGlobalSettings ();
00174
00175 protected:
00176 void fillInDialog();
00177 bool readGlobalSettings();
00178
00188 bool interpret( QString &fname, QString &lname, QString &hname );
00189
00190
00191 public slots:
00200 void activateHelp( void );
00201
00202
00203 protected slots:
00204 void sHelp();
00205
00206
00207 void sNoAff(bool);
00208 void sRunTogether(bool);
00209 void sDictionary(bool);
00210 void sPathDictionary(bool);
00211 void sSetDictionary (int);
00212 void sChangeEncoding (int);
00213 void sChangeClient (int);
00214
00215
00216
00217 protected:
00218
00219 int enc;
00220 bool bnorootaffix;
00221 bool bruntogether;
00222 bool dictfromlist;
00223 bool nodialog;
00224 QString qsdict;
00225 QString qspdict;
00226 QStringList ignorelist;
00227 enum {rdictlist=3, rencoding=4, rhelp=6};
00228 KConfig *kc;
00229 int iclient;
00230
00231 QCheckBox *cb1, *cb2;
00232
00233
00234
00235 QLabel *dictlist;
00236 QComboBox *dictcombo, *encodingcombo, *clientcombo;
00237
00238 QStringList langfnames;
00239
00240 signals:
00241 void configChanged();
00242
00243 private:
00244 KSpellConfigPrivate *d;
00245 void getAvailDictsIspell();
00246 void getAvailDictsAspell();
00247 };
00248
00249 #endif
00250
00251
00252
00253
00254
This file is part of the documentation for kdelibs Version 3.1.0.