Songbook-Client  0.7
This application is a manager of customguitar songbooks
 All Classes Files Functions Variables Enumerations Enumerator Pages
Classes | Public Member Functions | Protected Member Functions
CSongHighlighter Class Reference

CSongHighlighter provides colors and highlights for the song editor. More...

#include <song-highlighter.hh>

List of all members.

Classes

struct  HighlightingRule

Public Member Functions

 CSongHighlighter (QTextDocument *parent=0)
 Constructor.
 ~CSongHighlighter ()
 Destructor.
void setDictionary (const QString &filename)
Hunspell * checker () const

Protected Member Functions

void highlightBlock (const QString &text)
void spellCheck (const QString &text)
bool checkWord (const QString &word)

Detailed Description

CSongHighlighter provides colors and highlights for the song editor.

Highlights include LaTeX keywords and specific commands provided by the Songs LaTeX package (http://songs.sourceforge.net).

This class is also used by the hunspell spellchecker to underline unrecognized words.


Member Function Documentation

Hunspell* CSongHighlighter::checker ( ) const

Getter on the Hunspell spellchecker.

Returns:
the hunspell spellchecker
bool CSongHighlighter::checkWord ( const QString &  word)
protected

Apply spellchecking on a particular word.

Parameters:
wordthe word that is to be spellchecked.
Returns:
true if the word is correctly spelled, false otherwise.
void CSongHighlighter::highlightBlock ( const QString &  text)
protected

Apply highlighting rules for a block of text.

Parameters:
textthe text on which the rules should be applied.
void CSongHighlighter::setDictionary ( const QString &  filename)

Set the dictionary used by the spellchecker.

Parameters:
filenamethe .dic file that corresponds to a hunspell dictionary. Those files are usually located in /usr/share/hunspell/.
void CSongHighlighter::spellCheck ( const QString &  text)
protected

Apply spellchecking on a text.

Parameters:
textthe text on which the spellchecking should be applied.

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