• Skip to content
  • Skip to link menu
KDE 4.1 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

KDE3Support

K3SpellConfig Class Reference

#include <k3sconfig.h>

Inheritance diagram for K3SpellConfig:

Inheritance graph
[legend]

List of all members.


Detailed Description

A configuration class/dialog for K3Spell.

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 K3SpellConfig as a widget in a dialog (or, preferably a tabbed dialog using KPageDialog) and letting the user change the settings. This way an application that uses K3Spell can either rely on the default settings (in the simplest case), offer a dialog to configure K3Spell, or offer a dialog to configure K3Spell 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>
See also:
K3Spell
Deprecated:
use sonnet instead

Definition at line 86 of file k3sconfig.h.


Public Slots

void activateHelp (void)

Signals

void configChanged ()

Public Member Functions

int client () const
bool dictFromList () const
const QString dictionary () const
bool doSpellChecking () const
int encoding () const
void fillDicts (QComboBox *box, QStringList *dictionaries=0)
QStringList ignoreList () const
 K3SpellConfig (const K3SpellConfig &)
 K3SpellConfig (QWidget *parent=0, K3SpellConfig *spellConfig=0, bool addHelpButton=true)
bool noRootAffix () const
void operator= (const K3SpellConfig &ksc)
bool readGlobalSettings ()
QStringList replaceAllList () const
bool runTogether () const
void setClient (int client)
void setDictFromList (bool dfl)
void setDictionary (const QString qs)
void setDoSpellChecking (bool b)
void setEncoding (int enctype)
void setIgnoreList (const QStringList &_ignorelist)
void setNoRootAffix (bool)
void setReplaceAllList (const QStringList &_replaceAllList)
void setRunTogether (bool)
bool writeGlobalSettings ()
virtual ~K3SpellConfig ()

Protected Types

enum  { rdictlist = 3, rencoding = 4, rhelp = 6 }

Protected Slots

void sChangeClient (int)
void sChangeEncoding (int)
void sDictionary (bool)
void sDoSpell ()
void sHelp ()
void sNoAff (bool)
void sPathDictionary (bool)
void sRunTogether (bool)
void sSetDictionary (int)

Protected Member Functions

void fillInDialog ()
bool interpret (const QString &fname, QString &lname, QString &hname)

Protected Attributes

bool bdospellchecking
bool bnorootaffix
bool bruntogether
QCheckBox * cb0
QCheckBox * cb1
QCheckBox * cb2
QComboBox * clientcombo
QComboBox * dictcombo
bool dictfromlist
QLabel * dictlist
int enc
QComboBox * encodingcombo
int iclient
QStringList ignorelist
KSharedConfig::Ptr kc
QStringList langfnames
bool nodialog
QString qsdict
QString qspdict

Member Enumeration Documentation

anonymous enum [protected]

Enumerator:
rdictlist 
rencoding 
rhelp 

Definition at line 270 of file k3sconfig.h.


Constructor & Destructor Documentation

K3SpellConfig::K3SpellConfig ( QWidget *  parent = 0,
K3SpellConfig *  spellConfig = 0,
bool  addHelpButton = true 
) [explicit]

Constructs a K3SpellConfig with default or custom settings.

Parameters:
parent Parent of the widget.
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 75 of file k3sconfig.cpp.

K3SpellConfig::K3SpellConfig ( const K3SpellConfig &  _ksc  ) 

Definition at line 50 of file k3sconfig.cpp.

K3SpellConfig::~K3SpellConfig (  )  [virtual]

Deconstructor.

Deletes private class.

Definition at line 188 of file k3sconfig.cpp.


Member Function Documentation

void K3SpellConfig::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 1008 of file k3sconfig.cpp.

int K3SpellConfig::client (  )  const

Spell checker client,.

See also:
K3SpellClients

Definition at line 873 of file k3sconfig.cpp.

void K3SpellConfig::configChanged (  )  [signal]

bool K3SpellConfig::dictFromList (  )  const

Definition at line 195 of file k3sconfig.cpp.

const QString K3SpellConfig::dictionary (  )  const

Definition at line 898 of file k3sconfig.cpp.

bool K3SpellConfig::doSpellChecking (  )  const

Options reading routines.

Definition at line 880 of file k3sconfig.cpp.

int K3SpellConfig::encoding (  )  const

Definition at line 911 of file k3sconfig.cpp.

void K3SpellConfig::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.

Definition at line 610 of file k3sconfig.cpp.

void K3SpellConfig::fillInDialog (  )  [protected]

Definition at line 395 of file k3sconfig.cpp.

QStringList K3SpellConfig::ignoreList (  )  const

Definition at line 1054 of file k3sconfig.cpp.

bool K3SpellConfig::interpret ( const QString &  fname,
QString &  lname,
QString &  hname 
) [protected]

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 271 of file k3sconfig.cpp.

bool K3SpellConfig::noRootAffix (  )  const

Definition at line 886 of file k3sconfig.cpp.

void K3SpellConfig::operator= ( const K3SpellConfig &  ksc  ) 

Definition at line 1031 of file k3sconfig.cpp.

bool K3SpellConfig::readGlobalSettings (  ) 

Definition at line 201 of file k3sconfig.cpp.

