6 #ifndef TEXTFORMATTERFACTORY_H_ 7 #define TEXTFORMATTERFACTORY_H_ 11 #include "srchilite/formatterfactory.h" 13 #include "TextFormatter.h" 14 #include "QtColorMap.h" 20 typedef std::map<string, TextFormatterPtr> TextFormatterMap;
28 TextFormatterMap textFormatterMap;
60 void addFormatter(
const string &key, TextFormatterPtr formatter);
66 return textFormatterMap;
69 bool isDefaultToMonospace()
const {
80 defaultToMonospace = d;
void addFormatter(const string &key, TextFormatterPtr formatter)
Adds the formatter for the given key.
Definition: TextFormatterFactory.cpp:32
Definition: ColorDialog.cpp:12
void setDefaultToMonospace(bool d)
Whether the created formatters should use monospace font by default if nothing is specified about the...
Definition: TextFormatterFactory.h:79
static QtColorMap colorMap
the color map for source-highlight colors into RGB #RRGGBB values
Definition: TextFormatterFactory.h:35
bool hasFormatter(const string &key) const
Checks whether a formatter for the given key is already present.
Definition: TextFormatterFactory.cpp:19
TextFormatterPtr getFormatter(const string &key) const
Returns the formatter for the given key.
Definition: TextFormatterFactory.cpp:23
Specialization of FormatterFactory to create TextFormatter objects to format text in a TextEdit...
Definition: TextFormatterFactory.h:26
Map for source-highlight colors into qt colors (actually, into the format #RRGGBB) ...
Definition: QtColorMap.h:18
const TextFormatterMap & getTextFormatterMap() const
Definition: TextFormatterFactory.h:65
bool defaultToMonospace
whether to default font to monospace (default true)
Definition: TextFormatterFactory.h:31