KSpellConfig Class Reference
A configuration class/dialog for KSpell. More...
#include <ksconfig.h>
Inheritance diagram for KSpellConfig:


Public Slots | |
void | activateHelp (void) |
Use this function to activate the help information for this widget. | |
Signals | |
void | configChanged () |
Public Member Functions | |
KSpellConfig (QWidget *parent=0, const char *name=0, KSpellConfig *spellConfig=0, bool addHelpButton=true) | |
Constructs a KSpellConfig with default or custom settings. | |
KSpellConfig (const KSpellConfig &) | |
void | operator= (const KSpellConfig &ksc) |
void | setIgnoreList (QStringList _ignorelist) |
The _ignorelist contains words you'd like KSpell to ignore when it is spellchecking. | |
void | setReplaceAllList (QStringList _replaceAllList) |
The _replaceAllList contains word you like that replace word. | |
void | setNoRootAffix (bool) |
Set an ISpell option. | |
void | setRunTogether (bool) |
Set an ISpell option. | |
void | setDictionary (const QString qs) |
Set the name of the dictionary to use. | |
void | setDictFromList (bool dfl) |
void | setEncoding (int enctype) |
void | setClient (int client) |
bool | noRootAffix () const |
Options reading routines. | |
bool | runTogether () const |
const QString | dictionary () const |
bool | dictFromList () const |
int | encoding () const |
QStringList | ignoreList () const |
QStringList | replaceAllList () const |
int | client () const |
bool | writeGlobalSettings () |
Call this method before this class is deleted if you want the settings you have (or the user has) chosen to become the global, default settings. | |
Protected Types | |
enum | { rdictlist = 3, rencoding = 4, rhelp = 6 } |
Protected Slots | |
void | sHelp () |
void | sNoAff (bool) |
void | sRunTogether (bool) |
void | sDictionary (bool) |
void | sPathDictionary (bool) |
void | sSetDictionary (int) |
void | sChangeEncoding (int) |
void | sChangeClient (int) |
Protected Member Functions | |
void | fillInDialog () |
bool | readGlobalSettings () |
bool | interpret (QString &fname, QString &lname, QString &hname) |
This takes a dictionary file name (fname) and returns a language abbreviation (lname; like de for German), appropriate for the $LANG variable, and a human-readble name (hname; like "Deutsch"). | |
Protected Attributes | |
int | enc |
bool | bnorootaffix |
bool | bruntogether |
bool | dictfromlist |
bool | nodialog |
QString | qsdict |
QString | qspdict |
QStringList | ignorelist |
KConfig * | kc |
int | iclient |
QCheckBox * | cb1 |
QCheckBox * | cb2 |
QLabel * | dictlist |
QComboBox * | dictcombo |
QComboBox * | encodingcombo |
QComboBox * | clientcombo |
QStringList | langfnames |
Detailed Description
A configuration class/dialog for KSpell.It contains all of the options settings.The options are set to default values by the constructor and can be reset either by using the public interface or by using KSpellConfig as a widget in a dialog (or, preferably a tabbed dialog using KDialogBase) and letting the user change the settings. This way an application that uses KSpell can either rely on the default settings (in the simplest case), offer a dialog to configure KSpell, or offer a dialog to configure KSpell _for_this_app_only_ (in which case, the application should save the settings for use next time it is run). This last option might be useful in an email program, for example, where people may be writing in a language different from that used for writing papers in their word processor.
- Author:
- David Sweet <dsweet@kde.org>
- Version:
- Id
- ksconfig.h,v 1.37.2.2 2003/09/05 10:46:36 livne Exp
- See also:
- KSpell
Definition at line 81 of file ksconfig.h.
Constructor & Destructor Documentation
|
Constructs a KSpellConfig with default or custom settings.
Definition at line 69 of file ksconfig.cpp. References QGridLayout::addMultiCellWidget(), QGridLayout::addWidget(), client(), KGlobal::config(), dictFromList(), dictionary(), encoding(), ignoreList(), QComboBox::insertItem(), KStdAccel::name(), noRootAffix(), runTogether(), setDictionary(), setIgnoreList(), QComboBox::setInsertionPolicy(), setNoRootAffix(), setRunTogether(), and KDialog::spacingHint(). |
Member Function Documentation
|
The
When you get a KSpellConfig object back from KSpell (using KSpell::kcConfig()), the Definition at line 793 of file ksconfig.cpp. Referenced by KSpell::ksConfig(), and KSpellConfig(). |
|
The Becarefull this list contains word which is replaced and new word. Definition at line 805 of file ksconfig.cpp. Referenced by KSpell::ksConfig(). |
|
Set an ISpell option.
If Definition at line 557 of file ksconfig.cpp. References QCheckBox::setChecked(). Referenced by KSpellConfig(). |
|
Set an ISpell option.
If Definition at line 566 of file ksconfig.cpp. References QCheckBox::setChecked(). Referenced by KSpellConfig(). |
|
Set the name of the dictionary to use.
Definition at line 575 of file ksconfig.cpp. References QString::find(), QString::length(), QString::remove(), and QComboBox::setCurrentItem(). Referenced by KSpellConfig(). |
|
Options reading routines.
Definition at line 639 of file ksconfig.cpp. Referenced by KSpellConfig(), and writeGlobalSettings(). |
|
Call this method before this class is deleted if you want the settings you have (or the user has) chosen to become the global, default settings.
Definition at line 193 of file ksconfig.cpp. References noRootAffix(), KConfigBase::sync(), and KConfigBase::writeEntry(). |
|
This takes a dictionary file name (fname) and returns a language abbreviation (lname; like de for German), appropriate for the $LANG variable, and a human-readble name (hname; like "Deutsch"). It also truncates ".aff" at the end of fname. TRUE is returned if lname.data()==$LANG Definition at line 239 of file ksconfig.cpp. References QString::find(), QString::fromLatin1(), QString::isEmpty(), KLocale::language(), QString::left(), QString::length(), KGlobal::locale(), QString::mid(), QString::remove(), QString::right(), QString::truncate(), KLocale::twoAlphaToCountryName(), and KLocale::twoAlphaToLanguageName(). |
|
Use this function to activate the help information for this widget. The function is particulary useful if the help button is not displayed as specified by the constructor. Normally you want to hide the help button if this widget is embedded into a larger dialog box that has its own help button. See kedit (optiondialog.cpp) for an example Definition at line 754 of file ksconfig.cpp. |
The documentation for this class was generated from the following files: