class toHighlightedText

A simple editor which supports syntax highlighting. More...

Definition#include <tohighlightedtext.h>
InheritstoMarkedText [public ]
Inherited bytoResultField
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Public Slots

Signals

Public Static Methods

Protected Methods

Protected Slots


Detailed Description

A simple editor which supports syntax highlighting.

void  setLeftIgnore (int ignore)

setLeftIgnore

[protected]

Set how much of the left margin to ignore painting.

void  keyPressEvent (QKeyEvent *e)

keyPressEvent

[protected virtual]

Reimplemented for internal reasons.

Reimplemented from toMarkedText.

void  focusOutEvent (QFocusEvent *e)

focusOutEvent

[protected virtual]

Reimplemented for internal reasons.

Reimplemented from toMarkedText.

void  checkComplete (void)

checkComplete

[protected virtual]

Check if to view completion.

void  startComplete (std::list<QString> &completes)

startComplete

[protected virtual]

Start a completion with a given completelist.

Parameters:
completesList of available completions.

int  convertLine (int line,int start,int diff)

convertLine

[static]

Convert a linenumber after a change of the buffer to another linenumber. Can be used to convert a specific linenumber after receiving a insertedLines call.

Parameters:
lineLine number.
startStart of change.
diffLines added or removed.

Returns: New linenumber or -1 if line doesn't exist anymore.

 toHighlightedText (QWidget *parent,const char *name=NULL)

toHighlightedText

Create a new editor.

Parameters:
parentParent of widget.
nameName of widget.

 ~toHighlightedText ()

~toHighlightedText

[virtual]

Reimplemented for internal reasons

void  clear (void)

clear

Clear the editor.

Reimplemented from toMarkedText.

void  setText (const QString &str)

setText

Set the text of this editor.

Reimplemented from QMultiLineEdit.

void  setErrors (const std::map<int,QString> &errors)

setErrors

Set the error list map.

Parameters:
errorsA map of linenumbers to errorstrings. These will be displayed in the statusbar if the cursor is placed on the line.

void  setCurrent (int current)

setCurrent

Set current line. Will be indicated with a different background.

Parameters:
currentCurrent line.

int  current (void)

current

Get current line.

Returns: Current line.

void  setKeywordUpper (bool val)

setKeywordUpper

Set keyword upper flag. If this is set keywords will be converted to uppercase when painted.

Parameters:
valNew value of keyword to upper flag.

void  setHighlight (bool val)

setHighlight

The the highlighting flag. If this isn't set no highlighting is done.

void  setAnalyzer (toSyntaxAnalyzer &analyzer)

setAnalyzer

Set the syntax highlighter to use.

Parameters:
analyzerAnalyzer to use.

toSyntaxAnalyzeranalyzer (void)

analyzer

Get the current syntaxhighlighter.

Returns: Analyzer used.

void  paintCell (QPainter *painter,int row,int col)

paintCell

[virtual]

Reimplemented for internal reasons.

Reimplemented from QMultiLineEdit.

void  paintEvent (QPaintEvent *pe)

paintEvent

[virtual]

Reimplemented for internal reasons.

Reimplemented from toMarkedText.

void  tableAtCursor (QString &owner,QString &table,bool highlight=false)

tableAtCursor

Get the tablename currently under the cursor.

Parameters:
ownerFilled with owner or table or QString::null if no owner specified.
tableFilled with tablename.
highlightIf true mark the extracted tablename

void  insertedLines (int start,int diff)

insertedLines

[signal]

Emitted when lines are inserted or removed.

Parameters:
startStart of line inserted.
diffNumber of lines inserted or removed.

void  textChanged (void)

textChanged

[protected slots slot]

Reimplemented from QMultiLineEdit.

void  nextError (void)

nextError

[slot]

Go to next error.

void  previousError (void)

previousError

[slot]

Go to previous error.