CopperSpice API  1.7.2
QPlatformCursorImage Class Reference

Provides a set of graphics intended to be used as cursors. More...

Public Methods

 QPlatformCursorImage (const uchar *data, const uchar *mask, int width, int height, int hotSpot_x, int hotSpot_y)
 
QPoint hotspot () const
 
QImageimage ()
 
void set (const QImage &image, int hotSpot_x, int hotSpot_y)
 
void set (const uchar *data, const uchar *mask, int width, int height, int hotSpot_x, int hotSpot_y)
 
void set (Qt::CursorShape cursorId)
 

Detailed Description

The QPlatformCursorImage class provides a set of graphics intended to be used as cursors.

See also
QPlatformCursor

Constructor & Destructor Documentation

QPlatformCursorImage::QPlatformCursorImage ( const uchar data,
const uchar mask,
int  width,
int  height,
int  hotSpot_x,
int  hotSpot_y 
)
inline

Sets the cursor image to the graphic represented by the combination of data and mask, with dimensions given by width and height and a hotspot at the point specified by (hotSpot_x, hotSpot_y).

See also
set()

Method Documentation

QPoint QPlatformCursorImage::hotspot ( ) const
inline

Return the cursor's hotspot.

QImage * QPlatformCursorImage::image ( )
inline

Return the cursor graphic as a pointer to a QImage.

void QPlatformCursorImage::set ( const QImage image,
int  hotSpot_x,
int  hotSpot_y 
)

Sets the cursor image to the given image with the hotspot at the point specified by (hotSpot_x, hotSpot_y).

void QPlatformCursorImage::set ( const uchar data,
const uchar mask,
int  width,
int  height,
int  hotSpot_x,
int  hotSpot_y 
)

Sets the cursor image to the graphic represented by the combination of data and mask, with dimensions given by width and height and a hotspot at the point specified by (hotSpot_x, hotSpot_y).

The image data specified by data must be supplied in the format described by QImage::Format_Indexed8. The corresponding mask data specified by mask must be supplied in a character array containing packed 1 bit per pixel format data, with any padding bits at the end of the array. Bits of value 0 represent transparent pixels in the image data.

void QPlatformCursorImage::set ( Qt::CursorShape  cursorId)

Calling this method sets the cursor image to the specified shape. The cursorId is one of the defined Qt::CursorShape values. If cursorId is invalid, Qt::BitmapCursor, or unknown, then Qt::ArrowCursor will be used.