#include <qpainter.h>
#include <qpixmap.h>
#include <qimage.h>
#include <qmap.h>
#include <qwidget.h>
#include "qwt_math.h"
#include "qwt_painter.h"
#include "qwt_text_engine.h"
#include <qsimplerichtext.h>
#include <qstylesheet.h>
Go to the source code of this file.
Classes | |
class | QwtRichTextDocument |
class | QwtPlainTextEngine::PrivateData |
Functions | |
static QString | taggedRichText (const QString &text, int flags) |
static QString taggedRichText | ( | const QString & | text, |
int | flags | ||
) | [static] |
Definition at line 21 of file qwt_text_engine.cpp.
{ QString richText = text; // By default QSimpleRichText is Qt::AlignLeft if (flags & Qt::AlignJustify) { richText.prepend(QString::fromLatin1("<div align=\"justify\">")); richText.append(QString::fromLatin1("</div>")); } else if (flags & Qt::AlignRight) { richText.prepend(QString::fromLatin1("<div align=\"right\">")); richText.append(QString::fromLatin1("</div>")); } else if (flags & Qt::AlignHCenter) { richText.prepend(QString::fromLatin1("<div align=\"center\">")); richText.append(QString::fromLatin1("</div>")); } return richText; }