Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qevent.cpp File Reference
#include "qevent.h"
#include "qcursor.h"
#include "private/qguiapplication_p.h"
#include "private/qinputdevice_p.h"
#include "private/qpointingdevice_p.h"
#include "qpa/qplatformintegration.h"
#include "private/qevent_p.h"
#include "private/qeventpoint_p.h"
#include "qfile.h"
#include "qhashfunctions.h"
#include "qmetaobject.h"
#include "qmimedata.h"
#include "qevent_p.h"
#include "qmath.h"
#include "qloggingcategory.h"
#include <private/qdebug_p.h>
#include "moc_qevent.cpp"
+ Include dependency graph for qevent.cpp:

Go to the source code of this file.

Macros

#define Q_IMPL_POINTER_EVENT(Class)
 

Functions

 Q_IMPL_POINTER_EVENT (QPointerEvent)
 
static void formatTouchEvent (QDebug d, const QTouchEvent &t)
 
static void formatUnicodeString (QDebug d, const QString &s)
 
static QDebug operator<< (QDebug dbg, const QInputMethodEvent::Attribute &attr)
 
static void formatInputMethodEvent (QDebug d, const QInputMethodEvent *e)
 
static void formatInputMethodQueryEvent (QDebug d, const QInputMethodQueryEvent *e)
 
static const char * eventClassName (QEvent::Type t)
 
QDebug operator<< (QDebug dbg, const QEventPoint *tp)
 
QDebug operator<< (QDebug dbg, const QEventPoint &tp)
 
QDebug operator<< (QDebug dbg, const QEvent *e)
 

Variables

 QT_BEGIN_NAMESPACE
 

Macro Definition Documentation

◆ Q_IMPL_POINTER_EVENT

#define Q_IMPL_POINTER_EVENT (   Class)
Value:
Class::Class(const Class &) = default; \
Class::~Class() = default; \
Class* Class::clone() const \
{ \
auto c = new Class(*this); \
for (auto &point : c->m_points) \
QMutableEventPoint::detach(point); \
QEvent *e = c; \
/* check that covariant return is safe to add */ \
Q_ASSERT(reinterpret_cast<quintptr>(c) == reinterpret_cast<quintptr>(e)); \
return c; \
}
\inmodule QtCore
Definition qcoreevent.h:45
double e
const GLubyte * c
size_t quintptr
Definition qtypes.h:72

Definition at line 31 of file qevent.cpp.

Function Documentation

◆ eventClassName()

static const char * eventClassName ( QEvent::Type  t)
static

Definition at line 3833 of file qevent.cpp.

References QEvent::ActionAdded, QEvent::ActionChanged, QEvent::ActionRemoved, QEvent::ChildAdded, QEvent::ChildPolished, QEvent::ChildRemoved, QEvent::Close, QEvent::DragEnter, QEvent::DragMove, QEvent::Drop, QEvent::Enter, QEvent::FileOpen, QEvent::FocusAboutToChange, QEvent::FocusIn, QEvent::FocusOut, QEvent::Gesture, QEvent::GestureOverride, QEvent::GraphicsSceneContextMenu, QEvent::GraphicsSceneDragEnter, QEvent::GraphicsSceneDragLeave, QEvent::GraphicsSceneDragMove, QEvent::GraphicsSceneDrop, QEvent::GraphicsSceneHelp, QEvent::GraphicsSceneHoverEnter, QEvent::GraphicsSceneHoverLeave, QEvent::GraphicsSceneHoverMove, QEvent::GraphicsSceneMouseDoubleClick, QEvent::GraphicsSceneMouseMove, QEvent::GraphicsSceneMousePress, QEvent::GraphicsSceneMouseRelease, QEvent::GraphicsSceneWheel, QEvent::Hide, QEvent::HoverEnter, QEvent::HoverLeave, QEvent::HoverMove, QEvent::InputMethod, QEvent::InputMethodQuery, QEvent::KeyPress, QEvent::KeyRelease, QEvent::MouseButtonDblClick, QEvent::MouseButtonPress, QEvent::MouseButtonRelease, QEvent::MouseMove, QEvent::Move, QEvent::NativeGesture, QEvent::NonClientAreaMouseButtonDblClick, QEvent::NonClientAreaMouseButtonPress, QEvent::NonClientAreaMouseButtonRelease, QEvent::NonClientAreaMouseMove, QEvent::OrientationChange, QEvent::Paint, QEvent::PlatformSurface, QEvent::Resize, QEvent::Scroll, QEvent::ScrollPrepare, QEvent::Shortcut, QEvent::ShortcutOverride, QEvent::Show, QEvent::StatusTip, QEvent::TabletEnterProximity, QEvent::TabletLeaveProximity, QEvent::TabletMove, QEvent::TabletPress, QEvent::TabletRelease, QEvent::Timer, QEvent::ToolTip, QEvent::TouchBegin, QEvent::TouchEnd, QEvent::TouchUpdate, QEvent::Wheel, and QEvent::WindowStateChange.

Referenced by operator<<().

+ Here is the caller graph for this function:

◆ formatInputMethodEvent()

static void formatInputMethodEvent ( QDebug  d,
const QInputMethodEvent e 
)
inlinestatic

Definition at line 3778 of file qevent.cpp.

