Source-highlight Qt Library
srchiliteqt::Qt3TextFormatter Class Reference

The implementation of TextFormatter for Qt3, relying on QTextCharFormat. More...

#include <Qt3TextFormatter.h>

Inheritance diagram for srchiliteqt::Qt3TextFormatter:
Collaboration diagram for srchiliteqt::Qt3TextFormatter:

Public Member Functions

 Qt3TextFormatter (const std::string &elem_="normal")
 
QFont & getQFont () const
 
QColor & getQColor () const
 
virtual void setQSyntaxHighlighter (QSyntaxHighlighter *qSyntaxHighlighter_)
 
void format (const std::string &s, const srchilite::FormatterParams *params)
 Formats the passed string. More...
 
const std::string & getElem () const
 
void setElem (const std::string &e)
 

Protected Attributes

QFontPtr font
 The QFont for the formatter. More...
 
QColorPtr color
 The QColor for the formatter. More...
 
Qt3SyntaxHighlighterqSyntaxHighlighter
 The reference to QSyntaxHighlighter object. More...
 
std::string elem
 the language element represented by this formatter
 

Detailed Description

The implementation of TextFormatter for Qt3, relying on QTextCharFormat.

Member Function Documentation

void srchiliteqt::Qt3TextFormatter::format ( const std::string &  s,
const srchilite::FormatterParams *  params 
)

Formats the passed string.

Parameters
thestring to format
paramspossible additional parameters for the formatter (NOT USED)
const std::string& srchiliteqt::TextFormatter::getElem ( ) const
inlineinherited
Returns
the language element represented by this formatter

Member Data Documentation

QColorPtr srchiliteqt::Qt3TextFormatter::color
protected

The QColor for the formatter.

We use a shared pointer so that on copy we still refer to the original object

QFontPtr srchiliteqt::Qt3TextFormatter::font
protected

The QFont for the formatter.

We use a shared pointer so that on copy we still refer to the original object

Qt3SyntaxHighlighter* srchiliteqt::Qt3TextFormatter::qSyntaxHighlighter
protected

The reference to QSyntaxHighlighter object.

Since this header file does not include the header file for QSyntaxHighlighter, then this same class can be re-used both for Qt3 and for Qt4 (the subclasses of this class will include the correct header file for QSyntaxHighlighter).


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