52 #ifndef Patternist_ColorOutput_h 53 #define Patternist_ColorOutput_h 55 #include <QtCore/QtGlobal> 56 #include <QtCore/QHash> 64 class ColorOutputPrivate;
#define QT_END_NAMESPACE
This macro expands to.
void writeUncolored(const QString &message)
Writes message to stderr as if for instance QTextStream would have been used, and adds a line ending ...
#define Q_DISABLE_COPY(Class)
Disables the use of copy constructors and assignment operators for the given Class.
The QString class provides a Unicode character string.
QString colorify(const QString &message, int color=-1) const
Treats message and colorID identically to write(), but instead of writing message to stderr...
#define QT_BEGIN_NAMESPACE
This macro expands to.
void setColorMapping(const ColorMapping &cMapping)
Sets the color mapping to be cMapping.
#define Q_DECLARE_OPERATORS_FOR_FLAGS(Flags)
The Q_DECLARE_OPERATORS_FOR_FLAGS() macro declares global operator|() functions for Flags...
The namespace for the internal API of QtXmlPatterns.
ColorOutput()
Constructs a ColorOutput instance, ready for use.
QFlags< ColorCodeComponent > ColorCode
void insertMapping(int colorID, const ColorCode colorCode)
Adds a color mapping from colorID to colorCode, for this ColorOutput instance.
~ColorOutput()
Destructs this ColorOutput instance.
ColorMapping colorMapping() const
Returns the color mappings in use.
The QFlags class provides a type-safe way of storing OR-combinations of enum values.
QHash< int, ColorCode > ColorMapping
void write(const QString &message, int color=-1)
Sends message to stderr, using the color looked up in colorMapping() using colorID.