4#ifndef QQUICKEVENTS_P_P_H
5#define QQUICKEVENTS_P_P_H
18#include <private/qtquickglobal_p.h>
21#include <QtCore/qobject.h>
22#include <QtCore/qpointer.h>
23#include <QtGui/qevent.h>
24#include <QtGui/qpointingdevice.h>
25#include <QtGui/qvector2d.h>
26#include <QtQuick/qquickitem.h>
28#if QT_CONFIG(shortcut)
29# include <QtGui/qkeysequence.h>
45 Q_PROPERTY(
bool isAutoRepeat READ isAutoRepeat CONSTANT FINAL)
48 Q_PROPERTY(
bool accepted READ isAccepted WRITE setAccepted FINAL)
63 m_autoRepeat = autorep;
80 int key()
const {
return m_key; }
84 int count()
const {
return m_count; }
90#if QT_CONFIG(shortcut)
101 bool m_accepted =
false;
102 bool m_autoRepeat =
false;
111 Q_PROPERTY(
int buttons READ buttons CONSTANT FINAL)
113#if QT_DEPRECATED_SINCE(6, 6)
116 Q_PROPERTY(
bool wasHeld READ wasHeld CONSTANT FINAL)
117 Q_PROPERTY(
bool isClick READ isClick CONSTANT FINAL)
118 Q_PROPERTY(
bool accepted READ isAccepted WRITE setAccepted FINAL)
129 Qt::KeyboardModifiers
modifiers,
bool isClick =
false,
bool wasHeld =
false,
130 Qt::MouseEventFlags
flags = { })
149#if QT_DEPRECATED_SINCE(6, 6)
150 int source()
const {
return _source; }
159#if QT_DEPRECATED_SINCE(6, 6)
165 int flags()
const {
return _flags; }
179#if QT_CONFIG(wheelevent)
189 Q_PROPERTY(
int buttons READ buttons CONSTANT FINAL)
191 Q_PROPERTY(
bool inverted READ inverted CONSTANT FINAL)
192 Q_PROPERTY(
bool accepted READ isAccepted WRITE setAccepted FINAL)
201 _device =
event->pointingDevice();
202 _x =
event->position().x();
203 _y =
event->position().y();
204 _angleDelta =
event->angleDelta();
205 _pixelDelta =
event->pixelDelta();
206 _buttons =
event->buttons();
207 _modifiers =
event->modifiers();
209 _inverted =
event->inverted();
210 _phase =
event->phase();
214 qreal x()
const {
return _x; }
215 qreal y()
const {
return _y; }
216 QPoint angleDelta()
const {
return _angleDelta; }
217 QPoint pixelDelta()
const {
return _pixelDelta; }
218 int buttons()
const {
return _buttons; }
219 int modifiers()
const {
return _modifiers; }
221 bool inverted()
const {
return _inverted; }
222 bool isAccepted() {
return _accepted; }
223 void setAccepted(
bool accepted) { _accepted = accepted; }
234 bool _inverted =
false;
235 bool _accepted =
false;
242 Q_PROPERTY(
bool accepted READ isAccepted WRITE setAccepted FINAL)
253 bool _accepted =
true;
260#if QT_CONFIG(wheelevent)
IOBluetoothDevice * device
Type
This enum type defines the valid event types in Qt.
Type type() const
Returns the event type.
The QKeyEvent class describes a key event.
int count() const
Returns the number of keys involved in this event.
Qt::KeyboardModifiers modifiers() const
Returns the keyboard modifier flags that existed immediately after the event occurred.
quint32 nativeScanCode() const
QString text() const
Returns the Unicode text that this key generated.
bool isAutoRepeat() const
Returns true if this event comes from an auto-repeating key; returns false if it comes from an initia...
int key() const
Returns the code of the key that was pressed or released.
The QKeySequence class encapsulates a key sequence as used by shortcuts.
\inmodule QtCore\reentrant
constexpr qreal x() const noexcept
Returns the x coordinate of this point.
constexpr qreal y() const noexcept
Returns the y coordinate of this point.
\inmodule QtCore\reentrant
A base class for pointer events.
QPointingDeviceUniqueId identifies a unique object, such as a tagged token or stylus,...
The QPointingDevice class describes a device from which mouse, touch or tablet events originate.
\qmlsignal QtQuick::Window::sceneGraphError(SceneGraphError error, QString message)
void setAccepted(bool accepted)
quint32 nativeScanCode() const
void reset(const QKeyEvent &ke)
void setAccepted(bool accepted)
void reset(QEvent::Type type, int key, Qt::KeyboardModifiers modifiers, const QString &text=QString(), bool autorep=false, ushort count=1)
bool isAutoRepeat() const
\qmlproperty int QtQuick::KeyEvent::key
void setAccepted(bool accepted)
void reset(qreal x, qreal y, Qt::MouseButton button, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers, bool isClick=false, bool wasHeld=false, Qt::MouseEventFlags flags={ })
void setPosition(const QPointF &point)
\qmlproperty real QtQuick::MouseEvent::x \qmlproperty real QtQuick::MouseEvent::y
\macro QT_RESTRICTED_CAST_FROM_ASCII
EGLImageKHR int int EGLuint64KHR * modifiers
Combined button and popup list for selecting options.
@ MouseEventNotSynthesized
static bool matches(const QJsonObject &object, const QString &osName, const QVersionNumber &kernelVersion, const QString &osRelease, const QOpenGLConfig::Gpu &gpu)
GLint GLint GLint GLint GLint x
[0]
GLenum GLenum GLsizei count
GLsizei GLsizei GLchar * source
#define QML_DECLARE_TYPE(TYPE)
#define QML_ADDED_IN_VERSION(MAJOR, MINOR)