File indexing completed on 2024-04-14 04:02:25

0001 /*
0002     This file is part of the KDE games lskat program
0003     SPDX-FileCopyrightText: 2006 Martin Heni <kde@heni-online.de>
0004 
0005     SPDX-License-Identifier: LGPL-2.0-or-later
0006 */
0007 
0008 #ifndef MOUSE_INPUT_H
0009 #define MOUSE_INPUT_H
0010 
0011 // Qt includes
0012 #include <QPoint>
0013 
0014 // KF includes
0015 
0016 // Local includes
0017 #include "abstractinput.h"
0018 #include "lskat_debug.h"
0019 
0020 /**
0021  * Mouse input device
0022  */
0023 class MouseInput : public AbstractInput
0024 {
0025     Q_OBJECT
0026 
0027 public:
0028     /**
0029      * Constructor for the input
0030      * @param parent The parent object
0031      */
0032     explicit MouseInput(QObject *parent);
0033 
0034     /**
0035      * Retrieve the type of device.
0036      * @return The device type.
0037      */
0038     InputDevice::InputDeviceType type() override {return InputDevice::TypeMouseInput;}
0039 
0040 public Q_SLOTS:
0041     /**
0042      * Received a mouse press event
0043      * @param point The position [screen coordinates]
0044      */
0045     void mousePress(const QPoint &point);
0046 
0047 Q_SIGNALS:
0048     /**
0049      * Convert mouse coordinate.
0050      * @param mouse The mouse position [screen coordinates]
0051      * @param playerNumber The player number [0-1]
0052      * @param cardNumber   The card number [0-7]
0053      */
0054     void signalConvertMousePress(QPoint mouse, int &playerNumber, int &cardNumber);
0055 };
0056 
0057 #endif