18#include <QtGui/private/qtguiglobal_p.h>
19#include <QtCore/qurl.h>
20#include <QtGui/qevent.h>
21#include <QtGui/qwindow.h>
28
29
30
31
32
33
34
35
36
37
38
39
40template <
typename Event>
43 Q_DISABLE_COPY_MOVE(QEventStorage)
44 static_assert(std::is_base_of_v<QEvent, Event>);
49 bool m_engaged =
false;
51 void engage(
const Event &e)
54 new (&m_event) Event(e);
78 explicit operator bool()
const noexcept {
return m_engaged; }
79 bool operator!()
const noexcept {
return !m_engaged; }
91 if (m_engaged && &e == &m_event)
124 QMutableTouchEvent(QEvent::Type eventType = QEvent::TouchBegin,
125 const QPointingDevice *device =
nullptr,
126 Qt::KeyboardModifiers modifiers = Qt::NoModifier,
127 const QList<QEventPoint> &touchPoints = QList<QEventPoint>()) :
128 QTouchEvent(eventType, device, modifiers, touchPoints) { }
129 ~QMutableTouchEvent() override;
131 void setTarget(QObject *target) { m_target = target; }
132 void addPoint(
const QEventPoint &point);
134 static void setTarget(QTouchEvent *e, QObject *target) { e->m_target = target; }
135 static void addPoint(QTouchEvent *e,
const QEventPoint &point);
141 QMutableSinglePointEvent(
const QSinglePointEvent &other) : QSinglePointEvent(other) {}
142 QMutableSinglePointEvent(Type type = QEvent::None,
const QPointingDevice *device =
nullptr,
const QEventPoint &point = QEventPoint(),
143 Qt::MouseButton button = Qt::NoButton, Qt::MouseButtons buttons = Qt::NoButton,
144 Qt::KeyboardModifiers modifiers = Qt::NoModifier,
145 Qt::MouseEventSource source = Qt::MouseEventSynthesizedByQt) :
146 QSinglePointEvent(type, device, point, button, buttons, modifiers, source) { }
147 ~QMutableSinglePointEvent() override;
149 void setSource(Qt::MouseEventSource s) { m_source = s; }
151 bool isDoubleClick() {
return m_doubleClick; }
153 void setDoubleClick(
bool d =
true) { m_doubleClick = d; }
155 static bool isDoubleClick(
const QSinglePointEvent *ev)
157 return ev->m_doubleClick;
160 static void setDoubleClick(QSinglePointEvent *ev,
bool d)
162 ev->m_doubleClick = d;
The QCloseEvent class contains parameters that describe a close event.
bool operator!() const noexcept
Event & storeUnlessAlias(const Event &e)
const Event * operator->() const
Event & store(const Event &e)
operator bool() const noexcept
QEventStorage(const Event &e)
const Event & operator*() const
The QExposeEvent class contains event parameters for expose events. \inmodule QtGui.
The QFileOpenEvent class provides an event that will be sent when there is a request to open a file o...
The QFocusEvent class contains event parameters for widget focus events.
The QHelpEvent class provides an event that is used to request helpful information about a particular...
The QHideEvent class provides an event which is sent after a widget is hidden.
The QIconDragEvent class indicates that a main icon drag has begun.
The QKeyEvent class describes a key event.
The QMoveEvent class contains event parameters for move events.
The QPaintEvent class contains event parameters for paint events.
The QResizeEvent class contains event parameters for resize events.
The QShowEvent class provides an event that is sent when a widget is shown.
A base class for pointer events containing a single point, such as mouse events.
The QStatusTipEvent class provides an event that is used to show messages in a status bar.
QDebug operator<<(QDebug dbg, const NSObject *nsObject)
static void formatInputMethodQueryEvent(QDebug d, const QInputMethodQueryEvent *e)
static void formatInputMethodEvent(QDebug d, const QInputMethodEvent *e)
#define Q_IMPL_POINTER_EVENT(Class)
static void formatUnicodeString(QDebug d, const QString &s)
static const char * eventClassName(QEvent::Type t)
static QDebug operator<<(QDebug dbg, const QInputMethodEvent::Attribute &attr)
static void formatTouchEvent(QDebug d, const QTouchEvent &t)
QDebug operator<<(QDebug dbg, const QFileInfo &fi)