Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qevent_p.h
Go to the documentation of this file.
1// Copyright (C) 2020 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QEVENT_P_H
5#define QEVENT_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists for the convenience
12// of other Qt classes. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtGui/private/qtguiglobal_p.h>
19#include <QtCore/qurl.h>
20#include <QtGui/qevent.h>
21#include <QtGui/qwindow.h>
22
24
25class QPointingDevice;
26
27class Q_GUI_EXPORT QMutableTouchEvent : public QTouchEvent
28{
29public:
31 const QPointingDevice *device = nullptr,
32 Qt::KeyboardModifiers modifiers = Qt::NoModifier,
33 const QList<QEventPoint> &touchPoints = QList<QEventPoint>()) :
34 QTouchEvent(eventType, device, modifiers, touchPoints) { }
36
37 static QMutableTouchEvent *from(QTouchEvent *e) { return static_cast<QMutableTouchEvent *>(e); }
38
39 static QMutableTouchEvent &from(QTouchEvent &e) { return static_cast<QMutableTouchEvent &>(e); }
40
41 void setTarget(QObject *target) { m_target = target; }
42
43 void addPoint(const QEventPoint &point);
44};
45
47{
48public:
56
58
60
61 void setSource(Qt::MouseEventSource s) { m_source = s; }
62
63 bool isDoubleClick() { return m_doubleClick; }
64
65 void setDoubleClick(bool d = true) { m_doubleClick = d; }
66};
67
69
70#endif // QEVENT_P_H
IOBluetoothDevice * device
The QEventPoint class provides information about a point in a QPointerEvent.
Definition qeventpoint.h:20
Type
This enum type defines the valid event types in Qt.
Definition qcoreevent.h:51
@ TouchBegin
Definition qcoreevent.h:241
void setSource(Qt::MouseEventSource s)
Definition qevent_p.h:61
QMutableSinglePointEvent(Type type=QEvent::None, const QPointingDevice *device=nullptr, const QEventPoint &point=QEventPoint(), Qt::MouseButton button=Qt::NoButton, Qt::MouseButtons buttons=Qt::NoButton, Qt::KeyboardModifiers modifiers=Qt::NoModifier, Qt::MouseEventSource source=Qt::MouseEventSynthesizedByQt)
Definition qevent_p.h:50
QMutableSinglePointEvent(const QSinglePointEvent &other)
Definition qevent_p.h:49
~QMutableSinglePointEvent() override
void setDoubleClick(bool d=true)
Definition qevent_p.h:65
static QMutableSinglePointEvent * from(QSinglePointEvent *e)
Definition qevent_p.h:57
static QMutableSinglePointEvent & from(QSinglePointEvent &e)
Definition qevent_p.h:59
~QMutableTouchEvent() override
QMutableTouchEvent(QEvent::Type eventType=QEvent::TouchBegin, const QPointingDevice *device=nullptr, Qt::KeyboardModifiers modifiers=Qt::NoModifier, const QList< QEventPoint > &touchPoints=QList< QEventPoint >())
Definition qevent_p.h:30
static QMutableTouchEvent * from(QTouchEvent *e)
Definition qevent_p.h:37
void setTarget(QObject *target)
Definition qevent_p.h:41
static QMutableTouchEvent & from(QTouchEvent &e)
Definition qevent_p.h:39
\inmodule QtCore
Definition qobject.h:103
The QPointingDevice class describes a device from which mouse, touch or tablet events originate.
A base class for pointer events containing a single point, such as mouse events.
Definition qevent.h:109
The QTouchEvent class contains parameters that describe a touch event.
Definition qevent.h:917
EGLImageKHR int int EGLuint64KHR * modifiers
QPushButton * button
[2]
Combined button and popup list for selecting options.
MouseButton
Definition qnamespace.h:56
@ NoButton
Definition qnamespace.h:57
MouseEventSource
@ MouseEventSynthesizedByQt
@ NoModifier
static void addPoint(QPolygon &a, const QPoint &p)
GLenum type
GLenum target
GLsizei GLsizei GLchar * source
GLdouble s
[6]
Definition qopenglext.h:235
QSharedPointer< T > other(t)
[5]
Definition moc.h:23