srchiliteqt::TextFormatterFactory Class Reference

Specialization of FormatterFactory to create TextFormatter objects to format text in a TextEdit. More...

#include <TextFormatterFactory.h>

Inherited by srchiliteqt::Qt3TextFormatterFactory, and srchiliteqt::Qt4TextFormatterFactory.

Collaboration diagram for srchiliteqt::TextFormatterFactory:
Collaboration graph
[legend]

List of all members.

Public Member Functions

bool hasFormatter (const string &key) const
 Checks whether a formatter for the given key is already present.
TextFormatterPtr getFormatter (const string &key) const
 Returns the formatter for the given key.
void addFormatter (const string &key, TextFormatterPtr formatter)
 Adds the formatter for the given key.
const TextFormatterMap & getTextFormatterMap () const
bool isDefaultToMonospace () const
void setDefaultToMonospace (bool d)
 Whether the created formatters should use monospace font by default if nothing is specified about the font family.

Static Public Attributes

static QtColorMap colorMap
 the color map for source-highlight colors into RGB RRGGBB values

Protected Attributes

TextFormatterMap textFormatterMap
bool defaultToMonospace
 whether to default font to monospace (default true)

Detailed Description

Specialization of FormatterFactory to create TextFormatter objects to format text in a TextEdit.


Member Function Documentation

void srchiliteqt::TextFormatterFactory::addFormatter ( const string &  key,
TextFormatterPtr  formatter 
)

Adds the formatter for the given key.

Parameters:
key 
formatter 
TextFormatterPtr srchiliteqt::TextFormatterFactory::getFormatter ( const string &  key  )  const

Returns the formatter for the given key.

Parameters:
key 
Returns:
the formatter for the given key is already present
const TextFormatterMap& srchiliteqt::TextFormatterFactory::getTextFormatterMap (  )  const [inline]
Returns:
the TextFormatterMap
bool srchiliteqt::TextFormatterFactory::hasFormatter ( const string &  key  )  const

Checks whether a formatter for the given key is already present.

If not found, then it returns an empty TextFormatterPtr

Parameters:
key 
Returns:
whether a formatter for the given key is already present
void srchiliteqt::TextFormatterFactory::setDefaultToMonospace ( bool  d  )  [inline]

Whether the created formatters should use monospace font by default if nothing is specified about the font family.

Parameters:
d 

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

Generated on Sat Mar 6 11:23:00 2010 for Source-highlight Qt Library by  doxygen 1.6.1