Back to index

scribus-ng  1.3.4.dfsg+svn20071115
Public Member Functions
SWSyntaxHighlighter Class Reference

Simple syntax highlighting for configuration editor (QTextEdit). More...

#include <swprefsgui.h>

List of all members.

Public Member Functions

 SWSyntaxHighlighter (QTextEdit *textEdit)
int highlightParagraph (const QString &text, int endStateOfLastPara)
 Reimplementation of the Qt highligtion for simple cfg file.

Detailed Description

Simple syntax highlighting for configuration editor (QTextEdit).

Author:
Petr Vanek, petr@.nosp@m.yarp.nosp@m.en.cz

Definition at line 70 of file swprefsgui.h.


Constructor & Destructor Documentation

SWSyntaxHighlighter::SWSyntaxHighlighter ( QTextEdit *  textEdit)

Definition at line 165 of file swprefsgui.cpp.

       : QSyntaxHighlighter(textEdit)
{
}

Member Function Documentation

int SWSyntaxHighlighter::highlightParagraph ( const QString &  text,
int  endStateOfLastPara 
)

Reimplementation of the Qt highligtion for simple cfg file.

Parameters:
textstring (one row) provided by text editor via QSyntaxHighlighter inheritance.
endStateOfLastParahow is the syntax left for next paragraph

Definition at line 170 of file swprefsgui.cpp.

{
       // position in the text
       if (text[0] == '#')
       {
              QFont f(textEdit()->currentFont());
              f.setItalic(true);
              setFormat(0, text.length(), f, QColor(Qt::gray));
       }
       return 0;
}

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