QStringList K3SpellConfig::replaceAllList (  )  const

Definition at line 1066 of file k3sconfig.cpp.

bool K3SpellConfig::runTogether (  )  const

Definition at line 892 of file k3sconfig.cpp.

void K3SpellConfig::sChangeClient ( int  i  )  [protected, slot]

Definition at line 244 of file k3sconfig.cpp.

void K3SpellConfig::sChangeEncoding ( int  i  )  [protected, slot]

Definition at line 236 of file k3sconfig.cpp.

void K3SpellConfig::sDictionary ( bool  on  )  [protected, slot]

Definition at line 971 of file k3sconfig.cpp.

void K3SpellConfig::sDoSpell (  )  [protected, slot]

Definition at line 931 of file k3sconfig.cpp.

void K3SpellConfig::setClient ( int  client  ) 

Definition at line 784 of file k3sconfig.cpp.

void K3SpellConfig::setDictFromList ( bool  dfl  ) 

Definition at line 847 of file k3sconfig.cpp.

void K3SpellConfig::setDictionary ( const QString  qs  ) 

Set the name of the dictionary to use.

Definition at line 820 of file k3sconfig.cpp.

void K3SpellConfig::setDoSpellChecking ( bool  b  ) 

Activate SpellChecking.

Definition at line 793 of file k3sconfig.cpp.

void K3SpellConfig::setEncoding ( int  enctype  ) 

Definition at line 861 of file k3sconfig.cpp.

void K3SpellConfig::setIgnoreList ( const QStringList &  _ignorelist  ) 

Options setting routines.

The _ignorelist contains words you'd like K3Spell to ignore when it is spellchecking. When you get a K3SpellConfig object back from K3Spell (using K3Spell::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 1048 of file k3sconfig.cpp.

void K3SpellConfig::setNoRootAffix ( bool  b  ) 

Set an ISpell option.

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

Definition at line 802 of file k3sconfig.cpp.

void K3SpellConfig::setReplaceAllList ( const 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 1060 of file k3sconfig.cpp.

void K3SpellConfig::setRunTogether ( bool  b  ) 

Set an ISpell option.

If true, treat run-together words a valid.

Definition at line 811 of file k3sconfig.cpp.

void K3SpellConfig::sHelp ( void   )  [protected, slot]

Invokes the help documentation for k3spell.

Definition at line 1013 of file k3sconfig.cpp.

void K3SpellConfig::sNoAff ( bool   )  [protected, slot]

Definition at line 924 of file k3sconfig.cpp.

void K3SpellConfig::sPathDictionary ( bool  on  )  [protected, slot]

Definition at line 987 of file k3sconfig.cpp.

void K3SpellConfig::sRunTogether ( bool   )  [protected, slot]

Definition at line 917 of file k3sconfig.cpp.

void K3SpellConfig::sSetDictionary ( int  i  )  [protected, slot]

Definition at line 963 of file k3sconfig.cpp.

bool K3SpellConfig::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 218 of file k3sconfig.cpp.


Member Data Documentation

bool K3SpellConfig::bdospellchecking [protected]

Definition at line 262 of file k3sconfig.h.

bool K3SpellConfig::bnorootaffix [protected]

Definition at line 263 of file k3sconfig.h.

bool K3SpellConfig::bruntogether [protected]

Definition at line 264 of file k3sconfig.h.

QCheckBox* K3SpellConfig::cb0 [protected]

Definition at line 274 of file k3sconfig.h.

QCheckBox * K3SpellConfig::cb1 [protected]

Definition at line 274 of file k3sconfig.h.

QCheckBox * K3SpellConfig::cb2 [protected]

Definition at line 274 of file k3sconfig.h.

QComboBox * K3SpellConfig::clientcombo [protected]

Definition at line 279 of file k3sconfig.h.

QComboBox* K3SpellConfig::dictcombo [protected]

Definition at line 279 of file k3sconfig.h.

bool K3SpellConfig::dictfromlist [protected]

Definition at line 265 of file k3sconfig.h.

QLabel* K3SpellConfig::dictlist [protected]

Definition at line 278 of file k3sconfig.h.

int K3SpellConfig::enc [protected]

Definition at line 261 of file k3sconfig.h.

QComboBox * K3SpellConfig::encodingcombo [protected]

Definition at line 279 of file k3sconfig.h.

int K3SpellConfig::iclient [protected]

Definition at line 272 of file k3sconfig.h.

QStringList K3SpellConfig::ignorelist [protected]

Definition at line 269 of file k3sconfig.h.

KSharedConfig::Ptr K3SpellConfig::kc [protected]

Definition at line 271 of file k3sconfig.h.

QStringList K3SpellConfig::langfnames [protected]

Definition at line 281 of file k3sconfig.h.

bool K3SpellConfig::nodialog [protected]

Definition at line 266 of file k3sconfig.h.

QString K3SpellConfig::qsdict [protected]

Definition at line 267 of file k3sconfig.h.

QString K3SpellConfig::qspdict [protected]

Definition at line 268 of file k3sconfig.h.


The documentation for this class was generated from the following files:
  • k3sconfig.h
  • k3sconfig.cpp

KDE3Support

Skip menu "KDE3Support"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • KIO
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal