kdeui Library: ksconfig.h Source File (kdeui Library)

| # kdeui Library API Documentation
Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Namespaces | 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 #include <kdelibs_export.h>
    00026
    00027 class QCheckBox;
    00028 class QComboBox;
    00029 class QLabel;
    00030
    00031 class KConfig;
    00032 class KSpellConfigPrivate;
    00033
    00034 // Should be replaced by the charset strings
    00035 // because the config file would be more stable
    00036 // when inserting entries in the list
    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     //void setPersonalDict (const char *s);
    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     //QString personalDict () const;
    00190     int encoding() const;
    00191     QStringList ignoreList() const;
    00192     QStringList replaceAllList() const;
    00193
    00194     int client() const; //see enums at top of file
    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     //void sBrowseDict();
    00241     //void sBrowsePDict();
    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     //void textChanged1 (const char *);
    00250     //void textChanged2 (const char *);
    00251
    00252   protected:
    00253     // The options
    00254     int enc;            //1 ==> -Tlatin1
    00255     bool bnorootaffix;      // -m
    00256     bool bruntogether;      // -B
    00257     bool dictfromlist;
    00258     bool nodialog;
    00259     QString qsdict;     // -d [dict]
    00260     QString qspdict;        // -p [dict]
    00261     QStringList ignorelist;
    00262     enum {rdictlist=3, rencoding=4, rhelp=6};
    00263     KConfig *kc;
    00264     int iclient;            // defaults to ispell, may be aspell, too
    00265
    00266     QCheckBox *cb1, *cb2;
    00267     //KLineEdit *kle1, *kle2;
    00268     //QButtonGroup *dictgroup;
    00269     //QRadioButton *dictlistbutton, *dicteditbutton;
    00270     QLabel *dictlist;
    00271     QComboBox *dictcombo, *encodingcombo, *clientcombo;
    00272     //QPushButton *browsebutton1;
    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.1.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sat Jun 11 20:20:22 2005 by doxygen 1.4.1 written by Dimitri van Heesch, © 1997-2003