org.kde.koala

Class KSpellConfig

public class KSpellConfig extends QWidget

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. See KSpellConfigSignals for signals emitted by KSpellConfig

Author: David Sweet

See Also: KSpell

UNKNOWN: A configuration class/dialog for KSpell.

Field Summary
static intrdictlist
static intrencoding
static intrhelp
Constructor Summary
protected KSpellConfig(Class dummy)
KSpellConfig(QWidget parent, String name, KSpellConfig spellConfig, boolean addHelpButton)
Constructs a KSpellConfig with default or custom settings.
KSpellConfig(QWidget parent, String name, KSpellConfig spellConfig)
KSpellConfig(QWidget parent, String name)
KSpellConfig(QWidget parent)
KSpellConfig()
KSpellConfig(KSpellConfig arg1)
Method Summary
voidactivateHelp()
Use this function to activate the help information for this widget.
StringclassName()
intclient()
booleandictFromList()
Stringdictionary()
voiddispose()
Delete the wrapped C++ instance ahead of finalize()
intencoding()
voidfillDicts(QComboBox box, String[] dictionaries)
Fills box with the human readable, translated dictionary names and selects the currently used dictionary (this will be the global dictionary if you call KSpellConfig directly after the constructor).
voidfillDicts(QComboBox box)
protected voidfillInDialog()
protected voidfinalize()
Deletes the wrapped C++ instance
ArrayListignoreList()
protected booleaninterpret(StringBuffer fname, StringBuffer lname, StringBuffer hname)
This takes a dictionary file name and provides both a language abbreviation appropriate for the $LANG variable, and a human-readable name.
booleanisDisposed()
Has the wrapped C++ instance been deleted?
QMetaObjectmetaObject()
booleannoRootAffix()
Options reading routines.
booleanreadGlobalSettings()
ArrayListreplaceAllList()
booleanrunTogether()
protected voidsChangeClient(int arg1)
protected voidsChangeEncoding(int arg1)
protected voidsDictionary(boolean arg1)
voidsetClient(int client)
voidsetDictFromList(boolean dfl)
voidsetDictionary(String qs)
Set the name of the dictionary to use.
voidsetEncoding(int enctype)
voidsetIgnoreList(String[] _ignorelist)
The _ignorelist contains words you'd like KSpell to ignore when it is spellchecking.
voidsetNoRootAffix(boolean arg1)
Set an ISpell option.
voidsetReplaceAllList(String[] _replaceAllList)
The _replaceAllList contains word you like that replace word.
voidsetRunTogether(boolean arg1)
Set an ISpell option.
protected voidsHelp()
Invokes the help documentation for kspell
protected voidsNoAff(boolean arg1)
protected voidsPathDictionary(boolean arg1)
protected voidsRunTogether(boolean arg1)
protected voidsSetDictionary(int arg1)
booleanwriteGlobalSettings()
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.

Field Detail

rdictlist

public static final int rdictlist

rencoding

public static final int rencoding

rhelp

public static final int rhelp

Constructor Detail

KSpellConfig

protected KSpellConfig(Class dummy)

KSpellConfig

public KSpellConfig(QWidget parent, String name, KSpellConfig spellConfig, boolean addHelpButton)
Constructs a KSpellConfig with default or custom settings.

Parameters: parent Parent of the widget. name Widget name. spellConfig Predefined configuration. If this parameter is 0, a default configuration will be used. addHelpButton Enabled or hides a help button. See activateHelp for more information.

UNKNOWN: Constructs a KSpellConfig with default or custom settings.

KSpellConfig

public KSpellConfig(QWidget parent, String name, KSpellConfig spellConfig)

KSpellConfig

public KSpellConfig(QWidget parent, String name)

KSpellConfig

public KSpellConfig(QWidget parent)

KSpellConfig

public KSpellConfig()

KSpellConfig

public KSpellConfig(KSpellConfig arg1)

Method Detail

activateHelp

public void activateHelp()
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

UNKNOWN: Use this function to activate the help information for this widget.

className

public String className()

client

public int client()

dictFromList

public boolean dictFromList()

dictionary

public String dictionary()

dispose

public void dispose()
Delete the wrapped C++ instance ahead of finalize()

encoding

public int encoding()

fillDicts

public void fillDicts(QComboBox box, String[] dictionaries)
Fills box with the human readable, translated dictionary names and selects the currently used dictionary (this will be the global dictionary if you call KSpellConfig directly after the constructor). If dictionaries isn't 0 then dictionaries will be filled with the corresponding internal dictionary names that are necessary to set the dictionary with KSpellConfig.

Parameters: box Will be filled with the translated dictionary names. dictionaries Will be filled with the internal dictionary names.

UNKNOWN: Get the translated dictionary names and, optionally, the corresponding internal dictionary names.

fillDicts

public void fillDicts(QComboBox box)

fillInDialog

protected void fillInDialog()

finalize

protected void finalize()
Deletes the wrapped C++ instance

ignoreList

public ArrayList ignoreList()

interpret

protected boolean interpret(StringBuffer fname, StringBuffer lname, StringBuffer hname)
This takes a dictionary file name and provides both a language abbreviation appropriate for the $LANG variable, and a human-readable name. It also truncates ".aff" at the end of fname.

Parameters: fname the dictionary name file (input) lname the language abbreviation, such as de for German (output) hname the human-readable name, such as Deutsch (output)

Returns: true if

lname.data()==$LANG

UNKNOWN: This takes a dictionary file name and provides both a language abbreviation appropriate for the $LANG variable, and a human-readable name.

isDisposed

public boolean isDisposed()
Has the wrapped C++ instance been deleted?

metaObject

public QMetaObject metaObject()

noRootAffix

public boolean noRootAffix()
Options reading routines.

UNKNOWN: Options reading routines.

readGlobalSettings

public boolean readGlobalSettings()

replaceAllList

public ArrayList replaceAllList()

runTogether

public boolean runTogether()

sChangeClient

protected void sChangeClient(int arg1)

sChangeEncoding

protected void sChangeEncoding(int arg1)

sDictionary

protected void sDictionary(boolean arg1)

setClient

public void setClient(int client)

setDictFromList

public void setDictFromList(boolean dfl)

setDictionary

public void setDictionary(String qs)
Set the name of the dictionary to use.

UNKNOWN: Set the name of the dictionary to use.

setEncoding

public void setEncoding(int enctype)

UNKNOWN:

setIgnoreList

public void setIgnoreList(String[] _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.

UNKNOWN:

setNoRootAffix

public void setNoRootAffix(boolean arg1)
Set an ISpell option. If true, don't create root-affix combinations.

UNKNOWN: Set an ISpell option.

setReplaceAllList

public void setReplaceAllList(String[] _replaceAllList)
The _replaceAllList contains word you like that replace word. Be careful that this list contains word which is replaced and new word.

UNKNOWN: The _replaceAllList contains word you like that replace word.

setRunTogether

public void setRunTogether(boolean arg1)
Set an ISpell option. If true, treat run-together words a valid.

UNKNOWN: Set an ISpell option.

sHelp

protected void sHelp()
Invokes the help documentation for kspell

UNKNOWN: Invokes the help documentation for kspell

sNoAff

protected void sNoAff(boolean arg1)

sPathDictionary

protected void sPathDictionary(boolean arg1)

sRunTogether

protected void sRunTogether(boolean arg1)

sSetDictionary

protected void sSetDictionary(int arg1)

writeGlobalSettings

public boolean 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.

UNKNOWN: 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.