2015-12-10 05:06:13 +02:00
|
|
|
/****************************************************************************
|
|
|
|
**
|
|
|
|
** Copyright (C) 2015 The Qt Company Ltd.
|
2019-06-03 13:38:02 +00:00
|
|
|
** Copyright (C) 2016-2019 Ivailo Monev
|
2015-12-10 05:06:13 +02:00
|
|
|
**
|
2019-06-03 13:38:02 +00:00
|
|
|
** This file is part of the QtGui module of the Katie Toolkit.
|
2015-12-10 05:06:13 +02:00
|
|
|
**
|
|
|
|
** $QT_BEGIN_LICENSE:LGPL$
|
|
|
|
** 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 or version 3 as published by the Free
|
|
|
|
** Software Foundation and appearing in the file LICENSE.LGPLv21 and
|
|
|
|
** LICENSE.LGPLv3 included in the packaging of this file. Please review the
|
|
|
|
** following information to ensure the GNU Lesser General Public License
|
|
|
|
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
|
|
|
|
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
|
|
|
**
|
|
|
|
** As a special exception, The Qt Company gives you certain additional
|
|
|
|
** rights. These rights are described in The Qt Company 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 QCURSOR_H
|
|
|
|
#define QCURSOR_H
|
|
|
|
|
|
|
|
#include <QtCore/qpoint.h>
|
|
|
|
#include <QtGui/qwindowdefs.h>
|
|
|
|
|
|
|
|
QT_BEGIN_HEADER
|
|
|
|
|
|
|
|
QT_BEGIN_NAMESPACE
|
|
|
|
|
|
|
|
|
|
|
|
class QVariant;
|
|
|
|
|
|
|
|
#ifdef QT_NO_CURSOR
|
|
|
|
|
|
|
|
class Q_GUI_EXPORT QCursor
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
static QPoint pos();
|
|
|
|
static void setPos(int x, int y);
|
|
|
|
inline static void setPos(const QPoint &p) { setPos(p.x(), p.y()); }
|
|
|
|
private:
|
|
|
|
QCursor();
|
|
|
|
};
|
|
|
|
|
2016-09-16 18:30:11 +00:00
|
|
|
#else // QT_NO_CURSOR
|
2015-12-10 05:06:13 +02:00
|
|
|
|
|
|
|
class QCursorData;
|
|
|
|
class QBitmap;
|
|
|
|
class QPixmap;
|
|
|
|
|
|
|
|
class Q_GUI_EXPORT QCursor
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
QCursor();
|
|
|
|
QCursor(Qt::CursorShape shape);
|
|
|
|
QCursor(const QBitmap &bitmap, const QBitmap &mask, int hotX=-1, int hotY=-1);
|
|
|
|
QCursor(const QPixmap &pixmap, int hotX=-1, int hotY=-1);
|
|
|
|
QCursor(const QCursor &cursor);
|
|
|
|
~QCursor();
|
|
|
|
QCursor &operator=(const QCursor &cursor);
|
|
|
|
#ifdef Q_COMPILER_RVALUE_REFS
|
|
|
|
inline QCursor &operator=(QCursor &&other)
|
|
|
|
{ qSwap(d, other.d); return *this; }
|
|
|
|
#endif
|
|
|
|
operator QVariant() const;
|
|
|
|
|
|
|
|
Qt::CursorShape shape() const;
|
|
|
|
void setShape(Qt::CursorShape newShape);
|
|
|
|
|
|
|
|
const QBitmap *bitmap() const;
|
|
|
|
const QBitmap *mask() const;
|
|
|
|
QPixmap pixmap() const;
|
|
|
|
QPoint hotSpot() const;
|
|
|
|
|
|
|
|
static QPoint pos();
|
|
|
|
static void setPos(int x, int y);
|
|
|
|
inline static void setPos(const QPoint &p) { setPos(p.x(), p.y()); }
|
|
|
|
|
2016-09-16 18:30:11 +00:00
|
|
|
#if defined(Q_WS_X11)
|
2015-12-10 05:06:13 +02:00
|
|
|
Qt::HANDLE handle() const;
|
|
|
|
QCursor(Qt::HANDLE cursor);
|
|
|
|
static int x11Screen();
|
|
|
|
#endif
|
|
|
|
|
|
|
|
private:
|
|
|
|
QCursorData *d;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*****************************************************************************
|
|
|
|
QCursor stream functions
|
|
|
|
*****************************************************************************/
|
|
|
|
#ifndef QT_NO_DATASTREAM
|
|
|
|
Q_GUI_EXPORT QDataStream &operator<<(QDataStream &outS, const QCursor &cursor);
|
|
|
|
Q_GUI_EXPORT QDataStream &operator>>(QDataStream &inS, QCursor &cursor);
|
|
|
|
#endif
|
|
|
|
#endif // QT_NO_CURSOR
|
|
|
|
|
|
|
|
QT_END_NAMESPACE
|
|
|
|
|
|
|
|
QT_END_HEADER
|
|
|
|
|
|
|
|
#endif // QCURSOR_H
|