summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qplatformcursor_qpa.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/kernel/qplatformcursor_qpa.cpp')
-rw-r--r--src/gui/kernel/qplatformcursor_qpa.cpp123
1 files changed, 50 insertions, 73 deletions
diff --git a/src/gui/kernel/qplatformcursor_qpa.cpp b/src/gui/kernel/qplatformcursor_qpa.cpp
index f43eca640f..b3994103fe 100644
--- a/src/gui/kernel/qplatformcursor_qpa.cpp
+++ b/src/gui/kernel/qplatformcursor_qpa.cpp
@@ -7,29 +7,29 @@
** This file is part of the QtOpenVG module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this
+** file. Please review the following information to ensure the GNU Lesser
+** General Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
+** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
**
**
**
@@ -51,48 +51,46 @@ QT_BEGIN_NAMESPACE
QList <QWeakPointer<QPlatformCursor> > QPlatformCursorPrivate::instances;
/*!
- \class QGraphicsSystemCursor
+ \class QPlatformCursor
- \brief The QGraphicsSystemCursor class provides information about
+ \brief The QPlatformCursor class provides information about
pointer device events (movement, buttons), and requests to change
the currently displayed cursor.
- Note that QGraphicsSystemCursor does not include any graphics for
+ Note that QPlatformCursor does not include any graphics for
display. An application that sets a QCursor may provide its own
graphics.
- \sa QGraphicsSystemCursorImage
+ \sa QPlatformCursorImage
*/
/*!
- \fn virtual void QGraphicsSystemCursor::pointerEvent(const QMouseEvent & event)
+ \fn virtual void QPlatformCursor::pointerEvent(const QMouseEvent & event)
This method is called by Qt whenever a QMouseEvent is generated by the
underlying pointer input. \a event is a reference to the QMouseEvent in
question. A default do-nothing implementation is provided.
-
- \sa QApplicationPrivate::handleMouseEvent()
*/
/*!
- \fn virtual void QGraphicsSystemCursor::changeCursor(QCursor * widgetCursor, QWidget * widget)
+ \fn virtual void QPlatformCursor::changeCursor(QCursor * widgetCursor, QWidget * widget)
\brief This method is called by Qt whenever the cursor graphic should be changed.
- Implementation of this method is mandatory for a subclass of QGraphicsSystemCursor.
+ Implementation of this method is mandatory for a subclass of QPlatformCursor.
\a widgetCursor is a pointer to the QCursor that should be displayed.
\a widget is a pointer to the widget currently displayed at QCursor::pos(). Note
that this may be 0 if the current position is not occupied by a displayed widget.
- \sa QApplicationPrivate::handleMouseEvent(), QCursor::pos()
+ \sa QCursor::pos()
*/
/*!
- \fn QGraphicsSystemCursor::QGraphicsSystemCursor()
+ \fn QPlatformCursor::QPlatformCursor(QPlatformScreen *screen)
- \brief Constructs a QGraphicsSystemCursor
+ Constructs a QPlatformCursor for the given \a screen.
*/
QPlatformCursor::QPlatformCursor(QPlatformScreen *scr )
: screen(scr)
@@ -105,12 +103,12 @@ QPlatformCursor::QPlatformCursor(QPlatformScreen *scr )
// from src/gui/embedded/QGraphicsSystemCursorImage_qws.cpp
/*!
- \class QGraphicsSystemCursorImage
+ \class QPlatformCursorImage
- \brief The QGraphicsSystemCursorImage class provides a set of graphics
+ \brief The QPlatformCursorImage class provides a set of graphics
intended to be used as cursors.
- \sa QGraphicsSystemCursor
+ \sa QPlatformCursor
*/
static QPlatformCursorImage *systemCursorTable[Qt::LastCursor+1];
@@ -501,7 +499,7 @@ void QPlatformCursorImage::createSystemCursor(int id)
}
/*!
- \fn void QGraphicsSystemCursorImage::set(Qt::CursorShape id)
+ \fn void QPlatformCursorImage::set(Qt::CursorShape id)
\brief Calling this method sets the cursor image to the specified shape
@@ -530,15 +528,8 @@ void QPlatformCursorImage::set(Qt::CursorShape id)
}
/*!
- \fn void QGraphicsSystemCursorImage::set(const QImage * image, int hx, int hy)
-
- \brief Set the cursor image to the specified QImage, with the hotsport at (hx, hy)
-
- \a image A pointer to a QImage
-
- \a hx The x coordinate of the cursor's hotspot
-
- \a hy the y coordinate of the cursor's hotspot
+ Sets the cursor image to the given \a image, with the hotspot at the
+ point specified by (\a hx, \a hy).
*/
void QPlatformCursorImage::set(const QImage &image, int hx, int hy)
@@ -549,22 +540,19 @@ void QPlatformCursorImage::set(const QImage &image, int hx, int hy)
}
/*!
- \fn void QGraphicsSystemCursorImage::set(const uchar *data, const uchar *mask, int width, int height, int hx, int hy)
-
- \brief set the cursor image to the graphic represented by the combination of data, mask,
- width, and height
+ \fn void QPlatformCursorImage::set(const uchar *data, const uchar *mask, int width, int height, int hx, int hy)
- \a data The pixel data of the graphic
+ Sets the cursor image to the graphic represented by the combination of
+ \a data and \a mask, with dimensions given by \a width and \a height and a
+ hotspot at the point specified by (\a hx, \a hy).
- \a mask Mask data for the graphic. pixels in data with a corresponding mask bit of 0 are not drawn
+ The image data specified by \a data must be supplied in the format
+ described by QImage::Format_Indexed8.
- \a width The width of the graphic in pixels
-
- \a height The height of the graphic in pixels
-
- \a hx The X hotspot of the cursor graphic
-
- \a hy The Y hotspot of the cursor graphic
+ The corresponding mask data specified by \a 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(const uchar *data, const uchar *mask,
int width, int height, int hx, int hy)
@@ -624,34 +612,23 @@ void QPlatformCursorImage::set(const uchar *data, const uchar *mask,
}
/*!
- \fn QGraphicsSystemCursorImage::QGraphicsSystemCursorImage(const uchar *data, const uchar *mask, int width, int height, int hotX, int hotY)
-
- \brief set the cursor image to the graphic represented by the combination of data, mask,
- width, and height
-
- \a data The pixel data of the graphic
-
- \a mask Mask data for the graphic. pixels in data with a corresponding mask bit of 0 are not drawn
-
- \a width The width of the graphic in pixels
-
- \a height The height of the graphic in pixels
-
- \a hotX The X hotspot of the cursor graphic
+ \fn QPlatformCursorImage::QPlatformCursorImage(const uchar *data, const uchar *mask, int width, int height, int hotX, int hotY)
- \a hotY The Y hotspot of the cursor graphic
+ Sets the cursor image to the graphic represented by the combination of
+ \a data and \a mask, with dimensions given by \a width and \a height and a
+ hotspot at the point specified by (\a hotX, \a hotY).
- \sa set
+ \sa set()
*/
/*!
- \fn QImage *QGraphicsSystemCursorImage::image()
+ \fn QImage *QPlatformCursorImage::image()
\brief Return the cursor graphic as a pointer to a QImage
*/
/*!
- \fn QPoint QGraphicsSystemCursorImage::hotspot()
+ \fn QPoint QPlatformCursorImage::hotspot()
\brief Return the cursor's hotspot
*/