ksconfig.h Source File (kspell Library)

| # kspell Library API Documentation
Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Source Files

# ksconfig.h

    00001 /* This file is part of the KDE libraries
    00002    Copyright (C) 1997 David Sweet <dsweet@kde.org>
    00003
    00004    This library is free software; you can redistribute it and/or
    00005    modify it under the terms of the GNU Library General Public
    00006    License version 2 as published by the Free Software Foundation.
    00007
    00008    This library is distributed in the hope that it will be useful,
    00009    but WITHOUT ANY WARRANTY; without even the implied warranty of
    00010    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00011    Library General Public License for more details.
    00012
    00013    You should have received a copy of the GNU Library General Public License
    00014    along with this library; see the file COPYING.LIB.  If not, write to
    00015    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    00016    Boston, MA 02111-1307, USA.
    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 // Should be replaced by the charset strings
    00033 // because the config file would be more stable
    00034 // when inserting entries in the list
    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
    00102     virtual ~KSpellConfig ();
    00103
    00104     void operator= (const KSpellConfig &ksc);
    00105
    00120     void setIgnoreList (QStringList _ignorelist);
    00121
    00127     void setReplaceAllList (QStringList _replaceAllList);
    00128
    00134     void setNoRootAffix (bool);
    00135
    00141     void setRunTogether(bool);
    00142
    00146     void setDictionary (const QString qs);
    00147     void setDictFromList (bool dfl);
    00148     //void setPersonalDict (const char *s);
    00149
    00153     void setEncoding (int enctype);
    00154     void setClient (int client);
    00155
    00159     bool noRootAffix () const;
    00160     bool runTogether() const;
    00161     const QString dictionary () const;
    00162     bool dictFromList () const;
    00163     //QString personalDict () const;
    00164     int encoding () const;
    00165     QStringList ignoreList () const;
    00166     QStringList replaceAllList () const;
    00167
    00168     int client () const; //see enums at top of file
    00169
    00175     bool writeGlobalSettings ();
    00176
    00177   protected:
    00178     void fillInDialog();
    00179     bool readGlobalSettings();
    00180
    00190     bool interpret( QString &fname, QString &lname, QString &hname );
    00191
    00192
    00193   public slots:
    00202     void activateHelp( void );
    00203
    00204
    00205   protected slots:
    00206     void sHelp();
    00207     //void sBrowseDict();
    00208     //void sBrowsePDict();
    00209     void sNoAff(bool);
    00210     void sRunTogether(bool);
    00211     void sDictionary(bool);
    00212     void sPathDictionary(bool);
    00213     void sSetDictionary (int);
    00214     void sChangeEncoding (int);
    00215     void sChangeClient (int);
    00216     //void textChanged1 (const char *);
    00217     //void textChanged2 (const char *);
    00218
    00219   protected:
    00220     // The options
    00221     int enc;                    //1 ==> -Tlatin1
    00222     bool bnorootaffix;          // -m
    00223     bool bruntogether;          // -B
    00224     bool dictfromlist;
    00225     bool nodialog;
    00226     QString qsdict;             // -d [dict]
    00227     QString qspdict;            // -p [dict]
    00228     QStringList ignorelist;
    00229     enum {rdictlist=3, rencoding=4, rhelp=6};
    00230     KConfig *kc;
    00231     int iclient;            // defaults to ispell, may be aspell, too
    00232
    00233     QCheckBox *cb1, *cb2;
    00234     //KLineEdit *kle1, *kle2;
    00235     //QButtonGroup *dictgroup;
    00236     //QRadioButton *dictlistbutton, *dicteditbutton;
    00237     QLabel *dictlist;
    00238     QComboBox *dictcombo, *encodingcombo, *clientcombo;
    00239     //QPushButton *browsebutton1;
    00240     QStringList langfnames;
    00241
    00242 signals:
    00243     void configChanged();
    00244
    00245   private:
    00246     KSpellConfigPrivate *d;
    00247     void getAvailDictsIspell();
    00248     void getAvailDictsAspell();
    00249 };
    00250
    00251 #endif
    00252
    00253
    00254
    00255
    00256

This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Jan 28 13:27:46 2004 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001