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 KS_E_CP1255=15
00052 };
00053
00054 enum KSpellClients {
00055 KS_CLIENT_ISPELL=0,
00056 KS_CLIENT_ASPELL=1,
00057 KS_CLIENT_HSPELL=2
00058 };
00059
00081 class KSpellConfig : public QWidget
00082 {
00083 Q_OBJECT
00084
00085 public:
00097 KSpellConfig( QWidget *parent=0, const char *name=0,
00098 KSpellConfig *spellConfig=0, bool addHelpButton = true );
00099
00100 KSpellConfig (const KSpellConfig &);
00101
00102 virtual ~KSpellConfig ();
00103
00104 void operator= (const KSpellConfig &ksc);
00105
00120 void setIgnoreList (QStringList _ignorelist);
00121
00127 void setReplaceAllList (QStringList _replaceAllList);
00128
00134 void setNoRootAffix (bool);
00135
00141 void setRunTogether(bool);
00142
00146 void setDictionary (const QString qs);
00147 void setDictFromList (bool dfl);
00148
00149
00153 void setEncoding (int enctype);
00154 void setClient (int client);
00155
00159 bool noRootAffix () const;
00160 bool runTogether() const;
00161 const QString dictionary () const;
00162 bool dictFromList () const;
00163
00164 int encoding () const;
00165 QStringList ignoreList () const;
00166 QStringList replaceAllList () const;
00167
00168 int client () const;
00169
00175 bool writeGlobalSettings ();
00176
00177 protected:
00178 void fillInDialog();
00179 bool readGlobalSettings();
00180
00190 bool interpret( QString &fname, QString &lname, QString &hname );
00191
00192
00193 public slots:
00202 void activateHelp( void );
00203
00204
00205 protected slots:
00206 void sHelp();
00207
00208
00209 void sNoAff(bool);
00210 void sRunTogether(bool);
00211 void sDictionary(bool);
00212 void sPathDictionary(bool);
00213 void sSetDictionary (int);
00214 void sChangeEncoding (int);
00215 void sChangeClient (int);
00216
00217
00218
00219 protected:
00220
00221 int enc;
00222 bool bnorootaffix;
00223 bool bruntogether;
00224 bool dictfromlist;
00225 bool nodialog;
00226 QString qsdict;
00227 QString qspdict;
00228 QStringList ignorelist;
00229 enum {rdictlist=3, rencoding=4, rhelp=6};
00230 KConfig *kc;
00231 int iclient;
00232
00233 QCheckBox *cb1, *cb2;
00234
00235
00236
00237 QLabel *dictlist;
00238 QComboBox *dictcombo, *encodingcombo, *clientcombo;
00239
00240 QStringList langfnames;
00241
00242 signals:
00243 void configChanged();
00244
00245 private:
00246 KSpellConfigPrivate *d;
00247 void getAvailDictsIspell();
00248 void getAvailDictsAspell();
00249 };
00250
00251 #endif
00252
00253
00254
00255
00256
This file is part of the documentation for kdelibs Version 3.1.4.