#ifdef QT3_SUPPORT
Qt::Alignment QApplication::horizontalAlignment(Qt::Alignment align)
{
- return QStyle::visualAlignment(layoutDirection(), align);
+ return QGuiApplicationPrivate::visualAlignment(layoutDirection(), align);
}
#endif
static void reportGeometryChange(QWindowSystemInterfacePrivate::ScreenGeometryEvent *e);
static void reportAvailableGeometryChange(QWindowSystemInterfacePrivate::ScreenAvailableGeometryEvent *e);
+ static inline Qt::Alignment visualAlignment(Qt::LayoutDirection direction, Qt::Alignment alignment)
+ {
+ if (!(alignment & Qt::AlignHorizontal_Mask))
+ alignment |= Qt::AlignLeft;
+ if ((alignment & Qt::AlignAbsolute) == 0 && (alignment & (Qt::AlignLeft | Qt::AlignRight))) {
+ if (direction == Qt::RightToLeft)
+ alignment ^= (Qt::AlignLeft | Qt::AlignRight);
+ alignment |= Qt::AlignAbsolute;
+ }
+ return alignment;
+ }
+
+
static bool app_do_modal;
static QPointer<QWidget> qt_last_mouse_receiver;
#include "qpixmapcache.h"
#include "qpolygon.h"
#include "qtextlayout.h"
-#include "qstyle.h"
#include "qthread.h"
#include "qvarlengtharray.h"
#include "qstatictext.h"
#include <private/qstatictext_p.h>
#include <private/qglyphs_p.h>
#include <private/qhexstring_p.h>
+#include <private/qguiapplication_p.h>
#include <private/qrawfont_p.h>
QT_BEGIN_NAMESPACE
else
layout_direction = Qt::LeftToRight;
- tf = QStyle::visualAlignment(layout_direction, QFlag(tf));
+ tf = QGuiApplicationPrivate::visualAlignment(layout_direction, QFlag(tf));
bool isRightToLeft = layout_direction == Qt::RightToLeft;
bool expandtabs = ((tf & Qt::TextExpandTabs) &&
#include "qpixmapcache.h"
#include "qstyleoption.h"
#include "private/qstyle_p.h"
+#include "private/qguiapplication_p.h"
#ifndef QT_NO_DEBUG
#include "qdebug.h"
#endif
*/
Qt::Alignment QStyle::visualAlignment(Qt::LayoutDirection direction, Qt::Alignment alignment)
{
- if (!(alignment & Qt::AlignHorizontal_Mask))
- alignment |= Qt::AlignLeft;
- if ((alignment & Qt::AlignAbsolute) == 0 && (alignment & (Qt::AlignLeft | Qt::AlignRight))) {
- if (direction == Qt::RightToLeft)
- alignment ^= (Qt::AlignLeft | Qt::AlignRight);
- alignment |= Qt::AlignAbsolute;
- }
- return alignment;
+ return QGuiApplicationPrivate::visualAlignment(direction, alignment);
}
/*!
#include "qtextlist.h"
#include "qtextengine_p.h"
#include "private/qcssutil_p.h"
+#include "private/qguiapplication_p.h"
#include "qabstracttextdocumentlayout_p.h"
#include "qcssparser_p.h"
#include <qdebug.h>
#include <qvarlengtharray.h>
#include <limits.h>
-#include <qstyle.h>
#include <qbasictimer.h>
#include "private/qfunctions_p.h"
Qt::Alignment align = docPrivate->defaultTextOption.alignment();
if (blockFormat.hasProperty(QTextFormat::BlockAlignment))
align = blockFormat.alignment();
- option.setAlignment(QStyle::visualAlignment(dir, align)); // for paragraph that are RTL, alignment is auto-reversed;
+ option.setAlignment(QGuiApplicationPrivate::visualAlignment(dir, align)); // for paragraph that are RTL, alignment is auto-reversed;
if (blockFormat.nonBreakableLines() || document->pageSize().width() < 0) {
option.setWrapMode(QTextOption::ManualWrap);
#include <qabstracttextdocumentlayout.h>
#include "qtextdocument_p.h"
#include "qtextformat_p.h"
-#include "qstyleoption.h"
#include "qpainterpath.h"
#include "qglyphs.h"
#include "qglyphs_p.h"