Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QHighDpi Namespace Reference

Functions

qreal scale (qreal value, qreal scaleFactor, QPointF=QPointF(0, 0))
 
QSize scale (const QSize &value, qreal scaleFactor, QPointF=QPointF(0, 0))
 
QSizeF scale (const QSizeF &value, qreal scaleFactor, QPointF=QPointF(0, 0))
 
QVector2D scale (const QVector2D &value, qreal scaleFactor, QPointF=QPointF(0, 0))
 
QPointF scale (const QPointF &pos, qreal scaleFactor, QPointF origin=QPointF(0, 0))
 
QPoint scale (const QPoint &pos, qreal scaleFactor, QPoint origin=QPoint(0, 0))
 
QRect scale (const QRect &rect, qreal scaleFactor, QPoint origin=QPoint(0, 0))
 
QRectF scale (const QRectF &rect, qreal scaleFactor, QPoint origin=QPoint(0, 0))
 
QMargins scale (const QMargins &margins, qreal scaleFactor, QPoint origin=QPoint(0, 0))
 
template<typename T >
QList< T > scale (const QList< T > &list, qreal scaleFactor, QPoint origin=QPoint(0, 0))
 
QRegion scale (const QRegion &region, qreal scaleFactor, QPoint origin=QPoint(0, 0))
 
template<typename T >
QHighDpiScaling::Point position (T, QHighDpiScaling::Point::Kind)
 
QHighDpiScaling::Point position (QPoint point, QHighDpiScaling::Point::Kind kind)
 
QHighDpiScaling::Point position (QPointF point, QHighDpiScaling::Point::Kind kind)
 
QHighDpiScaling::Point position (QRect rect, QHighDpiScaling::Point::Kind kind)
 
QHighDpiScaling::Point position (QRectF rect, QHighDpiScaling::Point::Kind kind)
 
template<typename T , typename C >
fromNativePixels (const T &value, const C *context)
 
template<typename T , typename C >
toNativePixels (const T &value, const C *context)
 
template<typename T , typename C >
fromNativeLocalPosition (const T &value, const C *context)
 
template<typename T , typename C >
toNativeLocalPosition (const T &value, const C *context)
 
template<typename T , typename C >
fromNativeGlobalPosition (const T &value, const C *context)
 
template<typename T , typename C >
toNativeGlobalPosition (const T &value, const C *context)
 
template<typename T , typename C >
fromNativeWindowGeometry (const T &value, const C *context)
 
template<typename T , typename C >
toNativeWindowGeometry (const T &value, const C *context)
 
template<typename T >
fromNative (const T &value, qreal scaleFactor, QPoint origin=QPoint(0, 0))
 
template<typename T >
toNative (const T &value, qreal scaleFactor, QPoint origin=QPoint(0, 0))
 
QRect fromNative (const QRect &rect, const QScreen *screen, const QPoint &screenOrigin)
 
QRect fromNativeScreenGeometry (const QRect &nativeScreenGeometry, const QScreen *screen)
 
QRegion fromNativeLocalRegion (const QRegion &pixelRegion, const QWindow *window)
 
QRegion fromNativeLocalExposedRegion (const QRegion &pixelRegion, const QWindow *window)
 
QRegion toNativeLocalRegion (const QRegion &pointRegion, const QWindow *window)
 

Function Documentation

◆ fromNative() [1/2]

QRect QHighDpi::fromNative ( const QRect & rect,
const QScreen * screen,
const QPoint & screenOrigin )
inline

Definition at line 282 of file qhighdpiscaling_p.h.

References QHighDpiScaling::factor(), rect, and screen.

+ Here is the call graph for this function:

◆ fromNative() [2/2]

template<typename T >
T QHighDpi::fromNative ( const T & value,
qreal scaleFactor,
QPoint origin = QPoint(0, 0) )
inline

Definition at line 271 of file qhighdpiscaling_p.h.

Referenced by QWindowSystemInterface::handleScreenGeometryChange(), QPlatformWindow::initialGeometry(), and QScreenPrivate::updateGeometry().

+ Here is the caller graph for this function:

◆ fromNativeGlobalPosition()

