• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

KDE3Support

k3sconfig.h

Go to the documentation of this file.
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., 51 Franklin Street, Fifth Floor,
00016    Boston, MA 02110-1301, USA.
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     //void setPersonalDict (const char *s);
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     //QString personalDict () const;
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     //void sBrowseDict();
00247     //void sBrowsePDict();
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     //void textChanged1 (const char *);
00257     //void textChanged2 (const char *);
00258 
00259   protected:
00260     // The options
00261     int enc;            // 1 ==> -Tlatin1
00262     bool bdospellchecking;
00263     bool bnorootaffix;      // -m
00264     bool bruntogether;      // -B
00265     bool dictfromlist;
00266     bool nodialog;
00267     QString qsdict;     // -d [dict]
00268     QString qspdict;        // -p [dict]
00269     QStringList ignorelist;
00270     enum {rdictlist=3, rencoding=4, rhelp=6};
00271     KSharedConfig::Ptr kc;
00272     int iclient;            // defaults to ispell, may be aspell, too
00273 
00274     QCheckBox *cb0, *cb1, *cb2;
00275     //KLineEdit *kle1, *kle2;
00276     //QButtonGroup *dictgroup;
00277     //QRadioButton *dictlistbutton, *dicteditbutton;
00278     QLabel *dictlist;
00279     QComboBox *dictcombo, *encodingcombo, *clientcombo;
00280     //QPushButton *browsebutton1;
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 

KDE3Support

Skip menu "KDE3Support"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.7
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal