KDE3Support
k3sconfig.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
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
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
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
00249
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
00259
00260
00261 protected:
00262
00263 int enc;
00264 bool bdospellchecking;
00265 bool bnorootaffix;
00266 bool bruntogether;
00267 bool dictfromlist;
00268 bool nodialog;
00269 QString qsdict;
00270 QString qspdict;
00271 QStringList ignorelist;
00272 enum {rdictlist=3, rencoding=4, rhelp=6};
00273 KSharedConfig::Ptr kc;
00274 int iclient;
00275
00276 QCheckBox *cb0, *cb1, *cb2;
00277
00278
00279
00280 QLabel *dictlist;
00281 QComboBox *dictcombo, *encodingcombo, *clientcombo;
00282
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