Qt 4.8
|
The QScreenCursor class is a base class for screen cursors in Qt for Embedded Linux. More...
#include <qscreen_qws.h>
Public Functions | |
QRect | boundingRect () const |
Returns the cursor's bounding rectangle. More... | |
virtual void | hide () |
Hides the cursor from the screen. More... | |
QImage | image () const |
Returns the cursor's image. More... | |
bool | isAccelerated () const |
Returns true if the cursor is accelerated; otherwise false. More... | |
bool | isVisible () const |
Returns true if the cursor is visible; otherwise false. More... | |
virtual void | move (int x, int y) |
Moves the mouse cursor to the given position, i.e., (x, y). More... | |
QScreenCursor () | |
Constructs a screen cursor. More... | |
virtual void | set (const QImage &image, int hotx, int hoty) |
Sets the cursor's image to be the given image. More... | |
virtual void | show () |
Shows the mouse cursor. More... | |
bool | supportsAlphaCursor () const |
virtual | ~QScreenCursor () |
Destroys the screen cursor. More... | |
Static Public Functions | |
static bool | enabled () |
static void | initSoftwareCursor () |
Initializes the screen cursor. More... | |
static QScreenCursor * | instance () |
Protected Variables | |
QImage | cursor |
uint | enable: 1 |
QPoint | hotspot |
uint | hwaccel: 1 |
QPoint | pos |
QSize | size |
uint | supportsAlpha: 1 |
Friends | |
class | QProxyScreenCursor |
The QScreenCursor class is a base class for screen cursors in Qt for Embedded Linux.
Note that this class is non-portable, and that it is only available in Qt for Embedded Linux.
QScreenCursor implements a software cursor, but can be subclassed to support hardware cursors as well. When deriving from the QScreenCursor class it is important to maintain the cursor's image, position, hot spot (the point within the cursor's image that will be the position of the associated mouse events) and visibility as well as informing whether it is hardware accelerated or not.
Note that there may only be one screen cursor at a time. Use the static instance() function to retrieve a pointer to the current screen cursor. Typically, the cursor is constructed by the QScreen class or one of its descendants when it is initializing the device; the QScreenCursor class should never be instantiated explicitly.
Use the move() function to change the position of the cursor, and the set() function to alter its image or its hot spot. In addition, you can find out whether the cursor is accelerated or not, using the isAccelerated() function, and the boundingRect() function returns the cursor's bounding rectangle.
The cursor's appearance can be controlled using the isVisible(), hide() and show() functions; alternatively the QWSServer class provides some means of controlling the cursor's appearance using the QWSServer::isCursorVisible() and QWSServer::setCursorVisible() functions.
Definition at line 135 of file qscreen_qws.h.
QScreenCursor::QScreenCursor | ( | ) |
Constructs a screen cursor.
Definition at line 127 of file qscreen_qws.cpp.
Referenced by initSoftwareCursor().
|
virtual |
|
inline |
Returns the cursor's bounding rectangle.
Definition at line 150 of file qscreen_qws.h.
Referenced by blendCursor(), buttonChange(), QScreen::exposeRegion(), QVNCCursor::hide(), hide(), QVNCCursor::move(), move(), QVNCDirtyMap::QVNCDirtyMap(), QVNCCursor::set(), set(), QVNCCursor::show(), show(), QRfbRawEncoder::write(), and QRfbHextileEncoder< SRC >::write().
|
inlinestatic |
Definition at line 148 of file qscreen_qws.h.
|
virtual |
Hides the cursor from the screen.
Reimplemented in QDirectFBScreenCursor, QAhiScreenCursor, QVNCCursor, QProxyScreenCursor, and QMultiScreenCursor.
Definition at line 148 of file qscreen_qws.cpp.
Referenced by QWSServer::beginDisplayReconfigure(), QMultiScreenCursor::hide(), QProxyScreenCursor::hide(), QAhiScreenCursor::hide(), QWSServerPrivate::hideCursor(), QWSServerPrivate::resetEngine(), and QScreen::shutdownDevice().
|
inline |
Returns the cursor's image.
Definition at line 151 of file qscreen_qws.h.
Referenced by blendCursor(), blit_template(), buttonChange(), QScreen::exposeRegion(), QVNCClientCursor::QVNCClientCursor(), QVNCCursor::sendClientCursor(), QProxyScreenCursor::set(), and QMultiScreenCursor::~QMultiScreenCursor().
|
static |
Initializes the screen cursor.
This function is typically called from the screen driver when initializing the device. Alternatively, the cursor can be set directly using the pointer returned by the static instance() function.
Definition at line 247 of file qscreen_qws.cpp.
Referenced by QIntfbScreen::initDevice(), QVFbScreen::initDevice(), QQnxScreen::initDevice(), QAhiScreen::initDevice(), QLinuxFbScreen::initDevice(), QLinuxFbIntegration::initDevice(), and QDirectFBScreen::initDevice().
|
inlinestatic |
Returns a pointer to the application's unique screen cursor.
Definition at line 156 of file qscreen_qws.h.
Referenced by QDirectFBScreen::exposeRegion().
|
inline |
Returns true if the cursor is accelerated; otherwise false.
Definition at line 153 of file qscreen_qws.h.
Referenced by QScreen::exposeRegion(), QVNCDirtyMap::QVNCDirtyMap(), QVNCServer::setEncodings(), QRfbRawEncoder::write(), and QRfbHextileEncoder< SRC >::write().
|
inline |
Returns true if the cursor is visible; otherwise false.
Definition at line 152 of file qscreen_qws.h.
|
virtual |
Moves the mouse cursor to the given position, i.e., (x, y).
Note that the given position defines the top-left corner of the cursor's image, i.e., not the cursor's hot spot (the position of the associated mouse events).
Reimplemented in QDirectFBScreenCursor, QAhiScreenCursor, QVNCCursor, QProxyScreenCursor, and QMultiScreenCursor.
Definition at line 221 of file qscreen_qws.cpp.
Referenced by QMultiScreenCursor::move(), QProxyScreenCursor::move(), QAhiScreenCursor::move(), and QWSServerPrivate::sendMouseEventUnfiltered().
|
virtual |
Sets the cursor's image to be the given image.
The hotx and hoty parameters define the cursor's hot spot, i.e., the point within the cursor's image that will be the position of the associated mouse events.
Reimplemented in QDirectFBScreenCursor, QAhiScreenCursor, QVNCClientCursor, QVNCCursor, QProxyScreenCursor, and QMultiScreenCursor.
Definition at line 180 of file qscreen_qws.cpp.
Referenced by QMultiScreenCursor::move(), QMultiScreenCursor::set(), QProxyScreenCursor::set(), QVNCClientCursor::set(), QAhiScreenCursor::set(), and QWSServerPrivate::setCursor().
|
virtual |
Shows the mouse cursor.
Reimplemented in QDirectFBScreenCursor, QAhiScreenCursor, QVNCCursor, QProxyScreenCursor, and QMultiScreenCursor.
Definition at line 162 of file qscreen_qws.cpp.
Referenced by QWSServer::endDisplayReconfigure(), QMultiScreenCursor::move(), QWSServerPrivate::resetEngine(), QMultiScreenCursor::show(), QProxyScreenCursor::show(), QAhiScreenCursor::show(), and QWSServerPrivate::showCursor().
|
inline |
Definition at line 146 of file qscreen_qws.h.
Referenced by QWSCursor::set().
|
friend |
Definition at line 169 of file qscreen_qws.h.
|
protected |
Definition at line 159 of file qscreen_qws.h.
Referenced by QProxyScreenCursor::configure(), QMultiScreenCursor::move(), QProxyScreenCursor::set(), set(), QVNCServer::setCursor(), QProxyScreenCursor::setScreenCursor(), QVNCClientCursor::write(), QMultiScreenCursor::~QMultiScreenCursor(), and QMultiScreenPrivate::~QMultiScreenPrivate().
|
protected |
Definition at line 164 of file qscreen_qws.h.
Referenced by QProxyScreenCursor::configure(), QProxyScreenCursor::hide(), QVNCCursor::hide(), hide(), QVNCCursor::move(), move(), QAhiScreenCursor::QAhiScreenCursor(), QMultiScreenCursor::QMultiScreenCursor(), QScreenCursor(), QVNCCursor::set(), set(), QProxyScreenCursor::show(), QVNCCursor::show(), and show().
|
protected |
Definition at line 163 of file qscreen_qws.h.
Referenced by QProxyScreenCursor::configure(), QMultiScreenCursor::move(), QVNCClientCursor::QVNCClientCursor(), QProxyScreenCursor::set(), set(), and QVNCClientCursor::write().
|
protected |
Definition at line 165 of file qscreen_qws.h.
Referenced by QProxyScreenCursor::configure(), hide(), QVNCCursor::move(), move(), QAhiScreenCursor::QAhiScreenCursor(), QScreenCursor(), QVNCClientCursor::QVNCClientCursor(), QVNCCursor::QVNCCursor(), QVNCCursor::set(), set(), and show().
|
protected |
Definition at line 162 of file qscreen_qws.h.
Referenced by QProxyScreenCursor::configure(), QMultiScreenCursor::move(), QProxyScreenCursor::move(), QAhiScreenCursor::move(), move(), and QScreenCursor().
|
protected |
Definition at line 161 of file qscreen_qws.h.
Referenced by QProxyScreenCursor::configure(), QScreenCursor(), QProxyScreenCursor::set(), and set().
|
protected |
Definition at line 166 of file qscreen_qws.h.
Referenced by QProxyScreenCursor::configure(), QAhiScreenCursor::QAhiScreenCursor(), and QScreenCursor().