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 
00106     virtual ~KSpellConfig();
00107 
00108     void operator=( const KSpellConfig &ksc );
00109 
00128     void fillDicts( QComboBox* box, QStringList* dictionaries = 0 );
00129 
00144     void setIgnoreList( QStringList _ignorelist );
00145 
00151     void setReplaceAllList( QStringList _replaceAllList );
00152 
00158     void setNoRootAffix( bool );
00159 
00165     void setRunTogether( bool );
00166 
00170     void setDictionary( const QString qs );
00171     void setDictFromList( bool dfl );
00172     
00173 
00177     void setEncoding( int enctype );
00178     void setClient( int client );
00179 
00183     bool noRootAffix() const;
00184     bool runTogether() const;
00185     const QString dictionary() const;
00186     bool dictFromList() const;
00187     
00188     int encoding() const;
00189     QStringList ignoreList() const;
00190     QStringList replaceAllList() const;
00191 
00192     int client() const; 
00193 
00199     bool writeGlobalSettings();
00200 
00201     bool readGlobalSettings();
00202   protected:
00203     void fillInDialog();
00204 
00214     bool interpret( QString &fname, QString &lname, QString &hname );
00215 
00216 
00217   public slots:
00226     void activateHelp( void );
00227 
00228 
00229   protected slots:
00233     void sHelp();
00234     
00235     
00236     void sNoAff( bool );
00237     void sRunTogether( bool );
00238     void sDictionary( bool );
00239     void sPathDictionary( bool );
00240     void sSetDictionary( int );
00241     void sChangeEncoding( int );
00242     void sChangeClient( int );
00243     
00244     
00245 
00246   protected:
00247     
00248     int enc;            
00249     bool bnorootaffix;      
00250     bool bruntogether;      
00251     bool dictfromlist;
00252     bool nodialog;
00253     QString qsdict;     
00254     QString qspdict;        
00255     QStringList ignorelist;
00256     enum {rdictlist=3, rencoding=4, rhelp=6};
00257     KConfig *kc;
00258     int iclient;            
00259 
00260     QCheckBox *cb1, *cb2;
00261     
00262     
00263     
00264     QLabel *dictlist;
00265     QComboBox *dictcombo, *encodingcombo, *clientcombo;
00266     
00267     QStringList langfnames;
00268 
00269 signals:
00270     void configChanged();
00271 
00272 private:
00273     KSpellConfigPrivate *d;
00274     void getAvailDictsIspell();
00275     void getAvailDictsAspell();
00276 };
00277 
00278 #endif
00279 
00280 
00281 
00282 
00283 
 
This file is part of the documentation for kdeui Library Version 3.2.0.