6#include <QSocketNotifier>
9#include <QLoggingCategory>
11#include <qpa/qwindowsysteminterface.h>
26 m_rawMode(!
key.
compare("TslibRaw"_L1,
Qt::CaseInsensitive))
28 qCDebug(qLcTsLib) <<
"Initializing tslib plugin" <<
key << specification;
31 m_dev = ts_setup(
nullptr, 1);
37#ifdef TSLIB_VERSION_EVENTPATH
38 qCDebug(qLcTsLib) <<
"tslib device is" << ts_get_eventpath(m_dev);
50static bool get_sample(
struct tsdev *dev,
struct ts_sample *sample,
bool rawMode)
53 return (ts_read_raw(dev, sample, 1) == 1);
55 return (ts_read(dev, sample, 1) == 1);
58void QTsLibMouseHandler::readMouseData()
62 while (
get_sample(m_dev, &sample, m_rawMode)) {
63 bool pressed = sample.pressure;
68 if (sample.pressure == 0) {
77 if (dx*dx <= 4 && dy*dy <= 4 && pressed == m_pressed)
85 :
QEvent::MouseButtonRelease;
97#include "moc_qtslib_p.cpp"
Type
This enum type defines the valid event types in Qt.
\inmodule QtCore\reentrant
void activated(QSocketDescriptor socket, QSocketNotifier::Type activationEvent, QPrivateSignal)
\macro QT_RESTRICTED_CAST_FROM_ASCII
static bool handleMouseEvent(QWindow *window, const QPointF &local, const QPointF &global, Qt::MouseButtons state, Qt::MouseButton button, QEvent::Type type, Qt::KeyboardModifiers mods=Qt::NoModifier, Qt::MouseEventSource source=Qt::MouseEventNotSynthesized)
object setObjectName("A new object name")
void qErrnoWarning(const char *msg,...)
Combined button and popup list for selecting options.
#define Q_LOGGING_CATEGORY(name,...)
#define qCDebug(category,...)
GLint GLint GLint GLint GLint x
[0]
static int compare(quint64 a, quint64 b)
static bool get_sample(struct tsdev *dev, struct ts_sample *sample, bool rawMode)
connect(quitButton, &QPushButton::clicked, &app, &QCoreApplication::quit, Qt::QueuedConnection)