ksconfig.h
/* This file is part of the KDE libraries
Copyright (C) 1997 David Sweet <dsweet@kde.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License version 2 as published by the Free Software Foundation.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef KDELIBS_KSCONFIG_H
#define KDELIBS_KSCONFIG_H
#include <qwidget.h>
#include <qstring.h>
#include <qstringlist.h>
#include <kdelibs_export.h>
class QCheckBox;
class QComboBox;
class QLabel;
class KConfig;
class KSpellConfigPrivate;
enum Encoding {
KS_E_ASCII=0,
KS_E_LATIN1=1,
KS_E_LATIN2=2,
KS_E_LATIN3=3,
KS_E_LATIN4=4,
KS_E_LATIN5=5,
KS_E_LATIN7=6,
KS_E_LATIN8=7,
KS_E_LATIN9=8,
KS_E_LATIN13=9,
KS_E_LATIN15=10,
KS_E_UTF8=11,
KS_E_KOI8R=12,
KS_E_KOI8U=13,
KS_E_CP1251=14,
KS_E_CP1255=15
};
enum KSpellClients {
KS_CLIENT_ISPELL=0,
KS_CLIENT_ASPELL=1,
KS_CLIENT_HSPELL=2,
KS_CLIENT_ZEMBEREK=3
};
class KDEUI_EXPORT KSpellConfig : public QWidget
{
Q_OBJECT
public:
KSpellConfig( QWidget *parent=0, const char *name=0,
KSpellConfig *spellConfig=0, bool addHelpButton = true );
KSpellConfig( const KSpellConfig & );
virtual ~KSpellConfig();
void operator=( const KSpellConfig &ksc );
void fillDicts( QComboBox* box, QStringList* dictionaries = 0 );
void setIgnoreList( QStringList _ignorelist );
void setReplaceAllList( QStringList _replaceAllList );
void setNoRootAffix( bool );
void setRunTogether( bool );
void setDictionary( const QString qs );
void setDictFromList( bool dfl );
//void setPersonalDict (const char *s);
void setEncoding( int enctype );
void setClient( int client );
bool noRootAffix() const;
bool runTogether() const;
const QString dictionary() const;
bool dictFromList() const;
//QString personalDict () const;
int encoding() const;
QStringList ignoreList() const;
QStringList replaceAllList() const;
int client() const;
bool writeGlobalSettings();
bool readGlobalSettings();
protected:
void fillInDialog();
bool interpret( QString &fname, QString &lname, QString &hname );
public slots:
void activateHelp( void );
protected slots:
void sHelp();
//void sBrowseDict();
//void sBrowsePDict();
void sNoAff( bool );
void sRunTogether( bool );
void sDictionary( bool );
void sPathDictionary( bool );
void sSetDictionary( int );
void sChangeEncoding( int );
void sChangeClient( int );
//void textChanged1 (const char *);
//void textChanged2 (const char *);
protected:
// The options
int enc; // 1 ==> -Tlatin1
bool bnorootaffix; // -m
bool bruntogether; // -B
bool dictfromlist;
bool nodialog;
QString qsdict; // -d [dict]
QString qspdict; // -p [dict]
QStringList ignorelist;
enum {rdictlist=3, rencoding=4, rhelp=6};
KConfig *kc;
int iclient; // defaults to ispell, may be aspell, too
QCheckBox *cb1, *cb2;
//KLineEdit *kle1, *kle2;
//QButtonGroup *dictgroup;
//QRadioButton *dictlistbutton, *dicteditbutton;
QLabel *dictlist;
QComboBox *dictcombo, *encodingcombo, *clientcombo;
//QPushButton *browsebutton1;
QStringList langfnames;
signals:
void configChanged();
private:
KSpellConfigPrivate *d;
void getAvailDictsIspell();
void getAvailDictsAspell();
};
#endif // KDELIBS_KSCONFIG_H
KConfig
KSpellConfig
A configuration class/dialog for KSpell.
Definition: ksconfig.h:87

KDE Home | KDE Accessibility Home | Description of Access Keys