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 #ifndef KDELIBS_KSCONFIG_H
00019 #define KDELIBS_KSCONFIG_H
00020
00021 #include <kde3support_export.h>
00022 #include <ksharedconfig.h>
00023
00024 #include <QtGui/QWidget>
00025 #include <QtCore/QStringList>
00026
00027 class QCheckBox;
00028 class QComboBox;
00029 class QLabel;
00030
00031 class K3SpellConfigPrivate;
00032
00040 enum Encoding {
00041 KS_E_ASCII=0,
00042 KS_E_LATIN1=1,
00043 KS_E_LATIN2=2,
00044 KS_E_LATIN3=3,
00045 KS_E_LATIN4=4,
00046 KS_E_LATIN5=5,
00047 KS_E_LATIN7=6,
00048 KS_E_LATIN8=7,
00049 KS_E_LATIN9=8,
00050 KS_E_LATIN13=9,
00051 KS_E_LATIN15=10,
00052 KS_E_UTF8=11,
00053 KS_E_KOI8R=12,
00054 KS_E_KOI8U=13,
00055 KS_E_CP1251=14,
00056 KS_E_CP1255=15
00057 };
00058
00059 enum K3SpellClients {
00060 KS_CLIENT_ISPELL=0,
00061 KS_CLIENT_ASPELL=1,
00062 KS_CLIENT_HSPELL=2,
00063 KS_CLIENT_ZEMBEREK=3
00064 };
00065
00086 class KDE3SUPPORT_EXPORT_DEPRECATED K3SpellConfig : public QWidget
00087 {
00088 Q_OBJECT
00089
00090 public:
00101 explicit K3SpellConfig( QWidget *parent=0,
00102 K3SpellConfig *spellConfig=0, bool addHelpButton = true );
00103
00104 K3SpellConfig( const K3SpellConfig & );
00105
00110 virtual ~K3SpellConfig();
00111
00112 void operator=( const K3SpellConfig &ksc );
00113
00130 void fillDicts( QComboBox* box, QStringList* dictionaries = 0 );
00131
00146 void setIgnoreList( const QStringList &_ignorelist );
00147
00153 void setReplaceAllList( const QStringList &_replaceAllList );
00154
00160 void setNoRootAffix( bool );
00161
00165 void setDoSpellChecking( bool b);
00166
00172 void setRunTogether( bool );
00173
00177 void setDictionary( const QString qs );
00178 void setDictFromList( bool dfl );
00179
00180
00184 void setEncoding( int enctype );
00185 void setClient( int client );
00186
00190 bool doSpellChecking() const;
00191 bool noRootAffix() const;
00192 bool runTogether() const;
00193 const QString dictionary() const;
00194 bool dictFromList() const;
00195
00196 int encoding() const;
00197 QStringList ignoreList() const;
00198 QStringList replaceAllList() const;
00199
00200 int client() const;
00201
00207 bool writeGlobalSettings();
00208
00209 bool readGlobalSettings();
00210 protected:
00211 void fillInDialog();
00212
00226 bool interpret( const QString &fname, QString &lname, QString &hname );
00227
00228
00229 public Q_SLOTS:
00238 void activateHelp( void );
00239
00240
00241 protected Q_SLOTS:
00245 void sHelp();
00246
00247
00248 void sDoSpell();
00249 void sNoAff( bool );
00250 void sRunTogether( bool );
00251 void sDictionary( bool );
00252 void sPathDictionary( bool );
00253 void sSetDictionary( int );
00254 void sChangeEncoding( int );
00255 void sChangeClient( int );
00256
00257
00258
00259 protected:
00260
00261 int enc;
00262 bool bdospellchecking;
00263 bool bnorootaffix;
00264 bool bruntogether;
00265 bool dictfromlist;
00266 bool nodialog;
00267 QString qsdict;
00268 QString qspdict;
00269 QStringList ignorelist;
00270 enum {rdictlist=3, rencoding=4, rhelp=6};
00271 KSharedConfig::Ptr kc;
00272 int iclient;
00273
00274 QCheckBox *cb0, *cb1, *cb2;
00275
00276
00277
00278 QLabel *dictlist;
00279 QComboBox *dictcombo, *encodingcombo, *clientcombo;
00280
00281 QStringList langfnames;
00282
00283 Q_SIGNALS:
00284 void configChanged();
00285
00286 private:
00287 K3SpellConfigPrivate *const d;
00288 void getAvailDictsIspell();
00289 void getAvailDictsAspell();
00290 };
00291
00292 #endif // KDELIBS_KSCONFIG_H
00293
00294
00295
00296
00297