7#include <QtGui/qtguiglobal.h>
8#include <QtCore/qpoint.h>
9#include <QtGui/qwindowdefs.h>
10#include <QtGui/qbitmap.h>
19
20
23class Q_GUI_EXPORT QCursor
27 static QPoint pos(
const QScreen *screen);
28 static void setPos(
int x,
int y);
29 static void setPos(QScreen *screen,
int x,
int y);
30 inline static void setPos(
const QPoint &p) { setPos(p.x(), p.y()); }
48 QCursor(Qt::CursorShape shape);
49 QCursor(
const QBitmap &bitmap,
const QBitmap &mask,
int hotX=-1,
int hotY=-1);
50 explicit QCursor(
const QPixmap &pixmap,
int hotX=-1,
int hotY=-1);
51 QCursor(
const QCursor &cursor);
53 QCursor &operator=(
const QCursor &cursor);
54 QCursor(QCursor &&other)
noexcept : d(std::exchange(other.d,
nullptr)) {}
55 QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_MOVE_AND_SWAP(QCursor)
57 void swap(QCursor &other)
noexcept { qt_ptr_swap(d, other.d); }
59 operator QVariant()
const;
61 Qt::CursorShape shape()
const;
62 void setShape(Qt::CursorShape newShape);
64#if QT_DEPRECATED_SINCE(6
, 0
)
65 QT_DEPRECATED_VERSION_X_6_0(
"Use the overload without argument instead.")
66 QBitmap bitmap(Qt::ReturnByValueConstant)
const {
return bitmap(); }
67 QT_DEPRECATED_VERSION_X_6_0(
"Use the overload without argument instead.")
68 QBitmap mask(Qt::ReturnByValueConstant)
const {
return mask(); }
70 QBitmap bitmap()
const;
73 QPixmap pixmap()
const;
74 QPoint hotSpot()
const;
77 static QPoint pos(
const QScreen *screen);
78 static void setPos(
int x,
int y);
79 static void setPos(QScreen *screen,
int x,
int y);
80 inline static void setPos(
const QPoint &p) { setPos(p.x(), p.y()); }
81 inline static void setPos(QScreen *screen,
const QPoint &p) { setPos(screen, p.x(), p.y()); }
84 friend Q_GUI_EXPORT
bool operator==(
const QCursor &lhs,
const QCursor &rhs)
noexcept;
85 friend inline bool operator!=(
const QCursor &lhs,
const QCursor &rhs)
noexcept {
return !(lhs == rhs); }
91
92
93#ifndef QT_NO_DATASTREAM
94Q_GUI_EXPORT
QDataStream &operator<<(QDataStream &outS,
const QCursor &cursor);
95Q_GUI_EXPORT
QDataStream &operator>>(QDataStream &inS, QCursor &cursor);
98#ifndef QT_NO_DEBUG_STREAM
99Q_GUI_EXPORT
QDebug operator<<(QDebug,
const QCursor &);
friend bool operator==(const QByteArray::FromBase64Result &lhs, const QByteArray::FromBase64Result &rhs) noexcept
Returns true if lhs and rhs are equal, otherwise returns false.
The QCursor class provides a mouse cursor with an arbitrary shape.
\inmodule QtCore\reentrant
\inmodule QtCore\reentrant
QCursorData * qt_cursorTable[Qt::LastCursor+1]
QDataStream & operator>>(QDataStream &s, QKeyCombination &combination)
Q_CORE_EXPORT QDebug operator<<(QDebug debug, QDir::Filters filters)