8#include <QtGui/qtguiglobal.h>
9#include <QtCore/qpoint.h>
10#include <QtGui/qwindowdefs.h>
11#include <QtGui/qbitmap.h>
20
21
24class Q_GUI_EXPORT QCursor
28 static QPoint pos(
const QScreen *screen);
29 static void setPos(
int x,
int y);
30 static void setPos(QScreen *screen,
int x,
int y);
31 inline static void setPos(
const QPoint &p) { setPos(p.x(), p.y()); }
49 QCursor(Qt::CursorShape shape);
50 QCursor(
const QBitmap &bitmap,
const QBitmap &mask,
int hotX=-1,
int hotY=-1);
51 explicit QCursor(
const QPixmap &pixmap,
int hotX=-1,
int hotY=-1);
52 QCursor(
const QCursor &cursor);
54 QCursor &operator=(
const QCursor &cursor);
55 QCursor(QCursor &&other)
noexcept : d(std::exchange(other.d,
nullptr)) {}
56 QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_MOVE_AND_SWAP(QCursor)
58 void swap(QCursor &other)
noexcept { qt_ptr_swap(d, other.d); }
60 operator QVariant()
const;
62 Qt::CursorShape shape()
const;
63 void setShape(Qt::CursorShape newShape);
65#if QT_DEPRECATED_SINCE(6
, 0
)
66 QT_DEPRECATED_VERSION_X_6_0(
"Use the overload without argument instead.")
67 QBitmap bitmap(Qt::ReturnByValueConstant)
const {
return bitmap(); }
68 QT_DEPRECATED_VERSION_X_6_0(
"Use the overload without argument instead.")
69 QBitmap mask(Qt::ReturnByValueConstant)
const {
return mask(); }
71 QBitmap bitmap()
const;
74 QPixmap pixmap()
const;
75 QPoint hotSpot()
const;
78 static QPoint pos(
const QScreen *screen);
79 static void setPos(
int x,
int y);
80 static void setPos(QScreen *screen,
int x,
int y);
81 inline static void setPos(
const QPoint &p) { setPos(p.x(), p.y()); }
82 inline static void setPos(QScreen *screen,
const QPoint &p) { setPos(screen, p.x(), p.y()); }
85 friend Q_GUI_EXPORT
bool operator==(
const QCursor &lhs,
const QCursor &rhs)
noexcept;
86 friend inline bool operator!=(
const QCursor &lhs,
const QCursor &rhs)
noexcept {
return !(lhs == rhs); }
92
93
94#ifndef QT_NO_DATASTREAM
95Q_GUI_EXPORT
QDataStream &operator<<(QDataStream &outS,
const QCursor &cursor);
96Q_GUI_EXPORT
QDataStream &operator>>(QDataStream &inS, QCursor &cursor);
99#ifndef QT_NO_DEBUG_STREAM
100Q_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
Combined button and popup list for selecting options.
QCursorData * qt_cursorTable[Qt::LastCursor+1]
QDataStream & operator>>(QDataStream &s, QKeyCombination &combination)
Q_CORE_EXPORT QDebug operator<<(QDebug debug, QDir::Filters filters)