44 #ifndef QT_NO_QWS_MOUSE_LINUXTP 50 #include <private/qcore_unix_p.h> 55 #include <sys/ioctl.h> 56 #include <sys/types.h> 64 #if defined(QT_QWS_IPAQ) 65 #define QT_QWS_IPAQ_RAW 66 #define QT_QWS_SCREEN_COORDINATES 68 unsigned short pressure;
73 #elif defined(QT_QWS_EBX) 74 #define QT_QWS_EBX_RAW 75 #define QT_QWS_SCREEN_COORDINATES 78 unsigned short pressure;
90 #define QT_QWS_TP_SAMPLE_SIZE 10 91 #define QT_QWS_TP_MINIMUM_SAMPLES 4 92 #define QT_QWS_TP_PRESSURE_THRESHOLD 500 93 #define QT_QWS_TP_MOVE_LIMIT 50 94 #define QT_QWS_TP_JITTER_LIMIT 2 96 #else // not IPAQ, not SHARP 105 #ifndef QT_QWS_TP_SAMPLE_SIZE 106 #define QT_QWS_TP_SAMPLE_SIZE 5 109 #ifndef QT_QWS_TP_MINIMUM_SAMPLES 110 #define QT_QWS_TP_MINIMUM_SAMPLES 5 113 #ifndef QT_QWS_TP_PRESSURE_THRESHOLD 114 #define QT_QWS_TP_PRESSURE_THRESHOLD 1 117 #ifndef QT_QWS_TP_MOVE_LIMIT 118 #define QT_QWS_TP_MOVE_LIMIT 100 121 #ifndef QT_QWS_TP_JITTER_LIMIT 122 #define QT_QWS_TP_JITTER_LIMIT 2 135 static const int mouseBufSize = 2048;
182 #if defined(QT_QWS_IPAQ) 183 # ifdef QT_QWS_IPAQ_RAW 269 mousePos = totalMousePos / (sampleCount - 1);
270 #if defined(QT_QWS_SCREEN_COORDINATES) 276 int dxSqr = dp.
x() * dp.
x();
277 int dySqr = dp.
y() * dp.
y();
326 for (
int i = 0; i < surplus; i++)
333 #include "qmouselinuxtp_qws.moc" 335 #endif //QT_NO_QWS_MOUSE_LINUXTP QPoint transform(const QPoint &)
Transforms the given position from device coordinates to screen coordinates, and returns the transfor...
Q_GUI_EXPORT QScreen * qt_screen
QWSLinuxTPMouseHandler * handler
Q_DECL_CONSTEXPR const T & qMin(const T &a, const T &b)
#define QT_END_NAMESPACE
This macro expands to.
QWSLinuxTPMouseHandler(const QString &=QString(), const QString &=QString())
int count(const T &t) const
Returns the number of occurrences of value in the vector.
The QWSCalibratedMouseHandler class provides mouse calibration and noise reduction in Qt for Embedded...
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
#define QT_QWS_TP_PRESSURE_THRESHOLD
void resume()
Implement this function to resume reading and handling mouse events, e.
The QPolygon class provides a vector of points using integer precision.
The QString class provides a Unicode character string.
void mouseChanged(const QPoint &pos, int bstate, int wheel=0)
Notifies the system of a new mouse event.
The QObject class is the base class of all Qt objects.
The QSocketNotifier class provides support for monitoring activity on a file descriptor.
static const int mouseBufSize
#define QT_BEGIN_NAMESPACE
This macro expands to.
QWSLinuxTPMouseHandlerPrivate(QWSLinuxTPMouseHandler *h, const QString &)
static bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
Creates a connection of the given type from the signal in the sender object to the method in the rece...
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
~QWSLinuxTPMouseHandler()
Q_CORE_EXPORT void qWarning(const char *,...)
static const char * data(const QByteArray &arr)
#define QT_QWS_TP_MOVE_LIMIT
QSocketNotifier * mouseNotifier
QByteArray toLatin1() const Q_REQUIRED_RESULT
Returns a Latin-1 representation of the string as a QByteArray.
~QWSLinuxTPMouseHandlerPrivate()
const char * constData() const
Returns a pointer to the data stored in the byte array.
#define QT_QWS_TP_SAMPLE_SIZE
#define QT_QWS_TP_MINIMUM_SAMPLES
The QPoint class defines a point in the plane using integer precision.
void setEnabled(bool)
If enable is true, the notifier is enabled; otherwise the notifier is disabled.
QWSLinuxTPMouseHandlerPrivate * d
uchar mouseBuf[mouseBufSize]
int y() const
Returns the y coordinate of this point.
int x() const
Returns the x coordinate of this point.
QImageIOHandler * handler
void suspend()
Implement this function to suspend reading and handling of mouse events, e.
#define qPrintable(string)
#define QT_QWS_TP_JITTER_LIMIT
friend class QWSLinuxTPMouseHandlerPrivate