File indexing completed on 2024-10-27 04:39:08

0001 // SPDX-License-Identifier: GPL-2.0-or-later
0002 // SPDX-FileCopyrightText: 2018 Kevin Ottens <ervin@kde.org>
0003 
0004 /*
0005  * Adapted by Louis Schul <schul9louis@gmail.com>
0006  * in 2023 for Klevernotes
0007  */
0008 
0009 #pragma once
0010 
0011 #include "stroke.h"
0012 
0013 class QTabletEvent;
0014 
0015 class Event
0016 {
0017     Q_GADGET
0018     Q_PROPERTY(float x MEMBER x)
0019     Q_PROPERTY(float y MEMBER y)
0020     Q_PROPERTY(float pressure MEMBER pressure)
0021 public:
0022     float x = 0.0f;
0023     float y = 0.0f;
0024     float pressure = 0.0f;
0025 };
0026 
0027 class TabletEvent : Event
0028 {
0029 public:
0030     static Event create(QTabletEvent *event);
0031 };
0032 
0033 class MouseEvent : Event
0034 {
0035 public:
0036     static Event create(const float x, const float y);
0037 };