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)
64 m_autoRepeat = autorep;
73 m_modifiers = ke.modifiers();
75 m_autoRepeat = ke.isAutoRepeat();
77 m_nativeScanCode = ke.nativeScanCode();
81 int key()
const {
return m_key; }
85 int count()
const {
return m_count; }
91#if QT_CONFIG(shortcut)
102 bool m_accepted =
false;
103 bool m_autoRepeat =
false;
114#if QT_DEPRECATED_SINCE(6, 6)
119 Q_PROPERTY(
bool accepted READ isAccepted WRITE setAccepted FINAL)
131 Qt::KeyboardModifiers
modifiers,
bool isClick =
false,
bool wasHeld =
false,
132 Qt::MouseEventFlags
flags = { })
151#if QT_DEPRECATED_SINCE(6, 6)
152 int source()
const {
return _source; }
161#if QT_DEPRECATED_SINCE(6, 6)
167 int flags()
const {
return _flags; }
181#if QT_CONFIG(wheelevent)
191 Q_PROPERTY(
int buttons READ buttons CONSTANT FINAL)
193 Q_PROPERTY(
bool inverted READ inverted CONSTANT FINAL)
194 Q_PROPERTY(
bool accepted READ isAccepted WRITE setAccepted FINAL)
196 QML_UNCREATABLE(
"Should only be used by wheel event signal handlers, for example in MouseArea")
204 _device =
event->pointingDevice();
205 _x =
event->position().x();
206 _y =
event->position().y();
207 _angleDelta =
event->angleDelta();
208 _pixelDelta =
event->pixelDelta();
209 _buttons =
event->buttons();
210 _modifiers =
event->modifiers();
212 _inverted =
event->inverted();
213 _phase =
event->phase();
217 qreal x()
const {
return _x; }
218 qreal y()
const {
return _y; }
219 QPoint angleDelta()
const {
return _angleDelta; }
220 QPoint pixelDelta()
const {
return _pixelDelta; }
221 int buttons()
const {
return _buttons; }
222 int modifiers()
const {
return _modifiers; }
224 bool inverted()
const {
return _inverted; }
225 bool isAccepted() {
return _accepted; }
226 void setAccepted(
bool accepted) { _accepted = accepted; }
237 bool _inverted =
false;
238 bool _accepted =
false;
245 Q_PROPERTY(
bool accepted READ isAccepted WRITE setAccepted FINAL)
257 bool _accepted =
true;
IOBluetoothDevice * device
Type
This enum type defines the valid event types in Qt.
The QKeyEvent class describes a key event.
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.
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
qsizetype count(QChar c, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
EGLImageKHR int int EGLuint64KHR * modifiers
for(qsizetype i=0;i< list.size();++i)
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_UNCREATABLE(REASON)
#define QML_NAMED_ELEMENT(NAME)
#define QML_ADDED_IN_VERSION(MAJOR, MINOR)