19#include <QtGui/private/qtguiglobal_p.h>
20#include <QtCore/qurl.h>
21#include <QtGui/qevent.h>
22#include <QtGui/qwindow.h>
29
30
31
32
33
34
35
36
37
38
39
40
41template <
typename Event>
44 Q_DISABLE_COPY_MOVE(QEventStorage)
45 static_assert(std::is_base_of_v<QEvent, Event>);
50 bool m_engaged =
false;
52 void engage(
const Event &e)
55 new (&m_event) Event(e);
79 explicit operator bool()
const noexcept {
return m_engaged; }
80 bool operator!()
const noexcept {
return !m_engaged; }
92 if (m_engaged && &e == &m_event)
125 QMutableTouchEvent(QEvent::Type eventType = QEvent::TouchBegin,
126 const QPointingDevice *device =
nullptr,
127 Qt::KeyboardModifiers modifiers = Qt::NoModifier,
128 const QList<QEventPoint> &touchPoints = QList<QEventPoint>()) :
129 QTouchEvent(eventType, device, modifiers, touchPoints) { }
130 ~QMutableTouchEvent() override;
132 void setTarget(QObject *target) { m_target = target; }
133 void addPoint(
const QEventPoint &point);
135 static void setTarget(QTouchEvent *e, QObject *target) { e->m_target = target; }
136 static void addPoint(QTouchEvent *e,
const QEventPoint &point);
142 QMutableSinglePointEvent(
const QSinglePointEvent &other) : QSinglePointEvent(other) {}
143 QMutableSinglePointEvent(Type type = QEvent::None,
const QPointingDevice *device =
nullptr,
const QEventPoint &point = QEventPoint(),
144 Qt::MouseButton button = Qt::NoButton, Qt::MouseButtons buttons = Qt::NoButton,
145 Qt::KeyboardModifiers modifiers = Qt::NoModifier,
146 Qt::MouseEventSource source = Qt::MouseEventSynthesizedByQt) :
147 QSinglePointEvent(type, device, point, button, buttons, modifiers, source) { }
148 ~QMutableSinglePointEvent() override;
150 void setSource(Qt::MouseEventSource s) { m_source = s; }
152 bool isDoubleClick() {
return m_doubleClick; }
154 void setDoubleClick(
bool d =
true) { m_doubleClick = d; }
156 static bool isDoubleClick(
const QSinglePointEvent *ev)
158 return ev->m_doubleClick;
161 static void setDoubleClick(QSinglePointEvent *ev,
bool d)
163 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.
Combined button and popup list for selecting options.
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)