7#include <QtCore/qnamespace.h>
8#include <QtCore/qbytearray.h>
9#include <QtCore/qobjectdefs.h>
13#define Q_EVENT_DISABLE_COPY(Class) \
15 Class(const Class &) = default; \
16 Class(Class &&) = delete; \
17 Class &operator=(const Class &other) = default; \
18 Class &operator=(Class &&) = delete
20#define Q_DECL_EVENT_COMMON(Class) \
22 Class(const Class &); \
23 Class(Class &&) = delete; \
24 Class &operator=(const Class &other) = default; \
25 Class &operator=(Class &&) = delete; \
27 Class* clone() const override; \
31#define Q_IMPL_EVENT_COMMON(Class) \
32 Class::Class(const Class &) = default; \
33 Class::~Class() = default; \
34 Class* Class::clone() const \
36 auto c = new Class(*this); \
37 [[maybe_unused]] QEvent *e = c; \
39 Q_ASSERT(reinterpret_cast<quintptr>(c) == reinterpret_cast<quintptr>(e)); \
47 QDOC_PROPERTY(
bool accepted READ isAccepted WRITE setAccepted)
61 MouseButtonRelease = 3,
62 MouseButtonDblClick = 4,
68 FocusAboutToChange = 23,
81 ParentAboutToChange = 131,
84 WindowDeactivate = 25,
88 WindowTitleChange = 33,
89 WindowIconChange = 34,
90 ApplicationWindowIconChange = 35,
91 ApplicationFontChange = 36,
92 ApplicationLayoutDirectionChange = 37,
93 ApplicationPaletteChange = 38,
109 ShowWindowRequest = 73,
116 EmbeddingControl = 79,
117 ActivateControl = 80,
118 DeactivateControl = 81,
124 LayoutDirectionChange = 90,
135 ActivationChange = 99,
137 IconTextChange = 101,
138 ModifiedChange = 102,
139 MouseTrackingChange = 109,
142 WindowUnblocked = 104,
143 WindowStateChange = 105,
145 ReadOnlyChange = 106,
158 ShortcutOverride = 51,
160 WhatsThisClicked = 118,
164 ApplicationActivate = 121,
165 ApplicationActivated = ApplicationActivate,
166 ApplicationDeactivate = 122,
167 ApplicationDeactivated = ApplicationDeactivate,
169 QueryWhatsThis = 123,
170 EnterWhatsThisMode = 124,
171 LeaveWhatsThisMode = 125,
181#ifdef QT_KEYPAD_NAVIGATION
182 EnterEditFocus = 150,
183 LeaveEditFocus = 151,
185 AcceptDropsChange = 152,
187 ZeroTimerEvent = 154,
189 GraphicsSceneMouseMove = 155,
190 GraphicsSceneMousePress = 156,
191 GraphicsSceneMouseRelease = 157,
192 GraphicsSceneMouseDoubleClick = 158,
193 GraphicsSceneContextMenu = 159,
194 GraphicsSceneHoverEnter = 160,
195 GraphicsSceneHoverMove = 161,
196 GraphicsSceneHoverLeave = 162,
197 GraphicsSceneHelp = 163,
198 GraphicsSceneDragEnter = 164,
199 GraphicsSceneDragMove = 165,
200 GraphicsSceneDragLeave = 166,
201 GraphicsSceneDrop = 167,
202 GraphicsSceneWheel = 168,
203 GraphicsSceneLeave = 220,
205 KeyboardLayoutChange = 169,
207 DynamicPropertyChange = 170,
209 TabletEnterProximity = 171,
210 TabletLeaveProximity = 172,
212 NonClientAreaMouseMove = 173,
213 NonClientAreaMouseButtonPress = 174,
214 NonClientAreaMouseButtonRelease = 175,
215 NonClientAreaMouseButtonDblClick = 176,
219 ContentsRectChange = 178,
221 MacGLWindowChange = 179,
225 GraphicsSceneResize = 181,
226 GraphicsSceneMove = 182,
231 NetworkReplyUpdated = 185,
236 UngrabKeyboard = 189,
238 StateMachineSignal = 192,
239 StateMachineWrapped = 193,
245#ifndef QT_NO_GESTURES
248 RequestSoftwareInputPanel = 199,
249 CloseSoftwareInputPanel = 200,
252#ifndef QT_NO_GESTURES
254 GestureOverride = 202,
261 InputMethodQuery = 207,
262 OrientationChange = 208,
272 StyleAnimationUpdate = 213,
273 ApplicationStateChange = 214,
275 WindowChangeInternal = 215,
276 ScreenChangeInternal = 216,
278 PlatformSurface = 217,
282 TabletTrackingChange = 219,
285 WindowAboutToChangeInternal = 221,
287 DevicePixelRatioChange = 222,
302 inline virtual void setAccepted(
bool accepted) { m_accept = accepted; }
305 inline void accept() { m_accept =
true; }
306 inline void ignore() { m_accept =
false; }
312 static int registerEventType(
int hint = -1) noexcept;
314 virtual
QEvent *clone() const;
337 bool m_posted =
false;
338 bool m_spont =
false;
339 bool m_accept =
true;
340 bool m_unused =
false;
344 quint16 m_singlePointEvent : 1;
355 void setSpontaneous() { m_spont =
true; }
The QApplication class manages the GUI application's control flow and main settings.
bool removed() const
Returns true if type() is QEvent::ChildRemoved; otherwise returns false.
bool added() const
Returns true if type() is QEvent::ChildAdded; otherwise returns false.
QObject * child() const
Returns the child object that was added or removed.
bool polished() const
Returns true if type() is QEvent::ChildPolished; otherwise returns false.
QByteArray propertyName() const
Returns the name of the dynamic property that was added, changed or removed.
QEvent(Type type, InputEventTag)
virtual void setAccepted(bool accepted)
bool isSinglePointEvent() const noexcept
bool spontaneous() const
Returns true if the event originated outside the application (a system event); otherwise returns fals...
QEvent(Type type, SinglePointEventTag)
Type type() const
Returns the event type.
void ignore()
Clears the accept flag parameter of the event object, the equivalent of calling setAccepted(false).
bool isPointerEvent() const noexcept
QEvent(Type type, PointerEventTag)
void accept()
Sets the accept flag of the event object, the equivalent of calling setAccepted(true).
bool isInputEvent() const noexcept
int timerId() const
Returns the unique timer identifier, which is the same identifier as returned from QObject::startTime...
Combined button and popup list for selecting options.
#define Q_EVENT_DISABLE_COPY(Class)
#define Q_DECL_EVENT_COMMON(Class)
static QT_BEGIN_NAMESPACE QVariant hint(QPlatformIntegration::StyleHint h)
PointerEventTag()=default
SinglePointEventTag()=default
virtual HRESULT STDMETHODCALLTYPE Close(void)=0
virtual HRESULT STDMETHODCALLTYPE Move(enum TextUnit unit, int count, __RPC__out int *pRetVal)=0