class KSpellConfig

A configuration class/dialog for KSpell. More...

Definition#include <ksconfig.h>
InheritsQWidget (kdecore)
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Public Slots

Protected Types

Protected Methods

Protected Slots

Protected Members


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.

 KSpellConfig ( QWidget *parent=0, const char *name=0, KSpellConfig *spellConfig=0, bool addHelpButton = true )

Create a KSpellConfig with default or custom settings.

Parameters:
parentParent of the widget.
nameWidget name.
spellConfigPredefined configuration. If this parameter is 0, a default configuration will be used.
addHelpButtonEnabled or hides a help button. See activateHelp for more information.

void  setIgnoreList (QStringList _ignorelist)

The ignorelist contains words you'd like KSpell to ignore when it is spellchecking. When you get a KSpellConfig object back from KSpell (using KSpell::kcConfig()), the ignorelist contains whatever was put in by you plus any words the user has chosen to ignore via the dialog box. It may be useful to save this list with the document being edited to facilitate quicker future spellchecking.

void  setNoRootAffix (bool)

Set an ISpell option.

If true, don't create root-affix combinations.

void  setRunTogether (bool)

Set an ISpell option.

If true, treat run-together words a valid.

void  setDictionary (const QString qs)

Set the name of the dictionary to use.

void  setEncoding (int enctype)

bool  noRootAffix ()

[const]

Options reading routines.

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.

bool  interpret ( QString &fname, QString &lname, QString &hname )

[protected]

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

void  activateHelp ( void )

[slot]

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