kdeui
KSpellConfig Class Reference
A configuration class/dialog for KSpell. More...
#include <ksconfig.h>
Public Slots | |
void | activateHelp (void) |
Signals | |
void | configChanged () |
Public Member Functions | |
int | client () const |
bool | dictFromList () const |
const QString | dictionary () const |
int | encoding () const |
void | fillDicts (QComboBox *box, QStringList *dictionaries=0) |
QStringList | ignoreList () const |
KSpellConfig (const KSpellConfig &) | |
KSpellConfig (QWidget *parent=0, const char *name=0, KSpellConfig *spellConfig=0, bool addHelpButton=true) | |
bool | noRootAffix () const |
void | operator= (const KSpellConfig &ksc) |
bool | readGlobalSettings () |
QStringList | replaceAllList () const |
bool | runTogether () const |
void | setClient (int client) |
void | setDictFromList (bool dfl) |
void | setDictionary (const QString qs) |
void | setEncoding (int enctype) |
void | setIgnoreList (QStringList _ignorelist) |
void | setNoRootAffix (bool) |
void | setReplaceAllList (QStringList _replaceAllList) |
void | setRunTogether (bool) |
bool | writeGlobalSettings () |
virtual | ~KSpellConfig () |
Protected Types | |
enum | { rdictlist = 3, rencoding = 4, rhelp = 6 } |
Protected Slots | |
void | sChangeClient (int) |
void | sChangeEncoding (int) |
void | sDictionary (bool) |
void | sHelp () |
void | sNoAff (bool) |
void | sPathDictionary (bool) |
void | sRunTogether (bool) |
void | sSetDictionary (int) |
Protected Member Functions | |
void | fillInDialog () |
bool | interpret (QString &fname, QString &lname, QString &hname) |
Protected Attributes | |
bool | bnorootaffix |
bool | bruntogether |
QCheckBox * | cb1 |
QCheckBox * | cb2 |
QComboBox * | clientcombo |
QComboBox * | dictcombo |
bool | dictfromlist |
QLabel * | dictlist |
int | enc |
QComboBox * | encodingcombo |
int | iclient |
QStringList | ignorelist |
KConfig * | kc |
QStringList | langfnames |
bool | nodialog |
QString | qsdict |
QString | qspdict |
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.
- See also:
- KSpell
Definition at line 87 of file ksconfig.h.
Member Enumeration Documentation
anonymous enum [protected] |
Constructor & Destructor Documentation
KSpellConfig::KSpellConfig | ( | QWidget * | parent = 0 , |
|
const char * | name = 0 , |
|||
KSpellConfig * | spellConfig = 0 , |
|||
bool | addHelpButton = true | |||
) |
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.
Definition at line 71 of file ksconfig.cpp.
KSpellConfig::KSpellConfig | ( | const KSpellConfig & | _ksc | ) |
Definition at line 48 of file ksconfig.cpp.
KSpellConfig::~KSpellConfig | ( | ) | [virtual] |
Member Function Documentation
void KSpellConfig::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
Definition at line 961 of file ksconfig.cpp.
int KSpellConfig::client | ( | ) | const |
void KSpellConfig::configChanged | ( | ) | [signal] |
bool KSpellConfig::dictFromList | ( | ) | const |
Definition at line 176 of file ksconfig.cpp.
const QString KSpellConfig::dictionary | ( | ) | const |
Definition at line 858 of file ksconfig.cpp.
int KSpellConfig::encoding | ( | ) | const |
Definition at line 871 of file ksconfig.cpp.
void KSpellConfig::fillDicts | ( | QComboBox * | box, | |
QStringList * | dictionaries = 0 | |||
) |
Get the translated dictionary names and, optionally, the corresponding internal dictionary names.
Fills box
with the human readable, translated dictionary names and selects the currently used dictionary (this will be the global dictionary if you call fillDicts 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 setDictionary.
- Parameters:
-
box Will be filled with the translated dictionary names. dictionaries Will be filled with the internal dictionary names.
- Since:
- 3.2
Definition at line 587 of file ksconfig.cpp.
void KSpellConfig::fillInDialog | ( | ) | [protected] |
Definition at line 375 of file ksconfig.cpp.
QStringList KSpellConfig::ignoreList | ( | ) | const |
Definition at line 1007 of file ksconfig.cpp.
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
Definition at line 251 of file ksconfig.cpp.
bool KSpellConfig::noRootAffix | ( | ) | const |
void KSpellConfig::operator= | ( | const KSpellConfig & | ksc | ) |
Definition at line 984 of file ksconfig.cpp.
bool KSpellConfig::readGlobalSettings | ( | ) |
Definition at line 182 of file ksconfig.cpp.
QStringList KSpellConfig::replaceAllList | ( | ) | const |
Definition at line 1020 of file ksconfig.cpp.
bool KSpellConfig::runTogether | ( | ) | const |
Definition at line 852 of file ksconfig.cpp.
void KSpellConfig::sChangeClient | ( | int | i | ) | [protected, slot] |
Definition at line 223 of file ksconfig.cpp.
void KSpellConfig::sChangeEncoding | ( | int | i | ) | [protected, slot] |
Definition at line 215 of file ksconfig.cpp.
void KSpellConfig::sDictionary | ( | bool | on | ) | [protected, slot] |
Definition at line 924 of file ksconfig.cpp.
void KSpellConfig::setClient | ( | int | client | ) |
Definition at line 759 of file ksconfig.cpp.
void KSpellConfig::setDictFromList | ( | bool | dfl | ) |
Definition at line 813 of file ksconfig.cpp.
void KSpellConfig::setDictionary | ( | const QString | qs | ) |
void KSpellConfig::setEncoding | ( | int | enctype | ) |
Definition at line 827 of file ksconfig.cpp.
void KSpellConfig::setIgnoreList | ( | QStringList | _ignorelist | ) |
Options setting routines.
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.
Definition at line 1001 of file ksconfig.cpp.
void KSpellConfig::setNoRootAffix | ( | bool | b | ) |
Set an ISpell option.
If true
, don't create root-affix combinations.
Definition at line 768 of file ksconfig.cpp.
void KSpellConfig::setReplaceAllList | ( | QStringList | _replaceAllList | ) |
The _replaceAllList
contains word you like that replace word.
Be careful that this list contains word which is replaced and new word.
Definition at line 1014 of file ksconfig.cpp.
void KSpellConfig::setRunTogether | ( | bool | b | ) |
Set an ISpell option.
If true
, treat run-together words a valid.
Definition at line 777 of file ksconfig.cpp.
void KSpellConfig::sHelp | ( | void | ) | [protected, slot] |
void KSpellConfig::sNoAff | ( | bool | ) | [protected, slot] |
Definition at line 884 of file ksconfig.cpp.
void KSpellConfig::sPathDictionary | ( | bool | on | ) | [protected, slot] |
Definition at line 940 of file ksconfig.cpp.
void KSpellConfig::sRunTogether | ( | bool | ) | [protected, slot] |
Definition at line 877 of file ksconfig.cpp.
void KSpellConfig::sSetDictionary | ( | int | i | ) | [protected, slot] |
Definition at line 916 of file ksconfig.cpp.
bool KSpellConfig::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 197 of file ksconfig.cpp.
Member Data Documentation
bool KSpellConfig::bnorootaffix [protected] |
Definition at line 259 of file ksconfig.h.
bool KSpellConfig::bruntogether [protected] |
Definition at line 260 of file ksconfig.h.
QCheckBox* KSpellConfig::cb1 [protected] |
Definition at line 270 of file ksconfig.h.
QCheckBox * KSpellConfig::cb2 [protected] |
Definition at line 270 of file ksconfig.h.
QComboBox * KSpellConfig::clientcombo [protected] |
Definition at line 275 of file ksconfig.h.
QComboBox* KSpellConfig::dictcombo [protected] |
Definition at line 275 of file ksconfig.h.
bool KSpellConfig::dictfromlist [protected] |
Definition at line 261 of file ksconfig.h.
QLabel* KSpellConfig::dictlist [protected] |
Definition at line 274 of file ksconfig.h.
int KSpellConfig::enc [protected] |
Definition at line 258 of file ksconfig.h.
QComboBox * KSpellConfig::encodingcombo [protected] |
Definition at line 275 of file ksconfig.h.
int KSpellConfig::iclient [protected] |
Definition at line 268 of file ksconfig.h.
QStringList KSpellConfig::ignorelist [protected] |
Definition at line 265 of file ksconfig.h.
KConfig* KSpellConfig::kc [protected] |
Definition at line 267 of file ksconfig.h.
QStringList KSpellConfig::langfnames [protected] |
Definition at line 277 of file ksconfig.h.
bool KSpellConfig::nodialog [protected] |
Definition at line 262 of file ksconfig.h.
QString KSpellConfig::qsdict [protected] |
Definition at line 263 of file ksconfig.h.
QString KSpellConfig::qspdict [protected] |
Definition at line 264 of file ksconfig.h.
The documentation for this class was generated from the following files: