Scribus
Open source desktop publishing at your fingertips
AspellPluginImpl Class Reference

Implementation of plugin. GUI part is derived from AspellPluginBase class, as aspellpluginbase.{cpp,h} get overwritten by uic. Interface to aspell uses Speller::Aspell::Suggest. More...

#include <aspellpluginimpl.h>

Inheritance diagram for AspellPluginImpl:
Collaboration diagram for AspellPluginImpl:

Public Slots

void on_fcloseBtn_clicked ()
 Slot: Called when the "Close" button is clicked. Makes any pending replacements, and closes spell-check window. More...
 
void on_fchangeBtn_clicked ()
 Slot: Called when the "Change" button is clicked. Replaces the word being checked with the currently selected replacement. More...
 
void on_fchangeAllBtn_clicked ()
 Slot: Called when the "Change All" button is clicked. Replaces all occurrences of the word being checked with the currently selected replacement. More...
 
void on_fskipBtn_clicked ()
 Slot: Called when the "Skip" button is clicked. Skips the word currently being spell-checked. More...
 
void on_fskipAllBtn_clicked ()
 Slot: Called when the "Skip All" button is clicked. Skips all occurences of the word currently being spell-checked. More...
 
void on_faddWordBtn_clicked ()
 Slot: Called when the "Add word" button is clicked. Adds current suggestion to user's personal directory. More...
 
void on_flistReplacements_itemActivated ()
 Slot: Called when an item in the list of aspell suggestions is highlighted. Changes the current word (in the text edit box). More...
 
void on_flistDicts_activated ()
 Slot: Called when an item in the list of available aspell dictionaries is selected. Resets aspell dictionary to selected one. More...
 

Public Member Functions

 AspellPluginImpl (ScribusDoc *doc, QWidget *parent=NULL)
 Constructor for spell-checking plugin implementation. More...
 
 ~AspellPluginImpl ()
 Destructor for spell-checking plugin implementation. More...
 
QString errorMessage ()
 Returns a error message for caller. It should disable the plugin then.
 

Protected Slots

void languageChange ()
 

Protected Member Functions

void checkText ()
 Initializes the position in the current text, sets the current word, and starts spell-checking. More...
 
void nextWord ()
 Skips to the beginning of the next word in 'fcontent', the text being spell-checked. More...
 
void setPreferences (const QString &lang, const QString &jargon, const QString &encoding=Speller::Aspell::Suggest::kDEF_ENCODING, const QString &entry=kDEF_ASPELL_ENTRY)
 Save user preferences. More...
 
void getPreferences ()
 Retrieve saved user preferences: language, jargon, encoding. More...
 
void activateSpellGUI (bool active)
 Activates spell-checking GUI elements in spell-checking tab, i.e., everything except combo box at top. More...
 
void parseItem ()
 Base method to spell-check text in current frame. More...
 
void parseSelection ()
 Spell-check selected frames in the page. More...
 
void spellCheckDone ()
 Called when spell-checking is completed. Pops up an information dialog. More...
 
bool handleSpellConfig (const QString &dictFullName)
 Sets the dict configuration based on given dictFullName or in the constructor. See on_flistDicts_activated(). More...
 

Detailed Description

Implementation of plugin. GUI part is derived from AspellPluginBase class, as aspellpluginbase.{cpp,h} get overwritten by uic. Interface to aspell uses Speller::Aspell::Suggest.

Author
Gora Mohanty gora@.nosp@m.srij.nosp@m.an.in

Constructor & Destructor Documentation

AspellPluginImpl::AspellPluginImpl ( ScribusDoc doc,
QWidget *  parent = NULL 
)

Constructor for spell-checking plugin implementation.

Author
Gora Mohanty gora@.nosp@m.srij.nosp@m.an.in
Parameters
docScribus doc
parentParent window that this is a child of.
Return values
None
AspellPluginImpl::~AspellPluginImpl ( )

Destructor for spell-checking plugin implementation.

Author
Gora Mohanty gora@.nosp@m.srij.nosp@m.an.in
Parameters
None
Return values
None

Member Function Documentation

void AspellPluginImpl::activateSpellGUI ( bool  active)
protected

Activates spell-checking GUI elements in spell-checking tab, i.e., everything except combo box at top.

Author
Gora Mohanty gora@.nosp@m.srij.nosp@m.an.in
Parameters
None
Return values
None
void AspellPluginImpl::checkText ( )
protected

Initializes the position in the current text, sets the current word, and starts spell-checking.

Author
Gora Mohanty gora@.nosp@m.srij.nosp@m.an.in
Parameters
None
Return values
None
void AspellPluginImpl::getPreferences ( )
protected

Retrieve saved user preferences: language, jargon, encoding.

Author
Gora Mohanty gora@.nosp@m.srij.nosp@m.an.in
Parameters
None
Return values
None
bool AspellPluginImpl::handleSpellConfig ( const QString &  dictFullName)
protected

Sets the dict configuration based on given dictFullName or in the constructor. See on_flistDicts_activated().

Parameters
dictFullNamea full dictionary name taken e.g. from flistDicts.
Author
Petr Vanek petr@.nosp@m.scri.nosp@m.bus.i.nosp@m.nfo
void AspellPluginImpl::nextWord ( )
protected

Skips to the beginning of the next word in 'fcontent', the text being spell-checked.

Author
Gora Mohanty gora@.nosp@m.srij.nosp@m.an.in
Parameters
None
Return values
None
void AspellPluginImpl::on_faddWordBtn_clicked ( )
slot

Slot: Called when the "Add word" button is clicked. Adds current suggestion to user's personal directory.

Author
Gora Mohanty gora@.nosp@m.srij.nosp@m.an.in
Parameters
None
Return values
None
void AspellPluginImpl::on_fchangeAllBtn_clicked ( )
slot

Slot: Called when the "Change All" button is clicked. Replaces all occurrences of the word being checked with the currently selected replacement.

Author
Gora Mohanty gora@.nosp@m.srij.nosp@m.an.in
Parameters
None
Return values
None
void AspellPluginImpl::on_fchangeBtn_clicked ( )
slot

Slot: Called when the "Change" button is clicked. Replaces the word being checked with the currently selected replacement.

Author
Gora Mohanty gora@.nosp@m.srij.nosp@m.an.in
Parameters
None
Return values
None
void AspellPluginImpl::on_fcloseBtn_clicked ( )
slot

Slot: Called when the "Close" button is clicked. Makes any pending replacements, and closes spell-check window.

Author
Gora Mohanty gora@.nosp@m.srij.nosp@m.an.in
Parameters
None
Return values
None
void AspellPluginImpl::on_flistDicts_activated ( )
slot

Slot: Called when an item in the list of available aspell dictionaries is selected. Resets aspell dictionary to selected one.

Author
Gora Mohanty gora@.nosp@m.srij.nosp@m.an.in
Parameters
None
Return values
None
void AspellPluginImpl::on_flistReplacements_itemActivated ( )
slot

Slot: Called when an item in the list of aspell suggestions is highlighted. Changes the current word (in the text edit box).

Author
Gora Mohanty gora@.nosp@m.srij.nosp@m.an.in
Parameters
None
Return values
None
void AspellPluginImpl::on_fskipAllBtn_clicked ( )
slot

Slot: Called when the "Skip All" button is clicked. Skips all occurences of the word currently being spell-checked.

Author
Gora Mohanty gora@.nosp@m.srij.nosp@m.an.in
Parameters
None
Return values
None
void AspellPluginImpl::on_fskipBtn_clicked ( )
slot

Slot: Called when the "Skip" button is clicked. Skips the word currently being spell-checked.

Author
Gora Mohanty gora@.nosp@m.srij.nosp@m.an.in
Parameters
None
Return values
None
void AspellPluginImpl::parseItem ( )
protected

Base method to spell-check text in current frame.

Author
Gora Mohanty gora@.nosp@m.srij.nosp@m.an.in
Parameters
None
Return values
None
void AspellPluginImpl::parseSelection ( )
protected

Spell-check selected frames in the page.

Author
Gora Mohanty gora@.nosp@m.srij.nosp@m.an.in
Parameters
None
Return values
None
void AspellPluginImpl::setPreferences ( const QString &  lang,
const QString &  jargon,
const QString &  encoding = Speller::Aspell::Suggest::kDEF_ENCODING,
const QString &  entry = kDEF_ASPELL_ENTRY 
)
protected

Save user preferences.

Author
Gora Mohanty gora@.nosp@m.srij.nosp@m.an.in
Parameters
languageLanguage for aspell dictionary
jargonJargon for aspell dictionary
encodingEncoding for aspell dictionary
Return values
None
void AspellPluginImpl::spellCheckDone ( )
protected

Called when spell-checking is completed. Pops up an information dialog.

Author
Gora Mohanty gora@.nosp@m.srij.nosp@m.an.in
Parameters
None
Return values
None

The documentation for this class was generated from the following files: