kspread
KSpread::FormulaEditorHighlighter Class Reference
Colors cell references in formulas. More...
#include <Editors.h>

Public Member Functions | |
| FormulaEditorHighlighter (QTextEdit *textEdit, Selection *selection) | |
| virtual | ~FormulaEditorHighlighter () |
| const Tokens & | formulaTokens () const |
| virtual void | highlightBlock (const QString &text) |
| bool | rangeChanged () const |
| uint | rangeCount () const |
| void | resetRangeChanged () |
Protected Member Functions | |
| int | findMatchingBrace (int pos) |
| void | handleBrace (uint index) |
Detailed Description
Colors cell references in formulas.
Installed by CellEditor instances in the constructor.
Definition at line 68 of file Editors.h.
Constructor & Destructor Documentation
| KSpread::FormulaEditorHighlighter::FormulaEditorHighlighter | ( | QTextEdit * | textEdit, | |
| Selection * | selection | |||
| ) |
Constructs a FormulaHighlighter to color-code cell references in a QTextEdit.
- Parameters:
-
textEdit The QTextEdit widget which the highlighter should operate on selection The Selection object
Definition at line 99 of file Editors.cpp.
| KSpread::FormulaEditorHighlighter::~FormulaEditorHighlighter | ( | ) | [virtual] |
Definition at line 106 of file Editors.cpp.
Member Function Documentation
| int KSpread::FormulaEditorHighlighter::findMatchingBrace | ( | int | pos | ) | [protected] |
Returns the position of the brace matching the one found at position pos.
Definition at line 261 of file Editors.cpp.
| const Tokens & KSpread::FormulaEditorHighlighter::formulaTokens | ( | ) | const |
Definition at line 111 of file Editors.cpp.
| void KSpread::FormulaEditorHighlighter::handleBrace | ( | uint | index | ) | [protected] |
Examines the brace (Token::LeftPar or Token::RightPar) operator token at the given index in the token vector ( as returned by formulaTokens() ) and if the cursor is next to it, the token plus any matching brace will be highlighted.
Definition at line 202 of file Editors.cpp.
| void KSpread::FormulaEditorHighlighter::highlightBlock | ( | const QString & | text | ) | [virtual] |
Called automatically by KTextEditor to highlight text when modified.
Reimplemented from QSyntaxHighlighter.
Definition at line 116 of file Editors.cpp.
| bool KSpread::FormulaEditorHighlighter::rangeChanged | ( | ) | const |
Returns true if any of the ranges or cells in the Formula.have changed since the last call to FormulaEditorHighlighter::rangeChanged().
Definition at line 297 of file Editors.cpp.
| uint KSpread::FormulaEditorHighlighter::rangeCount | ( | ) | const |
Definition at line 292 of file Editors.cpp.
| void KSpread::FormulaEditorHighlighter::resetRangeChanged | ( | ) |
Sets the highlighter's range changed flag to false.
Definition at line 302 of file Editors.cpp.
The documentation for this class was generated from the following files:
