summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qglyphrun.h
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2011-09-28 12:36:39 +0200
committerQt by Nokia <qt-info@nokia.com>2011-09-28 16:58:35 +0200
commit353c12f3e6c97d7059365dcf9b1f2dd9aa484545 (patch)
tree6d06c2863c062070c3e98ab09617ae72f0b8be9b /src/gui/text/qglyphrun.h
parente316deffef68287b03f6eed6e98b5bfcd984280d (diff)
Register whether a glyph run goes from RTL or LTR
This is needed by scene graph when embedding text objects in RTL text. Since the number of flags required for QGlyphRun is increasing, I've also refactored the underline/overline/strikethrough settings to use a common QFlags interface. Task-number: QTBUG-20917 Change-Id: I070649c014f4a51cfd66a9579d2d221a8f22302f Reviewed-on: http://codereview.qt-project.org/5739 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
Diffstat (limited to 'src/gui/text/qglyphrun.h')
-rw-r--r--src/gui/text/qglyphrun.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/gui/text/qglyphrun.h b/src/gui/text/qglyphrun.h
index 81783a8653..5a55eacbcb 100644
--- a/src/gui/text/qglyphrun.h
+++ b/src/gui/text/qglyphrun.h
@@ -59,6 +59,14 @@ class QGlyphRunPrivate;
class Q_GUI_EXPORT QGlyphRun
{
public:
+ enum GlyphRunFlag {
+ Overline = 0x1,
+ Underline = 0x2,
+ StrikeOut = 0x4,
+ RightToLeft = 0x8
+ };
+ Q_DECLARE_FLAGS(GlyphRunFlags, GlyphRunFlag)
+
QGlyphRun();
QGlyphRun(const QGlyphRun &other);
~QGlyphRun();
@@ -93,6 +101,13 @@ public:
void setStrikeOut(bool strikeOut);
bool strikeOut() const;
+ void setRightToLeft(bool on);
+ bool isRightToLeft() const;
+
+ void setFlag(GlyphRunFlag flag, bool enabled = true);
+ void setFlags(GlyphRunFlags flags);
+ GlyphRunFlags flags() const;
+
void setBoundingRect(const QRectF &boundingRect);
QRectF boundingRect() const;