template<typename T , typename C >
T QHighDpi::fromNativeGlobalPosition ( const T & value,
const C * context )

Definition at line 239 of file qhighdpiscaling_p.h.

References context, QHighDpiScaling::Point::Native, position(), and QHighDpiScaling::scaleAndOrigin().

Referenced by QWindowSystemInterface::handleGestureEventWithValueAndDelta(), QWindowSystemInterface::handleTabletEvent(), QWindowSystemInterface::handleWheelEvent(), QT_DEFINE_QPA_EVENT_HANDLER(), and QT_DEFINE_QPA_EVENT_HANDLER().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fromNativeLocalExposedRegion()

QRegion QHighDpi::fromNativeLocalExposedRegion ( const QRegion & pixelRegion,
const QWindow * window )
inline

Definition at line 300 of file qhighdpiscaling_p.h.

References QHighDpiScaling::factor(), QHighDpiScaling::isActive(), rect, and window().

Referenced by QT_DEFINE_QPA_EVENT_HANDLER(), and QT_DEFINE_QPA_EVENT_HANDLER().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fromNativeLocalPosition()

template<typename T , typename C >
T QHighDpi::fromNativeLocalPosition ( const T & value,
const C * context )

Definition at line 227 of file qhighdpiscaling_p.h.

References context, and QHighDpiScaling::factor().

Referenced by QWindowSystemInterface::handleGestureEventWithValueAndDelta(), QWindowSystemInterface::handleTabletEvent(), QWindowSystemInterface::handleWheelEvent(), QT_DEFINE_QPA_EVENT_HANDLER(), QT_DEFINE_QPA_EVENT_HANDLER(), and QWidgetPlatformMenu::showPopup().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fromNativeLocalRegion()

QRegion QHighDpi::fromNativeLocalRegion ( const QRegion & pixelRegion,
const QWindow * window )
inline

Definition at line 293 of file qhighdpiscaling_p.h.

References QHighDpiScaling::factor(), and window().

+ Here is the call graph for this function:

◆ fromNativePixels()

template<typename T , typename C >
T QHighDpi::fromNativePixels ( const T & value,
const C * context )

Definition at line 213 of file qhighdpiscaling_p.h.

References context, and QHighDpiScaling::scaleAndOrigin().

Referenced by QAndroidPlatformWindow::QAndroidPlatformWindow(), fromNativeGlobalPixels(), QWindowSystemInterfacePrivate::fromNativeTouchPoints(), QSystemTrayIconPrivate::geometry_sys(), QAndroidInputContext::handleLocationChanged(), QWindowsWindow::handleNonClientHitTest(), QXcbWindow::hide(), QtAndroidAccessibility::hitTest_helper(), QPlatformWindow::initialGeometry(), QToolBarPrivate::mouseMoveEvent(), QTipLabel::placeTip(), QCursor::pos(), QPlatformInputContext::queryFocusObject(), and QPlatformInputContext::setSelectionOnFocusObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fromNativeScreenGeometry()

QRect QHighDpi::fromNativeScreenGeometry ( const QRect & nativeScreenGeometry,
const QScreen * screen )
inline

Definition at line 287 of file qhighdpiscaling_p.h.

References QHighDpiScaling::factor(), and screen.

Referenced by QWindowSystemInterface::handleScreenGeometryChange().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fromNativeWindowGeometry()

template<typename T , typename C >
T QHighDpi::fromNativeWindowGeometry ( const T & value,
const C * context )

Definition at line 255 of file qhighdpiscaling_p.h.

References context, and QHighDpiScaling::scaleAndOrigin().

Referenced by QWindowSystemInterfacePrivate::GeometryChangeEvent::GeometryChangeEvent(), QPlatformWindow::closestAcceptableGeometry(), and QT_DEFINE_QPA_EVENT_HANDLER().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ position() [1/5]

QHighDpiScaling::Point QHighDpi::position ( QPoint point,
QHighDpiScaling::Point::Kind kind )
inline

Definition at line 199 of file qhighdpiscaling_p.h.

◆ position() [2/5]

QHighDpiScaling::Point QHighDpi::position ( QPointF point,
QHighDpiScaling::Point::Kind kind )
inline

Definition at line 202 of file qhighdpiscaling_p.h.