References QSet< T >::cbegin(), d, e, formatUnicodeString(), and it.

Referenced by operator<<().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ formatInputMethodQueryEvent()

static void formatInputMethodQueryEvent ( QDebug  d,
const QInputMethodQueryEvent e 
)
inlinestatic

Definition at line 3807 of file qevent.cpp.

References d, Qt::dec(), e, QtDebugUtils::formatQEnum(), QtDebugUtils::formatQFlags(), Qt::hex(), Qt::ImHints, Qt::ImInputItemClipRectangle, Qt::noshowbase(), and Qt::showbase().

Referenced by operator<<().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ formatTouchEvent()

static void formatTouchEvent ( QDebug  d,
const QTouchEvent t 
)
inlinestatic

Definition at line 3750 of file qevent.cpp.

References d, QtDebugUtils::formatQEnum(), and QtDebugUtils::formatQFlags().

Referenced by operator<<().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ formatUnicodeString()

static void formatUnicodeString ( QDebug  d,
const QString s 
)
static

Definition at line 3760 of file qevent.cpp.

References d, Qt::dec(), Qt::hex(), and i.

Referenced by formatInputMethodEvent().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator<<() [1/4]

QDebug operator<< ( QDebug  dbg,
const QEvent e 
)

Definition at line 4040 of file qevent.cpp.

References QEvent::ApplicationStateChange, button, QSinglePointEvent::button(), QSinglePointEvent::buttons(), QEvent::ChildAdded, QEvent::ChildPolished, QEvent::ChildRemoved, QScrollPrepareEvent::contentPos(), QScrollEvent::contentPos(), QScrollPrepareEvent::contentPosRange(), QEvent::ContextMenu, QKeyEvent::count(), QInputEvent::device(), QEvent::DragEnter, QEvent::DragMove, QEvent::Drop, e, QEvent::Enter, eventClassName(), QEvent::Expose, QEvent::FocusAboutToChange, QEvent::FocusIn, QEvent::FocusOut, formatInputMethodEvent(), formatInputMethodQueryEvent(), QtDebugUtils::formatNonNullQFlags(), QtDebugUtils::formatQEnum(), QtDebugUtils::formatQFlags(), QtDebugUtils::formatQPoint(), QtDebugUtils::formatQSize(), formatTouchEvent(), QSinglePointEvent::globalPosition(), QEvent::HoverEnter, QEvent::HoverLeave, QEvent::HoverMove, QEvent::InputMethod, QEvent::InputMethodQuery, QKeyEvent::isAutoRepeat(), QString::isEmpty(), QKeyEvent::key(), QEvent::KeyPress, QEvent::KeyRelease, QInputEvent::modifiers(), QKeyEvent::modifiers(), QEvent::MouseButtonDblClick, QEvent::MouseButtonPress, QEvent::MouseButtonRelease, Qt::MouseEventNotSynthesized, QEvent::MouseMove, QEvent::Move, QEvent::NativeGesture, QEvent::NonClientAreaMouseButtonDblClick, QEvent::NonClientAreaMouseButtonPress, QEvent::NonClientAreaMouseButtonRelease, QEvent::NonClientAreaMouseMove, QScrollEvent::overshootDistance(), QEvent::Paint, QEvent::PlatformSurface, pos, QMoveEvent::pos(), QSinglePointEvent::position(), position(), Q_FALLTHROUGH, qIsNull(), QEvent::Resize, QSinglePointEvent::scenePosition(), QEvent::Scroll, QEvent::ScrollPrepare, QScrollEvent::scrollState(), QEvent::Shortcut, QEvent::ShortcutOverride, QResizeEvent::size(), QEvent::spontaneous(), QPlatformSurfaceEvent::SurfaceAboutToBeDestroyed, QPlatformSurfaceEvent::SurfaceCreated, QPlatformSurfaceEvent::surfaceEventType(), QEvent::TabletEnterProximity, QEvent::TabletLeaveProximity, QEvent::TabletMove, QEvent::TabletPress, QEvent::TabletRelease, QKeyEvent::text(), QEvent::Timer, QEvent::TouchBegin, QEvent::TouchEnd, QEvent::TouchUpdate, QScrollPrepareEvent::viewportSize(), and QEvent::Wheel.

+ Here is the call graph for this function:

◆ operator<<() [2/4]

◆ operator<<() [3/4]

QDebug operator<< ( QDebug  dbg,
const QEventPoint tp 
)

Definition at line 3999 of file qevent.cpp.

References operator<<().

+ Here is the call graph for this function:

◆ operator<<() [4/4]

static QDebug operator<< ( QDebug  dbg,
const QInputMethodEvent::Attribute attr 
)
static

Definition at line 3771 of file qevent.cpp.

References QInputMethodEvent::Attribute::length, QInputMethodEvent::Attribute::start, QInputMethodEvent::Attribute::type, and QInputMethodEvent::Attribute::value.

Referenced by operator<<().

+ Here is the caller graph for this function:

◆ Q_IMPL_POINTER_EVENT()

Q_IMPL_POINTER_EVENT ( QPointerEvent  )

Variable Documentation

◆ QT_BEGIN_NAMESPACE

QT_BEGIN_NAMESPACE
related

Definition at line 49 of file qevent.cpp.