#include <TextFormatterFactory.h>
Inherited by srchiliteqt::Qt3TextFormatterFactory, and srchiliteqt::Qt4TextFormatterFactory.
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 | isDefaultToMonosapce () const |
void | setDefaultToMonosapce (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) |
void srchiliteqt::TextFormatterFactory::addFormatter | ( | const string & | key, | |
TextFormatterPtr | formatter | |||
) |
Adds the formatter for the given key.
key | ||
formatter |
TextFormatterPtr srchiliteqt::TextFormatterFactory::getFormatter | ( | const string & | key | ) | const |
Returns the formatter for the given key.
key |
const TextFormatterMap& srchiliteqt::TextFormatterFactory::getTextFormatterMap | ( | ) | const [inline] |
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
key |
void srchiliteqt::TextFormatterFactory::setDefaultToMonosapce | ( | bool | d | ) | [inline] |
Whether the created formatters should use monospace font by default if nothing is specified about the font family.
d |