Convert features.tabletevent to QT_CONFIG
Change-Id: Ibd7ed7f269a64afddadee70979b20f1c58398378 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
This commit is contained in:
parent
5ede5706a8
commit
7f62c5fedc
2
src/3rdparty/wintab/qt_attribution.json
vendored
2
src/3rdparty/wintab/qt_attribution.json
vendored
@ -2,7 +2,7 @@
|
||||
"Id": "wintab",
|
||||
"Name": "Wintab API",
|
||||
"QDocModule": "qtgui",
|
||||
"QtUsage": "Used in the Qt platform plugin for Windows. Configure with -DQT_NO_TABLETEVENT to avoid.",
|
||||
"QtUsage": "Used in the Qt platform plugin for Windows. Configure with -no-feature-tabletevent to avoid.",
|
||||
|
||||
"Description": "Wintab is a de facto API for pointing devices on Windows.",
|
||||
"Homepage": "http://www.pointing.com/Wintab.html",
|
||||
|
@ -2264,7 +2264,7 @@ QVariant QInputMethodQueryEvent::value(Qt::InputMethodQuery query) const
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
#ifndef QT_NO_TABLETEVENT
|
||||
#if QT_CONFIG(tabletevent)
|
||||
|
||||
/*!
|
||||
\class QTabletEvent
|
||||
@ -2706,7 +2706,7 @@ Qt::MouseButtons QTabletEvent::buttons() const
|
||||
\sa posF()
|
||||
*/
|
||||
|
||||
#endif // QT_NO_TABLETEVENT
|
||||
#endif // QT_CONFIG(tabletevent)
|
||||
|
||||
#ifndef QT_NO_GESTURES
|
||||
/*!
|
||||
@ -3856,7 +3856,7 @@ static void formatDropEvent(QDebug d, const QDropEvent *e)
|
||||
|
||||
# endif // !QT_NO_DRAGANDDROP
|
||||
|
||||
# ifndef QT_NO_TABLETEVENT
|
||||
# if QT_CONFIG(tabletevent)
|
||||
|
||||
static void formatTabletEvent(QDebug d, const QTabletEvent *e)
|
||||
{
|
||||
@ -3883,7 +3883,7 @@ static void formatTabletEvent(QDebug d, const QTabletEvent *e)
|
||||
d << ", tangentialPressure=" << e->tangentialPressure();
|
||||
}
|
||||
|
||||
# endif // !QT_NO_TABLETEVENT
|
||||
# endif // QT_CONFIG(tabletevent)
|
||||
|
||||
QDebug operator<<(QDebug dbg, const QTouchEvent::TouchPoint &tp)
|
||||
{
|
||||
@ -4063,7 +4063,7 @@ QDebug operator<<(QDebug dbg, const QEvent *e)
|
||||
dbg << "QContextMenuEvent(" << static_cast<const QContextMenuEvent *>(e)->pos() << ')';
|
||||
break;
|
||||
# endif // !QT_NO_CONTEXTMENU
|
||||
# ifndef QT_NO_TABLETEVENT
|
||||
# if QT_CONFIG(tabletevent)
|
||||
case QEvent::TabletEnterProximity:
|
||||
case QEvent::TabletLeaveProximity:
|
||||
case QEvent::TabletPress:
|
||||
@ -4071,7 +4071,7 @@ QDebug operator<<(QDebug dbg, const QEvent *e)
|
||||
case QEvent::TabletRelease:
|
||||
formatTabletEvent(dbg, static_cast<const QTabletEvent *>(e));
|
||||
break;
|
||||
# endif // !QT_NO_TABLETEVENT
|
||||
# endif // QT_CONFIG(tabletevent)
|
||||
case QEvent::Enter:
|
||||
dbg << "QEnterEvent(" << static_cast<const QEnterEvent *>(e)->pos() << ')';
|
||||
break;
|
||||
|
@ -237,7 +237,7 @@ protected:
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifndef QT_NO_TABLETEVENT
|
||||
#if QT_CONFIG(tabletevent)
|
||||
class Q_GUI_EXPORT QTabletEvent : public QInputEvent
|
||||
{
|
||||
Q_GADGET
|
||||
@ -295,7 +295,7 @@ protected:
|
||||
// ### Qt 6: QPointingEvent will have Buttons, QTabletEvent will inherit
|
||||
void *mExtra;
|
||||
};
|
||||
#endif // QT_NO_TABLETEVENT
|
||||
#endif // QT_CONFIG(tabletevent)
|
||||
|
||||
#ifndef QT_NO_GESTURES
|
||||
class Q_GUI_EXPORT QNativeGestureEvent : public QInputEvent
|
||||
|
@ -94,7 +94,7 @@ public:
|
||||
QVector<QPointF> rawScreenPositions;
|
||||
};
|
||||
|
||||
#ifndef QT_NO_TABLETEVENT
|
||||
#if QT_CONFIG(tabletevent)
|
||||
class QTabletEventPrivate
|
||||
{
|
||||
public:
|
||||
@ -106,7 +106,7 @@ public:
|
||||
Qt::MouseButton b;
|
||||
Qt::MouseButtons buttonState;
|
||||
};
|
||||
#endif // QT_NO_TABLETEVENT
|
||||
#endif // QT_CONFIG(tabletevent)
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
|
@ -2302,7 +2302,7 @@ QGuiApplicationPrivate::TabletPointData &QGuiApplicationPrivate::tabletDevicePoi
|
||||
|
||||
void QGuiApplicationPrivate::processTabletEvent(QWindowSystemInterfacePrivate::TabletEvent *e)
|
||||
{
|
||||
#ifndef QT_NO_TABLETEVENT
|
||||
#if QT_CONFIG(tabletevent)
|
||||
TabletPointData &pointData = tabletDevicePoint(e->uid);
|
||||
|
||||
QEvent::Type type = QEvent::TabletMove;
|
||||
@ -2369,7 +2369,7 @@ void QGuiApplicationPrivate::processTabletEvent(QWindowSystemInterfacePrivate::T
|
||||
|
||||
void QGuiApplicationPrivate::processTabletEnterProximityEvent(QWindowSystemInterfacePrivate::TabletEnterProximityEvent *e)
|
||||
{
|
||||
#ifndef QT_NO_TABLETEVENT
|
||||
#if QT_CONFIG(tabletevent)
|
||||
QTabletEvent ev(QEvent::TabletEnterProximity, QPointF(), QPointF(),
|
||||
e->device, e->pointerType, 0, 0, 0,
|
||||
0, 0, 0,
|
||||
@ -2383,7 +2383,7 @@ void QGuiApplicationPrivate::processTabletEnterProximityEvent(QWindowSystemInter
|
||||
|
||||
void QGuiApplicationPrivate::processTabletLeaveProximityEvent(QWindowSystemInterfacePrivate::TabletLeaveProximityEvent *e)
|
||||
{
|
||||
#ifndef QT_NO_TABLETEVENT
|
||||
#if QT_CONFIG(tabletevent)
|
||||
QTabletEvent ev(QEvent::TabletLeaveProximity, QPointF(), QPointF(),
|
||||
e->device, e->pointerType, 0, 0, 0,
|
||||
0, 0, 0,
|
||||
|
@ -2254,7 +2254,7 @@ bool QWindow::event(QEvent *ev)
|
||||
break;
|
||||
}
|
||||
|
||||
#ifndef QT_NO_TABLETEVENT
|
||||
#if QT_CONFIG(tabletevent)
|
||||
case QEvent::TabletPress:
|
||||
case QEvent::TabletMove:
|
||||
case QEvent::TabletRelease:
|
||||
@ -2436,7 +2436,7 @@ void QWindow::touchEvent(QTouchEvent *ev)
|
||||
ev->ignore();
|
||||
}
|
||||
|
||||
#ifndef QT_NO_TABLETEVENT
|
||||
#if QT_CONFIG(tabletevent)
|
||||
/*!
|
||||
Override this to handle tablet press, move, and release events (\a ev).
|
||||
|
||||
|
@ -75,7 +75,7 @@ class QMouseEvent;
|
||||
class QWheelEvent;
|
||||
#endif
|
||||
class QTouchEvent;
|
||||
#ifndef QT_NO_TABLETEVENT
|
||||
#if QT_CONFIG(tabletevent)
|
||||
class QTabletEvent;
|
||||
#endif
|
||||
|
||||
@ -348,7 +348,7 @@ protected:
|
||||
virtual void wheelEvent(QWheelEvent *);
|
||||
#endif
|
||||
virtual void touchEvent(QTouchEvent *);
|
||||
#ifndef QT_NO_TABLETEVENT
|
||||
#if QT_CONFIG(tabletevent)
|
||||
virtual void tabletEvent(QTabletEvent *);
|
||||
#endif
|
||||
virtual bool nativeEvent(const QByteArray &eventType, void *message, long *result);
|
||||
|
@ -38,6 +38,8 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include <QtGui/qtguiglobal.h>
|
||||
|
||||
#include "androidjniinput.h"
|
||||
#include "androidjnimain.h"
|
||||
#include "qandroidplatformintegration.h"
|
||||
@ -292,17 +294,17 @@ namespace QtAndroidInput
|
||||
|
||||
static bool isTabletEventSupported(JNIEnv */*env*/, jobject /*thiz*/)
|
||||
{
|
||||
#ifdef QT_NO_TABLETEVENT
|
||||
return false;
|
||||
#else
|
||||
#if QT_CONFIG(tabletevent)
|
||||
return true;
|
||||
#endif // QT_NO_TABLETEVENT
|
||||
#else
|
||||
return false;
|
||||
#endif // QT_CONFIG(tabletevent)
|
||||
}
|
||||
|
||||
static void tabletEvent(JNIEnv */*env*/, jobject /*thiz*/, jint /*winId*/, jint deviceId, jlong time, jint action,
|
||||
jint pointerType, jint buttonState, jfloat x, jfloat y, jfloat pressure)
|
||||
{
|
||||
#ifndef QT_NO_TABLETEVENT
|
||||
#if QT_CONFIG(tabletevent)
|
||||
QPointF globalPosF(x, y);
|
||||
QPoint globalPos((int)x, (int)y);
|
||||
QWindow *tlw = topLevelWindowAt(globalPos);
|
||||
@ -344,7 +346,7 @@ namespace QtAndroidInput
|
||||
QWindowSystemInterface::handleTabletEvent(tlw, ulong(time),
|
||||
localPos, globalPosF, QTabletEvent::Stylus, pointerType,
|
||||
buttons, pressure, 0, 0, 0., 0., 0, deviceId, Qt::NoModifier);
|
||||
#endif // QT_NO_TABLETEVENT
|
||||
#endif // QT_CONFIG(tabletevent)
|
||||
}
|
||||
|
||||
static int mapAndroidKey(int key)
|
||||
|
@ -59,6 +59,7 @@
|
||||
#include "qwindowsscreen.h"
|
||||
#include "qwindowstheme.h"
|
||||
|
||||
#include <QtGui/qtguiglobal.h>
|
||||
#include <QtGui/QWindow>
|
||||
#include <qpa/qwindowsysteminterface.h>
|
||||
#include <qpa/qplatformnativeinterface.h>
|
||||
@ -1077,10 +1078,10 @@ bool QWindowsContext::windowsProc(HWND hwnd, UINT message,
|
||||
*result = LRESULT(MA_NOACTIVATE);
|
||||
return true;
|
||||
}
|
||||
#ifndef QT_NO_TABLETEVENT
|
||||
#if QT_CONFIG(tabletevent)
|
||||
if (!d->m_tabletSupport.isNull())
|
||||
d->m_tabletSupport->notifyActivate();
|
||||
#endif // !QT_NO_TABLETEVENT
|
||||
#endif // QT_CONFIG(tabletevent)
|
||||
if (platformWindow->testFlag(QWindowsWindow::BlockedByModal))
|
||||
if (const QWindow *modalWindow = QGuiApplication::modalWindow()) {
|
||||
QWindowsWindow *platformWindow = QWindowsWindow::windowsWindowOf(modalWindow);
|
||||
|
@ -39,8 +39,6 @@
|
||||
|
||||
#include "qwindowstabletsupport.h"
|
||||
|
||||
#ifndef QT_NO_TABLETEVENT
|
||||
|
||||
#include "qwindowscontext.h"
|
||||
#include "qwindowskeymapper.h"
|
||||
#include "qwindowswindow.h"
|
||||
@ -498,5 +496,3 @@ bool QWindowsTabletSupport::translateTabletPacketEvent()
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_TABLETEVENT
|
||||
|
@ -41,14 +41,15 @@
|
||||
#define QWINDOWSTABLETSUPPORT_H
|
||||
|
||||
#include "qtwindowsglobal.h"
|
||||
|
||||
#if !defined(QT_NO_TABLETEVENT)
|
||||
#include <QtGui/qtguiglobal.h>
|
||||
|
||||
#include <QtCore/QVector>
|
||||
#include <QtCore/QPointF>
|
||||
|
||||
#include <wintab.h>
|
||||
|
||||
QT_REQUIRE_CONFIG(tabletevent);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QDebug;
|
||||
@ -140,5 +141,4 @@ private:
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // !QT_NO_TABLETEVENT
|
||||
#endif // QWINDOWSTABLETSUPPORT_H
|
||||
|
@ -1626,11 +1626,11 @@ bool QXcbConnection::compressEvent(xcb_generic_event_t *event, int currentIndex,
|
||||
|
||||
// compress XI_Motion, but not from tablet devices
|
||||
if (isXIType(event, m_xiOpCode, XI_Motion)) {
|
||||
#ifndef QT_NO_TABLETEVENT
|
||||
#if QT_CONFIG(tabletevent)
|
||||
xXIDeviceEvent *xdev = reinterpret_cast<xXIDeviceEvent *>(event);
|
||||
if (const_cast<QXcbConnection *>(this)->tabletDataForDevice(xdev->sourceid))
|
||||
return false;
|
||||
#endif // QT_NO_TABLETEVENT
|
||||
#endif // QT_CONFIG(tabletevent)
|
||||
for (int j = nextIndex; j < eventqueue->size(); ++j) {
|
||||
xcb_generic_event_t *next = eventqueue->at(j);
|
||||
if (!isValid(next))
|
||||
|
@ -64,7 +64,7 @@
|
||||
#undef explicit
|
||||
#endif
|
||||
|
||||
#ifndef QT_NO_TABLETEVENT
|
||||
#if QT_CONFIG(tabletevent)
|
||||
#include <QTabletEvent>
|
||||
#endif
|
||||
|
||||
@ -565,7 +565,7 @@ private:
|
||||
#ifdef XCB_USE_XINPUT22
|
||||
void xi2ProcessTouch(void *xiDevEvent, QXcbWindow *platformWindow);
|
||||
#endif // XCB_USE_XINPUT22
|
||||
#ifndef QT_NO_TABLETEVENT
|
||||
#if QT_CONFIG(tabletevent)
|
||||
struct TabletData {
|
||||
int deviceId = 0;
|
||||
QTabletEvent::PointerType pointerType = QTabletEvent::UnknownPointer;
|
||||
@ -587,7 +587,7 @@ private:
|
||||
void xi2ReportTabletEvent(const void *event, TabletData *tabletData);
|
||||
QVector<TabletData> m_tabletData;
|
||||
TabletData *tabletDataForDevice(int id);
|
||||
#endif // !QT_NO_TABLETEVENT
|
||||
#endif // QT_CONFIG(tabletevent)
|
||||
struct ScrollingDevice {
|
||||
int deviceId = 0;
|
||||
int verticalIndex = 0;
|
||||
@ -695,7 +695,7 @@ private:
|
||||
friend class QXcbEventReader;
|
||||
};
|
||||
#ifdef XCB_USE_XINPUT2
|
||||
#ifndef QT_NO_TABLETEVENT
|
||||
#if QT_CONFIG(tabletevent)
|
||||
Q_DECLARE_TYPEINFO(QXcbConnection::TabletData::ValuatorClassInfo, Q_PRIMITIVE_TYPE);
|
||||
Q_DECLARE_TYPEINFO(QXcbConnection::TabletData, Q_MOVABLE_TYPE);
|
||||
#endif
|
||||
|
@ -100,7 +100,7 @@ void QXcbConnection::initializeXInput2()
|
||||
|
||||
void QXcbConnection::xi2SetupDevices()
|
||||
{
|
||||
#ifndef QT_NO_TABLETEVENT
|
||||
#if QT_CONFIG(tabletevent)
|
||||
m_tabletData.clear();
|
||||
#endif
|
||||
m_scrollingDevices.clear();
|
||||
@ -116,7 +116,7 @@ void QXcbConnection::xi2SetupDevices()
|
||||
if (devices[i].use != XISlavePointer)
|
||||
continue;
|
||||
qCDebug(lcQpaXInputDevices) << "input device " << devices[i].name << "ID" << devices[i].deviceid;
|
||||
#ifndef QT_NO_TABLETEVENT
|
||||
#if QT_CONFIG(tabletevent)
|
||||
TabletData tabletData;
|
||||
#endif
|
||||
ScrollingDevice scrollingDevice;
|
||||
@ -126,7 +126,7 @@ void QXcbConnection::xi2SetupDevices()
|
||||
XIValuatorClassInfo *vci = reinterpret_cast<XIValuatorClassInfo *>(devices[i].classes[c]);
|
||||
const int valuatorAtom = qatom(vci->label);
|
||||
qCDebug(lcQpaXInputDevices) << " has valuator" << atomName(vci->label) << "recognized?" << (valuatorAtom < QXcbAtom::NAtoms);
|
||||
#ifndef QT_NO_TABLETEVENT
|
||||
#if QT_CONFIG(tabletevent)
|
||||
if (valuatorAtom < QXcbAtom::NAtoms) {
|
||||
TabletData::ValuatorClassInfo info;
|
||||
info.minVal = vci->min;
|
||||
@ -134,7 +134,7 @@ void QXcbConnection::xi2SetupDevices()
|
||||
info.number = vci->number;
|
||||
tabletData.valuatorInfo[valuatorAtom] = info;
|
||||
}
|
||||
#endif // QT_NO_TABLETEVENT
|
||||
#endif // QT_CONFIG(tabletevent)
|
||||
if (valuatorAtom == QXcbAtom::RelHorizScroll || valuatorAtom == QXcbAtom::RelHorizWheel)
|
||||
scrollingDevice.lastScrollPosition.setX(vci->value);
|
||||
else if (valuatorAtom == QXcbAtom::RelVertScroll || valuatorAtom == QXcbAtom::RelVertWheel)
|
||||
@ -191,7 +191,7 @@ void QXcbConnection::xi2SetupDevices()
|
||||
}
|
||||
}
|
||||
bool isTablet = false;
|
||||
#ifndef QT_NO_TABLETEVENT
|
||||
#if QT_CONFIG(tabletevent)
|
||||
// If we have found the valuators which we expect a tablet to have, it might be a tablet.
|
||||
if (tabletData.valuatorInfo.contains(QXcbAtom::AbsX) &&
|
||||
tabletData.valuatorInfo.contains(QXcbAtom::AbsY) &&
|
||||
@ -241,7 +241,7 @@ void QXcbConnection::xi2SetupDevices()
|
||||
m_tabletData.append(tabletData);
|
||||
qCDebug(lcQpaXInputDevices) << " it's a tablet with pointer type" << dbgType;
|
||||
}
|
||||
#endif // QT_NO_TABLETEVENT
|
||||
#endif // QT_CONFIG(tabletevent)
|
||||
|
||||
#ifdef XCB_USE_XINPUT21
|
||||
if (scrollingDevice.orientations || scrollingDevice.legacyOrientations) {
|
||||
@ -330,7 +330,7 @@ void QXcbConnection::xi2Select(xcb_window_t window)
|
||||
#endif // XCB_USE_XINPUT22
|
||||
|
||||
QSet<int> tabletDevices;
|
||||
#ifndef QT_NO_TABLETEVENT
|
||||
#if QT_CONFIG(tabletevent)
|
||||
if (!m_tabletData.isEmpty()) {
|
||||
unsigned int tabletBitMask;
|
||||
unsigned char *xiTabletBitMask = reinterpret_cast<unsigned char *>(&tabletBitMask);
|
||||
@ -347,7 +347,7 @@ void QXcbConnection::xi2Select(xcb_window_t window)
|
||||
}
|
||||
XISelectEvents(xDisplay, window, xiEventMask.data(), m_tabletData.count());
|
||||
}
|
||||
#endif // QT_NO_TABLETEVENT
|
||||
#endif // QT_CONFIG(tabletevent)
|
||||
|
||||
#ifdef XCB_USE_XINPUT21
|
||||
// Enable each scroll device
|
||||
@ -482,12 +482,12 @@ XInput2TouchDeviceData *QXcbConnection::touchDeviceForId(int id)
|
||||
return dev;
|
||||
}
|
||||
|
||||
#if defined(XCB_USE_XINPUT21) || !defined(QT_NO_TABLETEVENT)
|
||||
#if defined(XCB_USE_XINPUT21) || QT_CONFIG(tabletevent)
|
||||
static inline qreal fixed1616ToReal(FP1616 val)
|
||||
{
|
||||
return qreal(val) / 0x10000;
|
||||
}
|
||||
#endif // defined(XCB_USE_XINPUT21) || !defined(QT_NO_TABLETEVENT)
|
||||
#endif // defined(XCB_USE_XINPUT21) || QT_CONFIG(tabletevent)
|
||||
|
||||
void QXcbConnection::xi2HandleEvent(xcb_ge_event_t *event)
|
||||
{
|
||||
@ -536,13 +536,13 @@ void QXcbConnection::xi2HandleEvent(xcb_ge_event_t *event)
|
||||
return;
|
||||
}
|
||||
|
||||
#ifndef QT_NO_TABLETEVENT
|
||||
#if QT_CONFIG(tabletevent)
|
||||
if (!xiEnterEvent) {
|
||||
QXcbConnection::TabletData *tablet = tabletDataForDevice(sourceDeviceId);
|
||||
if (tablet && xi2HandleTabletEvent(xiEvent, tablet))
|
||||
return;
|
||||
}
|
||||
#endif // QT_NO_TABLETEVENT
|
||||
#endif // QT_CONFIG(tabletevent)
|
||||
|
||||
#ifdef XCB_USE_XINPUT21
|
||||
QHash<int, ScrollingDevice>::iterator device = m_scrollingDevices.find(sourceDeviceId);
|
||||
@ -1240,6 +1240,6 @@ QXcbConnection::TabletData *QXcbConnection::tabletDataForDevice(int id)
|
||||
return Q_NULLPTR;
|
||||
}
|
||||
|
||||
#endif // QT_NO_TABLETEVENT
|
||||
#endif // QT_CONFIG(tabletevent)
|
||||
|
||||
#endif // XCB_USE_XINPUT2
|
||||
|
@ -2990,7 +2990,7 @@ bool QApplication::notify(QObject *receiver, QEvent *e)
|
||||
case QEvent::TouchBegin:
|
||||
case QEvent::TouchUpdate:
|
||||
case QEvent::TouchEnd:
|
||||
#ifndef QT_NO_TABLETEVENT
|
||||
#if QT_CONFIG(tabletevent)
|
||||
case QEvent::TabletMove:
|
||||
case QEvent::TabletPress:
|
||||
case QEvent::TabletRelease:
|
||||
@ -3349,7 +3349,7 @@ bool QApplication::notify(QObject *receiver, QEvent *e)
|
||||
}
|
||||
break;
|
||||
#endif // QT_NO_CONTEXTMENU
|
||||
#ifndef QT_NO_TABLETEVENT
|
||||
#if QT_CONFIG(tabletevent)
|
||||
case QEvent::TabletMove:
|
||||
case QEvent::TabletPress:
|
||||
case QEvent::TabletRelease:
|
||||
@ -3379,7 +3379,7 @@ bool QApplication::notify(QObject *receiver, QEvent *e)
|
||||
tablet->setAccepted(eventAccepted);
|
||||
}
|
||||
break;
|
||||
#endif // QT_NO_TABLETEVENT
|
||||
#endif // QT_CONFIG(tabletevent)
|
||||
|
||||
#if !defined(QT_NO_TOOLTIP) || !defined(QT_NO_WHATSTHIS)
|
||||
case QEvent::ToolTip:
|
||||
|
@ -8806,7 +8806,7 @@ bool QWidget::event(QEvent *event)
|
||||
wheelEvent((QWheelEvent*)event);
|
||||
break;
|
||||
#endif
|
||||
#ifndef QT_NO_TABLETEVENT
|
||||
#if QT_CONFIG(tabletevent)
|
||||
case QEvent::TabletMove:
|
||||
if (static_cast<QTabletEvent *>(event)->buttons() == Qt::NoButton && !testAttribute(Qt::WA_TabletTracking))
|
||||
break;
|
||||
@ -9439,7 +9439,7 @@ void QWidget::wheelEvent(QWheelEvent *event)
|
||||
}
|
||||
#endif // QT_CONFIG(wheelevent)
|
||||
|
||||
#ifndef QT_NO_TABLETEVENT
|
||||
#if QT_CONFIG(tabletevent)
|
||||
/*!
|
||||
This event handler, for event \a event, can be reimplemented in a
|
||||
subclass to receive tablet events for the widget.
|
||||
@ -9464,7 +9464,7 @@ void QWidget::tabletEvent(QTabletEvent *event)
|
||||
{
|
||||
event->ignore();
|
||||
}
|
||||
#endif // QT_NO_TABLETEVENT
|
||||
#endif // QT_CONFIG(tabletevent)
|
||||
|
||||
/*!
|
||||
This event handler, for event \a event, can be reimplemented in a
|
||||
|
@ -629,7 +629,7 @@ protected:
|
||||
#ifndef QT_NO_CONTEXTMENU
|
||||
virtual void contextMenuEvent(QContextMenuEvent *event);
|
||||
#endif
|
||||
#ifndef QT_NO_TABLETEVENT
|
||||
#if QT_CONFIG(tabletevent)
|
||||
virtual void tabletEvent(QTabletEvent *event);
|
||||
#endif
|
||||
#ifndef QT_NO_ACTION
|
||||
|
@ -299,7 +299,7 @@ bool QWidgetWindow::event(QEvent *event)
|
||||
}
|
||||
return true;
|
||||
|
||||
#ifndef QT_NO_TABLETEVENT
|
||||
#if QT_CONFIG(tabletevent)
|
||||
case QEvent::TabletPress:
|
||||
case QEvent::TabletMove:
|
||||
case QEvent::TabletRelease:
|
||||
@ -974,7 +974,7 @@ bool QWidgetWindow::nativeEvent(const QByteArray &eventType, void *message, long
|
||||
return m_widget->nativeEvent(eventType, message, result);
|
||||
}
|
||||
|
||||
#ifndef QT_NO_TABLETEVENT
|
||||
#if QT_CONFIG(tabletevent)
|
||||
void QWidgetWindow::handleTabletEvent(QTabletEvent *event)
|
||||
{
|
||||
static QPointer<QWidget> qt_tablet_target = 0;
|
||||
@ -1004,7 +1004,7 @@ void QWidgetWindow::handleTabletEvent(QTabletEvent *event)
|
||||
if (event->type() == QEvent::TabletRelease && event->buttons() == Qt::NoButton)
|
||||
qt_tablet_target = 0;
|
||||
}
|
||||
#endif // QT_NO_TABLETEVENT
|
||||
#endif // QT_CONFIG(tabletevent)
|
||||
|
||||
#ifndef QT_NO_GESTURES
|
||||
void QWidgetWindow::handleGestureEvent(QNativeGestureEvent *e)
|
||||
|
@ -100,7 +100,7 @@ protected:
|
||||
void handleExposeEvent(QExposeEvent *);
|
||||
void handleWindowStateChangedEvent(QWindowStateChangeEvent *event);
|
||||
bool nativeEvent(const QByteArray &eventType, void *message, long *result) Q_DECL_OVERRIDE;
|
||||
#ifndef QT_NO_TABLETEVENT
|
||||
#if QT_CONFIG(tabletevent)
|
||||
void handleTabletEvent(QTabletEvent *);
|
||||
#endif
|
||||
#ifndef QT_NO_GESTURES
|
||||
|
@ -183,12 +183,12 @@ static QEvent *cloneEvent(QEvent *e)
|
||||
return new QEvent(*e);
|
||||
case QEvent::Style:
|
||||
return new QEvent(*e);
|
||||
#ifndef QT_NO_TABLETEVENT
|
||||
#if QT_CONFIG(tabletevent)
|
||||
case QEvent::TabletMove:
|
||||
case QEvent::TabletPress:
|
||||
case QEvent::TabletRelease:
|
||||
return new QTabletEvent(*static_cast<QTabletEvent*>(e));
|
||||
#endif //QT_NO_TABLETEVENT
|
||||
#endif // QT_CONFIG(tabletevent)
|
||||
case QEvent::OkRequest:
|
||||
return new QEvent(*e);
|
||||
case QEvent::HelpRequest:
|
||||
@ -372,11 +372,11 @@ static QEvent *cloneEvent(QEvent *e)
|
||||
case QEvent::DynamicPropertyChange:
|
||||
return new QDynamicPropertyChangeEvent(*static_cast<QDynamicPropertyChangeEvent*>(e));
|
||||
|
||||
#ifndef QT_NO_TABLETEVENT
|
||||
#if QT_CONFIG(tabletevent)
|
||||
case QEvent::TabletEnterProximity:
|
||||
case QEvent::TabletLeaveProximity:
|
||||
return new QTabletEvent(*static_cast<QTabletEvent*>(e));
|
||||
#endif //QT_NO_TABLETEVENT
|
||||
#endif // QT_CONFIG(tabletevent)
|
||||
|
||||
case QEvent::NonClientAreaMouseMove:
|
||||
case QEvent::NonClientAreaMouseButtonPress:
|
||||
|
@ -1644,7 +1644,7 @@ void tst_QWindow::inputReentrancy()
|
||||
QCOMPARE(window.touchReleasedCount, 1);
|
||||
}
|
||||
|
||||
#ifndef QT_NO_TABLETEVENT
|
||||
#if QT_CONFIG(tabletevent)
|
||||
class TabletTestWindow : public QWindow
|
||||
{
|
||||
public:
|
||||
@ -1672,7 +1672,7 @@ public:
|
||||
|
||||
void tst_QWindow::tabletEvents()
|
||||
{
|
||||
#ifndef QT_NO_TABLETEVENT
|
||||
#if QT_CONFIG(tabletevent)
|
||||
TabletTestWindow window;
|
||||
window.setGeometry(QRect(m_availableTopLeft + QPoint(10, 10), m_testWindowSize));
|
||||
qGuiApp->installEventFilter(&window);
|
||||
|
Loading…
x
Reference in New Issue
Block a user