References QPointF::toPoint().

+ Here is the call graph for this function:

◆ position() [3/5]

QHighDpiScaling::Point QHighDpi::position ( QRect rect,
QHighDpiScaling::Point::Kind kind )
inline

Definition at line 205 of file qhighdpiscaling_p.h.

References rect.

◆ position() [4/5]

QHighDpiScaling::Point QHighDpi::position ( QRectF rect,
QHighDpiScaling::Point::Kind kind )
inline

Definition at line 208 of file qhighdpiscaling_p.h.

References rect.

◆ position() [5/5]

template<typename T >
QHighDpiScaling::Point QHighDpi::position ( T ,
QHighDpiScaling::Point::Kind  )
inline

Definition at line 196 of file qhighdpiscaling_p.h.

References QHighDpiScaling::Point::Invalid.

Referenced by fromNativeGlobalPosition(), and toNativeGlobalPosition().

+ Here is the caller graph for this function:

◆ scale() [1/11]

template<typename T >
QList< T > QHighDpi::scale ( const QList< T > & list,
qreal scaleFactor,
QPoint origin = QPoint(0, 0) )

Definition at line 173 of file qhighdpiscaling_p.h.

References item, list, qFuzzyCompare(), scaled(), and QList< T >::size().

+ Here is the call graph for this function:

◆ scale() [2/11]

QMargins QHighDpi::scale ( const QMargins & margins,
qreal scaleFactor,
QPoint origin = QPoint(0, 0) )
inline

Definition at line 165 of file qhighdpiscaling_p.h.

References QMargins::bottom(), QMargins::left(), Q_UNUSED, qRound(), QMargins::right(), and QMargins::top().

+ Here is the call graph for this function:

◆ scale() [3/11]

QPoint QHighDpi::scale ( const QPoint & pos,
qreal scaleFactor,
QPoint origin = QPoint(0, 0) )
inline

Definition at line 150 of file qhighdpiscaling_p.h.

References pos.

◆ scale() [4/11]

QPointF QHighDpi::scale ( const QPointF & pos,
qreal scaleFactor,
QPointF origin = QPointF(0, 0) )
inline

Definition at line 145 of file qhighdpiscaling_p.h.

References pos.

◆ scale() [5/11]

QRect QHighDpi::scale ( const QRect & rect,
qreal scaleFactor,
QPoint origin = QPoint(0, 0) )
inline

Definition at line 155 of file qhighdpiscaling_p.h.

References rect.

◆ scale() [6/11]

QRectF QHighDpi::scale ( const QRectF & rect,
qreal scaleFactor,
QPoint origin = QPoint(0, 0) )
inline

Definition at line 160 of file qhighdpiscaling_p.h.

References rect.

◆ scale() [7/11]

QRegion QHighDpi::scale ( const QRegion & region,
qreal scaleFactor,
QPoint origin = QPoint(0, 0) )
inline

Definition at line 185 of file qhighdpiscaling_p.h.

References QTransform::fromScale(), qFuzzyCompare(), scaled(), and QRegion::translated().

+ Here is the call graph for this function:

◆ scale() [8/11]

QSize QHighDpi::scale ( const QSize & value,
qreal scaleFactor,
QPointF = QPointF(0, 0) )
inline

Definition at line 130 of file qhighdpiscaling_p.h.

◆ scale() [9/11]

QSizeF QHighDpi::scale ( const QSizeF & value,
qreal scaleFactor,
QPointF = QPointF(0, 0) )
inline

Definition at line 135 of file qhighdpiscaling_p.h.

◆ scale() [10/11]

QVector2D QHighDpi::scale ( const QVector2D & value,
qreal scaleFactor,
QPointF = QPointF(0, 0) )
inline

Definition at line 140 of file qhighdpiscaling_p.h.

◆ scale() [11/11]

qreal QHighDpi::scale ( qreal value,
qreal scaleFactor,
QPointF = QPointF(0, 0) )
inline

Definition at line 125 of file qhighdpiscaling_p.h.

Referenced by QBackingStore::beginPaint(), QBackingStore::flush(), QBackingStore::resize(), and QBackingStore::scroll().

