49 #include <QtGui/QBitmap> 51 #include <X11/cursorfont.h> 65 w =
static_cast<QXlibWindow*
>(window->platformWindow());
111 int destLineSize = width / 8;
118 char * mapBits =
new char[height * destLineSize];
119 char * maskBits =
new char[height * destLineSize];
120 for (
int i = 0; i < height; i++) {
121 memcpy(mapBits + (destLineSize * i),map + (bytesPerLine * i), destLineSize);
122 memcpy(maskBits + (destLineSize * i),mask + (bytesPerLine * i), destLineSize);
HCURSOR_or_HANDLE handle() const
Returns a platform-specific cursor handle.
QImage toImage() const
Converts the pixmap to a QImage.
The QCursor class provides a mouse cursor with an arbitrary shape.
#define QT_END_NAMESPACE
This macro expands to.
int width() const
Returns the width of the pixmap.
QPointer< QWidget > widget
int bytesPerLine() const
Returns the number of bytes per image scanline.
QXlibCursor(QXlibScreen *screen)
#define QT_BEGIN_NAMESPACE
This macro expands to.
Q_GUI_EXPORT EGLDisplay display()
QMap< int, Cursor > cursorMap
const T value(const Key &key) const
Returns the value associated with the key key.
The QImage class provides a hardware-independent image representation that allows direct access to th...
void changeCursor(QCursor *cursor, QWidget *widget)
This method is called by Qt whenever the cursor graphic should be changed.
QPoint hotSpot() const
Returns the cursor hot spot, or (0, 0) if it is one of the standard cursors.
uchar * bits()
Returns a pointer to the first pixel data.
QImage convertToFormat(Format f, Qt::ImageConversionFlags flags=Qt::AutoColor) const Q_REQUIRED_RESULT
Returns a copy of the image in the given format.
Cursor createCursorShape(int cshape)
Q_GUI_EXPORT EGLNativeDisplayType nativeDisplay()
const QBitmap * bitmap() const
Returns the cursor bitmap, or 0 if it is one of the standard cursors.
QXlibScreen * testLiteScreen() const
iterator insert(const Key &key, const T &value)
Inserts a new item with the key key and a value of value.
The QPoint class defines a point in the plane using integer precision.
Cursor createCursorBitmap(QCursor *cursor)
bool contains(const Key &key) const
Returns true if the map contains an item with key key; otherwise returns false.
int y() const
Returns the y coordinate of this point.
int height() const
Returns the height of the pixmap.
int x() const
Returns the x coordinate of this point.
const QBitmap * mask() const
Returns the cursor bitmap mask, or 0 if it is one of the standard cursors.
Qt::CursorShape shape() const
Returns the cursor shape identifier.
void setCursor(const Cursor &cursor)