summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/kernel')
-rw-r--r--src/gui/kernel/qevent.cpp56
-rw-r--r--src/gui/kernel/qguiapplication.cpp10
-rw-r--r--src/gui/kernel/qsessionmanager.cpp2
-rw-r--r--src/gui/kernel/qwindowsysteminterface.cpp16
-rw-r--r--src/gui/kernel/qwindowsysteminterface.h2
5 files changed, 83 insertions, 3 deletions
diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp
index adbaa5ff86..3873976144 100644
--- a/src/gui/kernel/qevent.cpp
+++ b/src/gui/kernel/qevent.cpp
@@ -83,6 +83,52 @@ QEnterEvent::~QEnterEvent()
}
/*!
+ \fn QPoint QEnterEvent::globalPos() const
+
+ Returns the global position of the widget \e{at the time of the event}.
+*/
+/*!
+ \fn int QEnterEvent::globalX() const
+
+ Returns the global position on the X-axis of the mouse cursor relative to the the widget.
+*/
+/*!
+ \fn int QEnterEvent::globalY() const
+
+ Returns the global position on the Y-axis of the mouse cursor relative to the the widget.
+*/
+/*!
+ \fn QPoint QEnterEvent::localPos() const
+
+ Returns the mouse cursor's position relative to the receiving widget.
+*/
+/*!
+ \fn QPoint QEnterEvent::pos() const
+
+ Returns the position of the mouse cursor in global screen coordinates.
+*/
+/*!
+ \fn QPoint QEnterEvent::screenPos() const
+
+ Returns the position of the mouse cursor relative to the receiving screen.
+*/
+/*!
+ \fn QPoint QEnterEvent::windowPos() const
+
+ Returns the position of the mouse cursor relative to the receiving window.
+*/
+/*!
+ \fn int QEnterEvent::x() const
+
+ Returns the x position of the mouse cursor relative to the receiving widget.
+*/
+/*!
+ \fn int QEnterEvent::y() const
+
+ Returns the y position of the mouse cursor relative to the receiving widget.
+*/
+
+/*!
\class QInputEvent
\ingroup events
\inmodule QtGui
@@ -4196,6 +4242,12 @@ QTouchEvent::~QTouchEvent()
\sa QTouchDevice::type(), QTouchEvent::device()
*/
+/*! \fn QTouchEvent::TouchPoint::TouchPoint(TouchPoint &&other)
+
+ Move-constructs a TouchPoint instance, making it point to the same
+ object that \a other was pointing to.
+*/
+
/*! \fn Qt::TouchPointStates QTouchEvent::touchPointStates() const
Returns a bitwise OR of all the touch point states for this event.
@@ -4723,6 +4775,10 @@ void QTouchEvent::TouchPoint::setFlags(InfoFlags flags)
*/
/*!
+ \fn TouchPoint &TouchPoint::operator=(TouchPoint &&other)
+ \internal
+ */
+/*!
\fn void QTouchEvent::TouchPoint::swap(TouchPoint &other);
\internal
*/
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp
index 54bd654ce5..f240153f9f 100644
--- a/src/gui/kernel/qguiapplication.cpp
+++ b/src/gui/kernel/qguiapplication.cpp
@@ -1898,8 +1898,14 @@ void QGuiApplicationPrivate::processKeyEvent(QWindowSystemInterfacePrivate::KeyE
#if !defined(Q_OS_OSX)
// On OS X the shortcut override is checked earlier, see: QWindowSystemInterface::handleKeyEvent()
const bool checkShortcut = e->keyType == QEvent::KeyPress && window != 0;
- if (checkShortcut && QWindowSystemInterface::tryHandleShortcutEvent(window, e->timestamp, e->key, e->modifiers, e->unicode, e->repeat, e->repeatCount))
- return;
+ if (checkShortcut) {
+ QKeyEvent override(QEvent::ShortcutOverride, e->key, e->modifiers,
+ e->nativeScanCode, e->nativeVirtualKey, e->nativeModifiers,
+ e->unicode, e->repeat, e->repeatCount);
+ override.setTimestamp(e->timestamp);
+ if (QWindowSystemInterface::tryHandleShortcutOverrideEvent(window, &override))
+ return;
+ }
#endif // Q_OS_OSX
QKeyEvent ev(e->keyType, e->key, e->modifiers,
diff --git a/src/gui/kernel/qsessionmanager.cpp b/src/gui/kernel/qsessionmanager.cpp
index b54b7b468c..f4b56fd01b 100644
--- a/src/gui/kernel/qsessionmanager.cpp
+++ b/src/gui/kernel/qsessionmanager.cpp
@@ -48,7 +48,7 @@ QT_BEGIN_NAMESPACE
\class QSessionManager
\brief The QSessionManager class provides access to the session manager.
- \inmodule QtWidgets
+ \inmodule QtGui
A session manager in a desktop environment (in which Qt GUI applications
live) keeps track of a session, which is a group of running applications,
diff --git a/src/gui/kernel/qwindowsysteminterface.cpp b/src/gui/kernel/qwindowsysteminterface.cpp
index 5877467830..3ab2f59661 100644
--- a/src/gui/kernel/qwindowsysteminterface.cpp
+++ b/src/gui/kernel/qwindowsysteminterface.cpp
@@ -227,6 +227,22 @@ bool QWindowSystemInterface::tryHandleShortcutEvent(QWindow *w, ulong timestamp,
#endif
}
+bool QWindowSystemInterface::tryHandleShortcutOverrideEvent(QWindow *w, QKeyEvent *ev)
+{
+#ifndef QT_NO_SHORTCUT
+ Q_ASSERT(ev->type() == QKeyEvent::ShortcutOverride);
+
+ QObject *focus = w->focusObject();
+ if (!focus)
+ focus = w;
+ return QGuiApplicationPrivate::instance()->shortcutMap.tryShortcutEvent(focus, ev);
+#else
+ Q_UNUSED(w)
+ Q_UNUSED(ev)
+ return false;
+#endif
+}
+
// used by QTestLib to directly send shortcuts to objects
bool QWindowSystemInterface::tryHandleShortcutEventToObject(QObject *o, ulong timestamp, int k, Qt::KeyboardModifiers mods,
const QString &text, bool autorep, ushort count)
diff --git a/src/gui/kernel/qwindowsysteminterface.h b/src/gui/kernel/qwindowsysteminterface.h
index 7ad491cdac..453dbe81cf 100644
--- a/src/gui/kernel/qwindowsysteminterface.h
+++ b/src/gui/kernel/qwindowsysteminterface.h
@@ -78,6 +78,8 @@ public:
Qt::KeyboardModifiers mods = Qt::NoModifier,
Qt::MouseEventSource source = Qt::MouseEventNotSynthesized);
+ static bool tryHandleShortcutOverrideEvent(QWindow *w, QKeyEvent *ev);
+
static bool tryHandleShortcutEvent(QWindow *w, int k, Qt::KeyboardModifiers mods,
const QString & text = QString(), bool autorep = false, ushort count = 1);
static bool tryHandleShortcutEvent(QWindow *w, ulong timestamp, int k, Qt::KeyboardModifiers mods,