Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qwaylandmousetracker_p.h
Go to the documentation of this file.
1// Copyright (C) 2017 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4#ifndef QWAYLANDMOUSETRACKER_P_H
5#define QWAYLANDMOUSETRACKER_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtQuick/private/qquickmousearea_p.h>
19
20#include <QtWaylandCompositor/qtwaylandcompositorglobal.h>
21
23
25
26class Q_WAYLANDCOMPOSITOR_EXPORT QWaylandMouseTracker : public QQuickItem
27{
29 Q_DECLARE_PRIVATE(QWaylandMouseTracker)
30 Q_PROPERTY(qreal mouseX READ mouseX NOTIFY mouseXChanged)
31 Q_PROPERTY(qreal mouseY READ mouseY NOTIFY mouseYChanged)
32 Q_PROPERTY(bool containsMouse READ hovered NOTIFY hoveredChanged)
33
34 Q_PROPERTY(bool windowSystemCursorEnabled READ windowSystemCursorEnabled WRITE setWindowSystemCursorEnabled NOTIFY windowSystemCursorEnabledChanged)
35 QML_NAMED_ELEMENT(WaylandMouseTracker)
37public:
39
40 qreal mouseX() const;
41 qreal mouseY() const;
42
45 bool hovered() const;
46
52
53protected:
55 void mouseMoveEvent(QMouseEvent *event) override;
56 void hoverMoveEvent(QHoverEvent *event) override;
57 void hoverEnterEvent(QHoverEvent *event) override;
58 void hoverLeaveEvent(QHoverEvent *event) override;
59};
60
62
63#endif /*QWAYLANDMOUSETRACKER_P_H*/
\inmodule QtCore
Definition qcoreevent.h:45
\inmodule QtGui
Definition qevent.h:245
\inmodule QtGui
Definition qevent.h:195
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
Definition qquickitem.h:64
virtual void hoverEnterEvent(QHoverEvent *event)
This event handler can be reimplemented in a subclass to receive hover-enter events for an item.
virtual void hoverMoveEvent(QHoverEvent *event)
This event handler can be reimplemented in a subclass to receive hover-move events for an item.
virtual bool childMouseEventFilter(QQuickItem *, QEvent *)
Reimplement this method to filter the pointer events that are received by this item's children.
virtual void hoverLeaveEvent(QHoverEvent *event)
This event handler can be reimplemented in a subclass to receive hover-leave events for an item.
virtual void mouseMoveEvent(QMouseEvent *event)
This event handler can be reimplemented in a subclass to receive mouse move events for an item.
void windowSystemCursorEnabledChanged()
void setWindowSystemCursorEnabled(bool enable)
bool windowSystemCursorEnabled() const
Combined button and popup list for selecting options.
GLboolean enable
struct _cl_event * event
#define QML_NAMED_ELEMENT(NAME)
#define QML_ADDED_IN_VERSION(MAJOR, MINOR)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define signals
double qreal
Definition qtypes.h:92
QGraphicsItem * item
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent