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 #include <kdelibs_export.h>
00026
00027 class QCheckBox;
00028 class QComboBox;
00029 class QLabel;
00030
00031 class KConfig;
00032 class KSpellConfigPrivate;
00033
00034
00035
00036
00037 enum Encoding {
00038 KS_E_ASCII=0,
00039 KS_E_LATIN1=1,
00040 KS_E_LATIN2=2,
00041 KS_E_LATIN3=3,
00042 KS_E_LATIN4=4,
00043 KS_E_LATIN5=5,
00044 KS_E_LATIN7=6,
00045 KS_E_LATIN8=7,
00046 KS_E_LATIN9=8,
00047 KS_E_LATIN13=9,
00048 KS_E_LATIN15=10,
00049 KS_E_UTF8=11,
00050 KS_E_KOI8R=12,
00051 KS_E_KOI8U=13,
00052 KS_E_CP1251=14,
00053 KS_E_CP1255=15
00054 };
00055
00056 enum KSpellClients {
00057 KS_CLIENT_ISPELL=0,
00058 KS_CLIENT_ASPELL=1,
00059 KS_CLIENT_HSPELL=2
00060 };
00061
00083 class KDEUI_EXPORT KSpellConfig : public QWidget
00084 {
00085 Q_OBJECT
00086
00087 public:
00099 KSpellConfig( QWidget *parent=0, const char *name=0,
00100 KSpellConfig *spellConfig=0, bool addHelpButton = true );
00101
00102 KSpellConfig( const KSpellConfig & );
00103
00108 virtual ~KSpellConfig();
00109
00110 void operator=( const KSpellConfig &ksc );
00111
00130 void fillDicts( QComboBox* box, QStringList* dictionaries = 0 );
00131
00146 void setIgnoreList( QStringList _ignorelist );
00147
00153 void setReplaceAllList( QStringList _replaceAllList );
00154
00160 void setNoRootAffix( bool );
00161
00167 void setRunTogether( bool );
00168
00172 void setDictionary( const QString qs );
00173 void setDictFromList( bool dfl );
00174
00175
00179 void setEncoding( int enctype );
00180 void setClient( int client );
00181
00185 bool noRootAffix() const;
00186 bool runTogether() const;
00187 const QString dictionary() const;
00188 bool dictFromList() const;
00189
00190 int encoding() const;
00191 QStringList ignoreList() const;
00192 QStringList replaceAllList() const;
00193
00194 int client() const;
00195
00201 bool writeGlobalSettings();
00202
00203 bool readGlobalSettings();
00204 protected:
00205 void fillInDialog();
00206
00220 bool interpret( QString &fname, QString &lname, QString &hname );
00221
00222
00223 public slots:
00232 void activateHelp( void );
00233
00234
00235 protected slots:
00239 void sHelp();
00240
00241
00242 void sNoAff( bool );
00243 void sRunTogether( bool );
00244 void sDictionary( bool );
00245 void sPathDictionary( bool );
00246 void sSetDictionary( int );
00247 void sChangeEncoding( int );
00248 void sChangeClient( int );
00249
00250
00251
00252 protected:
00253
00254 int enc;
00255 bool bnorootaffix;
00256 bool bruntogether;
00257 bool dictfromlist;
00258 bool nodialog;
00259 QString qsdict;
00260 QString qspdict;
00261 QStringList ignorelist;
00262 enum {rdictlist=3, rencoding=4, rhelp=6};
00263 KConfig *kc;
00264 int iclient;
00265
00266 QCheckBox *cb1, *cb2;
00267
00268
00269
00270 QLabel *dictlist;
00271 QComboBox *dictcombo, *encodingcombo, *clientcombo;
00272
00273 QStringList langfnames;
00274
00275 signals:
00276 void configChanged();
00277
00278 private:
00279 KSpellConfigPrivate *d;
00280 void getAvailDictsIspell();
00281 void getAvailDictsAspell();
00282 };
00283
00284 #endif
00285
00286
00287
00288
00289
This file is part of the documentation for kdeui Library Version 3.4.0.