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