47 #include <private/qcursor_p.h>
50 #include <qpa/qplatformcursor.h>
51 #include <private/qguiapplication_p.h>
52 #include <private/qhighdpiscaling_p.h>
199 ps =
ps->screenForPosition(nativePos);
305 #ifndef QT_NO_DATASTREAM
321 bool isPixmap =
false;
322 if (
s.version() >= 7) {
323 isPixmap = !
c.pixmap().isNull();
349 bool isPixmap =
false;
350 if (
s.version() >= 7)
360 s >>
bm >> bmm >> hot;
507 && lhs.hotSpot() ==
rhs.hotSpot()) {
508 if (!lhs.d->pixmap.isNull())
509 return lhs.d->pixmap.cacheKey() ==
rhs.d->pixmap.cacheKey();
511 if (!
rhs.d->pixmap.isNull())
514 return lhs.d->bm->cacheKey() ==
rhs.d->bm->cacheKey()
515 && lhs.d->bmm->cacheKey() ==
rhs.d->bmm->cacheKey();
692 #ifndef QT_NO_DEBUG_STREAM
696 dbg.
nospace() <<
"QCursor(Qt::CursorShape(" <<
c.shape() <<
"))";
749 qWarning(
"QCursor: Cannot create bitmap cursor; invalid bitmap(s)");
758 d->hx = hotX >= 0 ? hotX :
bitmap.width() / 2 / devicePixelRatio;
759 d->hy = hotY >= 0 ? hotY :
bitmap.height() / 2 / devicePixelRatio;
The QBitmap class provides monochrome (1-bit depth) pixmaps.
static QBitmap fromImage(const QImage &image, Qt::ImageConversionFlags flags=Qt::AutoColor)
QCursorData(Qt::CursorShape s=Qt::ArrowCursor)
static QCursorData * setBitmap(const QBitmap &bitmap, const QBitmap &mask, int hotX, int hotY, qreal devicePixelRatio)
The QCursor class provides a mouse cursor with an arbitrary shape.
static void setPos(int x, int y)
Qt::CursorShape shape() const
QCursor & operator=(const QCursor &cursor)
void setShape(Qt::CursorShape newShape)
The QDataStream class provides serialization of binary data to a QIODevice.
operator>>(QDataStream &ds, qfloat16 &f)
operator<<(QDataStream &ds, qfloat16 f)
The QDebug class provides an output stream for debugging information.
Convenience class for custom QDebug operators.
template< typename Enum > bool operator==(Enum lhs, QFlags< Enum > rhs)
QScreen * primaryScreen
the primary (or default) screen of the application.
static struct QGuiApplicationPrivate::QLastCursorPosition lastCursorPosition
The QImage class provides a hardware-independent image representation that allows direct access to th...
QImage convertToFormat(Format f, Qt::ImageConversionFlags flags=Qt::AutoColor) const &
The QPixmap class is an off-screen image representation that can be used as a paint device.
void setMask(const QBitmap &)
void fill(const QColor &fillColor=Qt::white)
qreal devicePixelRatio() const
The QPoint class defines a point in the plane using integer precision.
constexpr int x() const noexcept
constexpr int y() const noexcept
The QScreen class is used to query screen properties. \inmodule QtGui.
QScreen * virtualSiblingAt(QPoint point)
QPlatformScreen * handle() const
The QVariant class acts like a union for the most common Qt data types.
static auto fromValue(const T &value) -> std::enable_if_t< std::is_copy_constructible_v< T >, QVariant >
QRhiGraphicsPipeline * ps
T toNativePixels(const T &value, const C *context)
T fromNativePixels(const T &value, const C *context)
QCursorData * qt_cursorTable[Qt::LastCursor+1]
QT_END_INCLUDE_NAMESPACE typedef double qreal
GLint GLint GLint GLint GLint x
[0]
GLint GLint GLint GLint GLint GLint GLint GLbitfield mask
GLsizei GLfixed GLfixed GLfixed GLfixed const GLubyte * bitmap
QBitmap bm(8, 8, arrow_bits, true)