summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/kernel')
-rw-r--r--src/gui/kernel/qevent.cpp75
-rw-r--r--src/gui/kernel/qevent.h80
2 files changed, 18 insertions, 137 deletions
diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp
index edb602407a..2f7d5c56c6 100644
--- a/src/gui/kernel/qevent.cpp
+++ b/src/gui/kernel/qevent.cpp
@@ -2368,52 +2368,6 @@ QTabletEvent::QTabletEvent(Type type, const QPointF &pos, const QPointF &globalP
{
}
-#if QT_DEPRECATED_SINCE(5, 15)
-/*!
- Construct a tablet event of the given \a type.
-
- The \a pos parameter indicates where the event occurred in the
- widget; \a globalPos is the corresponding position in absolute
- coordinates.
-
- \a pressure contains the pressure exerted on the \a device.
-
- \a pointerType describes the type of pen that is being used.
-
- \a xTilt and \a yTilt contain the device's degree of tilt from the
- x and y axes respectively.
-
- \a keyState specifies which keyboard modifiers are pressed (e.g.,
- \uicontrol{Ctrl}).
-
- The \a uniqueID parameter contains the unique ID for the current device.
-
- The \a z parameter contains the coordinate of the device on the tablet, this
- is usually given by a wheel on 4D mouse. If the device does not support a
- Z-axis, pass zero here.
-
- The \a tangentialPressure parameter contins the tangential pressure of an air
- brush. If the device does not support tangential pressure, pass 0 here.
-
- \a rotation contains the device's rotation in degrees. 4D mice support
- rotation. If the device does not support rotation, pass 0 here.
-
- \sa pos(), globalPos(), device(), pressure(), xTilt(), yTilt(), uniqueId(), rotation(),
- tangentialPressure(), z()
-
- \deprecated in 5.4: use the constructor with MouseButton status
-*/
-
-QTabletEvent::QTabletEvent(Type type, const QPointF &pos, const QPointF &globalPos,
- int device, int pointerType,
- qreal pressure, int xTilt, int yTilt, qreal tangentialPressure,
- qreal rotation, int z, Qt::KeyboardModifiers keyState, qint64 uniqueID)
- : QTabletEvent(type, pos, globalPos, device, pointerType, pressure, xTilt, yTilt,
- tangentialPressure, rotation, z, keyState, uniqueID, Qt::NoButton, Qt::NoButton)
-{
-}
-#endif
-
/*!
\internal
*/
@@ -2451,12 +2405,6 @@ Qt::MouseButtons QTabletEvent::buttons() const
}
/*!
- \fn TabletDevices QTabletEvent::device() const
-
- \deprecated Use deviceType().
-*/
-
-/*!
\fn TabletDevices QTabletEvent::deviceType() const
Returns the type of device that generated the event.
@@ -2584,7 +2532,7 @@ Qt::MouseButtons QTabletEvent::buttons() const
Returns the global x position of the mouse pointer at the time of
the event.
- \sa globalY(), globalPos(), hiResGlobalX()
+ \sa globalY(), globalPos()
*/
/*!
@@ -2593,7 +2541,7 @@ Qt::MouseButtons QTabletEvent::buttons() const
Returns the global y position of the tablet device at the time of
the event.
- \sa globalX(), globalPos(), hiResGlobalY()
+ \sa globalX(), globalPos()
*/
/*!
@@ -2620,22 +2568,6 @@ Qt::MouseButtons QTabletEvent::buttons() const
*/
/*!
- \fn qreal &QTabletEvent::hiResGlobalX() const
-
- The high precision x position of the tablet device.
-
- \obsolete use globalPosF()
-*/
-
-/*!
- \fn qreal &QTabletEvent::hiResGlobalY() const
-
- The high precision y position of the tablet device.
-
- \obsolete use globalPosF()
-*/
-
-/*!
\fn const QPointF &QTabletEvent::posF() const
Returns the position of the device, relative to the widget that
@@ -5018,9 +4950,8 @@ void QTouchEvent::TouchPoint::setFlags(InfoFlags flags)
The \a startPos is the position of a touch or mouse event that started the scrolling.
*/
QScrollPrepareEvent::QScrollPrepareEvent(const QPointF &startPos)
- : QEvent(QEvent::ScrollPrepare), m_target(nullptr), m_startPos(startPos)
+ : QEvent(QEvent::ScrollPrepare), m_startPos(startPos)
{
- Q_UNUSED(m_target);
}
/*!
diff --git a/src/gui/kernel/qevent.h b/src/gui/kernel/qevent.h
index 87ec8e7bee..7d2d6dbdcc 100644
--- a/src/gui/kernel/qevent.h
+++ b/src/gui/kernel/qevent.h
@@ -41,31 +41,31 @@
#define QEVENT_H
#include <QtGui/qtguiglobal.h>
-#include <QtGui/qwindowdefs.h>
-#include <QtGui/qregion.h>
+
+#include <QtCore/qcoreevent.h>
+#include <QtCore/qiodevice.h>
#include <QtCore/qnamespace.h>
#include <QtCore/qstring.h>
-#if QT_CONFIG(shortcut)
-# include <QtGui/qkeysequence.h>
-#endif
-#include <QtCore/qcoreevent.h>
#include <QtCore/qvariant.h>
-#include <QtCore/qmap.h> // ### Qt 6: Remove
#include <QtCore/qvector.h>
-#include <QtCore/qset.h> // ### Qt 6: Remove
#include <QtCore/qurl.h>
-#include <QtCore/qfile.h> // ### Qt 6: Replace by <QtCore/qiodevice.h> and forward declare QFile
+#include <QtGui/qregion.h>
#include <QtGui/qvector2d.h>
-#include <QtGui/qtouchdevice.h> // ### Qt 6: Replace by forward declaration
+#include <QtGui/qwindowdefs.h>
-QT_BEGIN_NAMESPACE
+#if QT_CONFIG(shortcut)
+# include <QtGui/qkeysequence.h>
+#endif
+QT_BEGIN_NAMESPACE
+class QFile;
class QGuiAction;
-#ifndef QT_NO_GESTURES
+class QScreen;
+class QTouchDevice;
+#if QT_CONFIG(gestures)
class QGesture;
#endif
-class QScreen;
class Q_GUI_EXPORT QInputEvent : public QEvent
{
@@ -136,10 +136,6 @@ public:
inline void setLocalPos(const QPointF &localPosition) { l = localPosition; }
-#if QT_DEPRECATED_SINCE(5, 0)
- QT_DEPRECATED inline QPointF posF() const { return l; }
-#endif
-
Qt::MouseEventSource source() const;
Qt::MouseEventFlags flags() const;
@@ -281,14 +277,6 @@ public:
enum PointerType { UnknownPointer, Pen, Cursor, Eraser };
Q_ENUM(PointerType)
-#if QT_DEPRECATED_SINCE(5, 15)
- // Actually deprecated since 5.4, in docs
- QT_DEPRECATED_VERSION_X_5_15("Use the other QTabletEvent constructor")
- QTabletEvent(Type t, const QPointF &pos, const QPointF &globalPos,
- int device, int pointerType, qreal pressure, int xTilt, int yTilt,
- qreal tangentialPressure, qreal rotation, int z,
- Qt::KeyboardModifiers keyState, qint64 uniqueID); // ### remove in Qt 6
-#endif
QTabletEvent(Type t, const QPointF &pos, const QPointF &globalPos,
int device, int pointerType, qreal pressure, int xTilt, int yTilt,
qreal tangentialPressure, qreal rotation, int z,
@@ -298,9 +286,6 @@ public:
inline QPoint pos() const { return mPos.toPoint(); }
inline QPoint globalPos() const { return mGPos.toPoint(); }
-#if QT_DEPRECATED_SINCE(5,0)
- QT_DEPRECATED inline const QPointF &hiResGlobalPos() const { return mPos; }
-#endif
inline const QPointF &posF() const { return mPos; }
inline const QPointF &globalPosF() const { return mGPos; }
@@ -309,14 +294,6 @@ public:
inline int y() const { return qRound(mPos.y()); }
inline int globalX() const { return qRound(mGPos.x()); }
inline int globalY() const { return qRound(mGPos.y()); }
-#if QT_DEPRECATED_SINCE(5, 15)
- QT_DEPRECATED_VERSION_X_5_15("use globalPosF().x()")
- inline qreal hiResGlobalX() const { return mGPos.x(); }
- QT_DEPRECATED_VERSION_X_5_15("use globalPosF().y()")
- inline qreal hiResGlobalY() const { return mGPos.y(); }
- QT_DEPRECATED_VERSION_X_5_15("Use deviceType()")
- inline TabletDevice device() const { return TabletDevice(mDev); }
-#endif
inline TabletDevice deviceType() const { return TabletDevice(mDev); }
inline PointerType pointerType() const { return PointerType(mPointerType); }
inline qint64 uniqueId() const { return mUnique; }
@@ -341,7 +318,7 @@ protected:
};
#endif // QT_CONFIG(tabletevent)
-#ifndef QT_NO_GESTURES
+#if QT_CONFIG(gestures)
class Q_GUI_EXPORT QNativeGestureEvent : public QInputEvent
{
public:
@@ -375,7 +352,7 @@ protected:
quint64 mIntValue;
const QTouchDevice *mDevice;
};
-#endif // QT_NO_GESTURES
+#endif // QT_CONFIG(gestures)
class Q_GUI_EXPORT QKeyEvent : public QInputEvent
{
@@ -400,22 +377,6 @@ public:
inline quint32 nativeVirtualKey() const { return nVirtualKey; }
inline quint32 nativeModifiers() const { return nModifiers; }
- // Functions for the extended key event information
-#if QT_DEPRECATED_SINCE(5, 0)
- static inline QKeyEvent *createExtendedKeyEvent(Type type, int key, Qt::KeyboardModifiers modifiers,
- quint32 nativeScanCode, quint32 nativeVirtualKey,
- quint32 nativeModifiers,
- const QString& text = QString(), bool autorep = false,
- ushort count = 1)
- {
- return new QKeyEvent(type, key, modifiers,
- nativeScanCode, nativeVirtualKey, nativeModifiers,
- text, autorep, count);
- }
-
- inline bool hasExtendedInfo() const { return true; }
-#endif
-
protected:
QString txt;
int k;
@@ -976,13 +937,6 @@ public:
friend class QQuickMultiPointTouchArea;
};
-#if QT_DEPRECATED_SINCE(5, 0)
- enum DeviceType {
- TouchScreen,
- TouchPad
- };
-#endif
-
explicit QTouchEvent(QEvent::Type eventType,
QTouchDevice *device = nullptr,
Qt::KeyboardModifiers modifiers = Qt::NoModifier,
@@ -992,9 +946,6 @@ public:
inline QWindow *window() const { return _window; }
inline QObject *target() const { return _target; }
-#if QT_DEPRECATED_SINCE(5, 0)
- QT_DEPRECATED inline QTouchEvent::DeviceType deviceType() const { return static_cast<DeviceType>(int(_device->type())); }
-#endif
inline Qt::TouchPointStates touchPointStates() const { return _touchPointStates; }
inline const QList<QTouchEvent::TouchPoint> &touchPoints() const { return _touchPoints; }
inline QTouchDevice *device() const { return _device; }
@@ -1045,7 +996,6 @@ public:
void setContentPos(const QPointF &pos);
private:
- QObject* m_target; // Qt 6 remove.
QPointF m_startPos;
QSizeF m_viewportSize;
QRectF m_contentPosRange;