+ Here is the caller graph for this function:

◆ toNative()

template<typename T >
T QHighDpi::toNative ( const T & value,
qreal scaleFactor,
QPoint origin = QPoint(0, 0) )
inline

Definition at line 277 of file qhighdpiscaling_p.h.

Referenced by QScreen::grabWindow(), and QPlatformWindow::initialGeometry().

+ Here is the caller graph for this function:

◆ toNativeGlobalPosition()

template<typename T , typename C >
T QHighDpi::toNativeGlobalPosition ( const T & value,
const C * context )

Definition at line 247 of file qhighdpiscaling_p.h.

References context, QHighDpiScaling::Point::DeviceIndependent, position(), and QHighDpiScaling::scaleAndOrigin().

Referenced by qt_handleMouseEvent().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ toNativeLocalPosition()

template<typename T , typename C >
T QHighDpi::toNativeLocalPosition ( const T & value,
const C * context )

Definition at line 233 of file qhighdpiscaling_p.h.

References context, and QHighDpiScaling::factor().

Referenced by QXcbWindow::create(), QWindowsIntegration::createPlatformWindow(), qt_handleMouseEvent(), and QCocoaScreen::topLevelAt().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ toNativeLocalRegion()

QRegion QHighDpi::toNativeLocalRegion ( const QRegion & pointRegion,
const QWindow * window )
inline

Definition at line 313 of file qhighdpiscaling_p.h.

References QHighDpiScaling::factor(), and window().

Referenced by QIOSWindow::QIOSWindow(), QWindowsWindow::QWindowsWindow(), QXcbWindow::create(), QWindowsWindow::handleDpiChanged(), QCocoaWindow::initialize(), and QWasmWindow::initialize().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ toNativePixels()

template<typename T , typename C >
T QHighDpi::toNativePixels ( const T & value,
const C * context )

Definition at line 220 of file qhighdpiscaling_p.h.

References context, and QHighDpiScaling::scaleAndOrigin().

Referenced by QAndroidPlatformWindow::QAndroidPlatformWindow(), QPlatformWindow::QPlatformWindow(), QPlatformInputContext::anchorRectangle(), QXcbWindow::create(), QWindowsIntegration::createPlatformWindow(), QPlatformInputContext::cursorRectangle(), QWindowsBackingStore::flush(), QXcbNativeBackingStore::flush(), QXcbBackingStore::flush(), getNativeMousePos(), QXcbWindow::hide(), QPlatformWindow::initialGeometry(), QPlatformInputContext::inputItemClipRectangle(), QPlatformInputContext::inputItemRectangle(), QPlatformInputContext::keyboardRectangle(), QQuickLabsPlatformMenu::open(), QLibInputPointer::processAbsMotion(), QLibInputPointer::processMotion(), QGuiApplicationPrivate::processMouseEvent(), QEvdevTouchScreenData::screenGeometry(), QtAndroidAccessibility::screenRect_helper(), QLibInputPointer::setPos(), QCursor::setPos(), showSystemMenu(), QSimpleDrag::startDrag(), QXcbDrag::startDrag(), QWindowSystemInterfacePrivate::toNativeTouchPoint(), QPlatformScreen::topLevelAt(), QCocoaScreen::topLevelAt(), QGuiApplication::topLevelAt(), QtWaylandClient::QWaylandTextInputv1::updateState(), QtWaylandClient::QWaylandTextInputv2::updateState(), QtWaylandClient::QWaylandTextInputv3::updateState(), QPlatformWindow::windowBaseSize(), QPlatformWindow::windowMaximumSize(), QPlatformWindow::windowMinimumSize(), and QPlatformWindow::windowSizeIncrement().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ toNativeWindowGeometry()

template<typename T , typename C >
T QHighDpi::toNativeWindowGeometry ( const T & value,
const C * context )

Definition at line 263 of file qhighdpiscaling_p.h.

References context, and QHighDpiScaling::scaleAndOrigin().

Referenced by QPlatformWindow::closestAcceptableGeometry(), QEvdevTouchScreenData::screenGeometry(), QWindow::setGeometry(), QPlatformWindow::windowFrameGeometry(), and QPlatformWindow::windowGeometry().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: