diff options
author | Lars Knoll <lars.knoll@nokia.com> | 2010-06-05 19:10:08 (GMT) |
---|---|---|
committer | Lars Knoll <lars.knoll@nokia.com> | 2010-06-09 22:07:15 (GMT) |
commit | 0b06274858cab9cedace8e684d16664e49d5f814 (patch) | |
tree | ad27f1c25495fba9d4469ad545cf7ce4de12e533 /src/corelib/global | |
parent | 17427887a2847acc74c61424e812aca0fea23226 (diff) | |
download | Qt-0b06274858cab9cedace8e684d16664e49d5f814.zip Qt-0b06274858cab9cedace8e684d16664e49d5f814.tar.gz Qt-0b06274858cab9cedace8e684d16664e49d5f814.tar.bz2 |
Introduce LayoutDirection Qt::LayoutDirectionAuto
Extend the enum to contains a value that can be used
to hint that we would like to determine the text
direction from the content.
Reviewed-by: Simon Hausmann
Diffstat (limited to 'src/corelib/global')
-rw-r--r-- | src/corelib/global/qnamespace.h | 3 | ||||
-rw-r--r-- | src/corelib/global/qnamespace.qdoc | 12 |
2 files changed, 12 insertions, 3 deletions
diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h index a9c56f6..a12e121 100644 --- a/src/corelib/global/qnamespace.h +++ b/src/corelib/global/qnamespace.h @@ -1561,7 +1561,8 @@ public: enum LayoutDirection { LeftToRight, - RightToLeft + RightToLeft, + LayoutDirectionAuto }; enum AnchorPoint { diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc index 7eae3a5..abbc03e 100644 --- a/src/corelib/global/qnamespace.qdoc +++ b/src/corelib/global/qnamespace.qdoc @@ -2572,15 +2572,23 @@ /*! \enum Qt::LayoutDirection - Specifies the direction of Qt's layouts: + Specifies the direction of Qt's layouts and text handling. \value LeftToRight Left-to-right layout. \value RightToLeft Right-to-left layout. + \value LayoutDirectionAuto Automatic layout. Right-to-left layouts are necessary for certain languages, notably Arabic and Hebrew. - \sa QApplication::setLayoutDirection(), QWidget::setLayoutDirection() + LayoutDirectionAuto serves two purposes. When used in conjunction with widgets and layouts, it + will imply to use the layout direction set on the parent widget or QApplication. This + has the same effect as QWidget::unsetLayoutDirection(). + + When LayoutDirectoinAuto is used in conjunction with text layouting, it will imply that the text + directionality is determined from the content of the string to be layouted. + + \sa QApplication::setLayoutDirection(), QWidget::setLayoutDirection(), QTextOption::setTextDirection(), QString::isRightToLeft() */ /*! |