
We bake cookies in your browser for a better experience. Using this site means that you consent.Read More
TheQScreenCursor class is a base class for screen cursors in Qt for Embedded Linux.More...
| Header: | #include <QScreenCursor> |
| Inherited By: |
| QScreenCursor() | |
| virtual | ~QScreenCursor() |
| QRect | boundingRect() const |
| virtual void | hide() |
| QImage | image() const |
| bool | isAccelerated() const |
| bool | isVisible() const |
| virtual void | move(int x, int y) |
| virtual void | set(const QImage & image, int hotx, int hoty) |
| virtual void | show() |
| void | initSoftwareCursor() |
| QScreenCursor * | instance() |
TheQScreenCursor 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 inQt for Embedded Linux.
QScreenCursor implements a software cursor, but can be subclassed to support hardware cursors as well. When deriving from theQScreenCursor 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 staticinstance() function to retrieve a pointer to the current screen cursor. Typically, the cursor is constructed by theQScreen class or one of its descendants when it is initializing the device; theQScreenCursor class should never be instantiated explicitly.
Use themove() function to change the position of the cursor, and theset() function to alter its image or its hot spot. In addition, you can find out whether the cursor is accelerated or not, using theisAccelerated() function, and theboundingRect() function returns the cursor's bounding rectangle.
The cursor's appearance can be controlled using theisVisible(),hide() andshow() functions; alternatively theQWSServer class provides some means of controlling the cursor's appearance using theQWSServer::isCursorVisible() andQWSServer::setCursorVisible() functions.
Constructs a screen cursor
[virtual]QScreenCursor::~QScreenCursor()Destroys the screen cursor.
Returns the cursor's bounding rectangle.
[virtual]void QScreenCursor::hide()Hides the cursor from the screen.
See alsoshow().
Returns the cursor's image.
[static]void QScreenCursor::initSoftwareCursor()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 staticinstance() function.
See alsoQScreen::initDevice().
[static]QScreenCursor * QScreenCursor::instance()Returns a pointer to the application's unique screen cursor.
This function was introduced in Qt 4.2.
Returns true if the cursor is accelerated; otherwise false.
Returns true if the cursor is visible; otherwise false.
[virtual]void QScreenCursor::move(int x,int y)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).
See alsoset().
[virtual]void QScreenCursor::set(constQImage & image,int hotx,int hoty)Sets the cursor's image to be the givenimage.
Thehotx andhoty 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.
See alsomove().
[virtual]void QScreenCursor::show()Shows the mouse cursor.
See alsohide().
© 2016 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of theGNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.