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.cpp File Reference

(14610fb1749a22abbd203f42e3edb3f4425cb215)

#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 "qpointer.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
const GLubyte * c
size_t quintptr
Definition qtypes.h:167

Definition at line 34 of file qevent.cpp.

Function Documentation

◆ eventClassName()

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

Definition at line 3836 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 3781 of file qevent.cpp.

References QInputMethodEvent::attributes(), QSet< T >::cbegin(), QInputMethodEvent::commitString(), d, formatUnicodeString(), QString::isEmpty(), it, QInputMethodEvent::preeditString(), QInputMethodEvent::replacementLength(), and QInputMethodEvent::replacementStart().

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 3810 of file qevent.cpp.

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

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 3753 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 3763 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 4043 of file qevent.cpp.

References QEvent::ApplicationStateChange, button, QEvent::ChildAdded, QEvent::ChildPolished, QEvent::ChildRemoved, QScrollEvent::contentPos(), QEvent::ContextMenu, QEvent::DragEnter, QEvent::DragMove, QEvent::Drop, QEvent::Enter, eventClassName(), QEvent::Expose, QEvent::FocusAboutToChange, QEvent::FocusIn, QEvent::FocusOut, formatInputMethodEvent(), formatInputMethodQueryEvent(), QtDebugUtils::formatNonNullQFlags(), QtDebugUtils::formatQEnum(), QtDebugUtils::formatQFlags(), QtDebugUtils::formatQPoint(), QtDebugUtils::formatQSize(), formatTouchEvent(), QEvent::HoverEnter, QEvent::HoverLeave, QEvent::HoverMove, QEvent::InputMethod, QEvent::InputMethodQuery, QEvent::KeyPress, QEvent::KeyRelease, QEvent::MouseButtonDblClick, QEvent::MouseButtonPress, QEvent::MouseButtonRelease, Qt::MouseEventNotSynthesized, QEvent::MouseMove, QEvent::Move, QEvent::NativeGesture, QEvent::NonClientAreaMouseButtonDblClick, QEvent::NonClientAreaMouseButtonPress, QEvent::NonClientAreaMouseButtonRelease, QEvent::NonClientAreaMouseMove, QEvent::Paint, QEvent::PlatformSurface, pos, QMoveEvent::pos(), position(), Q_FALLTHROUGH, qIsNull(), QEvent::Resize, QEvent::Scroll, QEvent::ScrollPrepare, QEvent::Shortcut, QEvent::ShortcutOverride, QEvent::spontaneous(), QPlatformSurfaceEvent::SurfaceAboutToBeDestroyed, QPlatformSurfaceEvent::SurfaceCreated, QPlatformSurfaceEvent::surfaceEventType(), QEvent::TabletEnterProximity, QEvent::TabletLeaveProximity, QEvent::TabletMove, QEvent::TabletPress, QEvent::TabletRelease, QEvent::Timer, QEvent::TouchBegin, QEvent::TouchEnd, QEvent::TouchUpdate, QEvent::type(), 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 4002 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 3774 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 52 of file qevent.cpp.