summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/qnx/qqnxcursor.h
diff options
context:
space:
mode:
authorRafael Roquetto <rafael.roquetto.qnx@kdab.com>2012-12-11 16:10:01 -0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-02-28 17:31:12 +0100
commit9fbecf11c7c5f7c059d6ba84c3da1458eaee608d (patch)
treef102e3bfbd21f89b084559ed01a601b29aa65bed /src/plugins/platforms/qnx/qqnxcursor.h
parent55cf7c577da015bd6d48a034902477b83cf73be7 (diff)
QNX: QQnxCursor implementation.
Implementation of QQnxCursor, a QPlatformCursor subclass. Due to the lack of a proper cursor API from the underlying OS, this class only caches the current cursor position to make sure that the QCursor class works properly. This is a backport of 290ed7f8fafd67197f773454223410bbe57fc4d3. At the time there weren't any known bugs regarding this, so it was committed to "dev" branch as a feature. Now we needed it in "stable", otherwise menus don't work correctly, due to QCursor::pos() being bogus. Change-Id: I5a4217c92a0aaed0b22b45ca3c4e0fad882e810f Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Diffstat (limited to 'src/plugins/platforms/qnx/qqnxcursor.h')
-rw-r--r--src/plugins/platforms/qnx/qqnxcursor.h67
1 files changed, 67 insertions, 0 deletions
diff --git a/src/plugins/platforms/qnx/qqnxcursor.h b/src/plugins/platforms/qnx/qqnxcursor.h
new file mode 100644
index 0000000000..5d6a8b2c30
--- /dev/null
+++ b/src/plugins/platforms/qnx/qqnxcursor.h
@@ -0,0 +1,67 @@
+/***************************************************************************
+**
+** Copyright (C) 2011 - 2012 Research In Motion
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** 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.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** 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.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QQNXCURSOR_H
+#define QQNXCURSOR_H
+
+#include <qpa/qplatformcursor.h>
+
+QT_BEGIN_NAMESPACE
+
+class QQnxCursor : public QPlatformCursor
+{
+public:
+ QQnxCursor();
+
+#ifndef QT_NO_CURSOR
+ void changeCursor(QCursor *windowCursor, QWindow *window);
+#endif
+ void setPos(const QPoint &pos);
+
+ QPoint pos() const;
+
+private:
+ QPoint m_pos;
+};
+
+QT_END_NAMESPACE
+
+#endif // QQNXCURSOR_H