You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

56 lines
2.3 KiB

7 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. /***************************************************************************
  2. * Copyright (C) 2014 M Wellings *
  3. * info@openforeveryone.co.uk *
  4. * *
  5. * This program is free software; you can redistribute it and/or modify *
  6. * it under the terms of the GNU General Public License version 2 as *
  7. * published by the Free Software Foundation *
  8. * *
  9. * This program is distributed in the hope that it will be useful, *
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of *
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
  12. * GNU General Public License for more details. *
  13. * *
  14. * You should have received a copy of the GNU General Public License *
  15. * along with this program; if not, write to the *
  16. * Free Software Foundation, Inc., *
  17. * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
  18. ***************************************************************************/
  19. #ifndef QGAMECONTROLLER_P_H
  20. #define QGAMECONTROLLER_P_H
  21. #include <QtCore/QMap>
  22. #include "qgamecontroller.h"
  23. QT_BEGIN_NAMESPACE
  24. struct QGameControllerEventPrivate
  25. {
  26. Q_DECLARE_PUBLIC(QGameControllerEvent)
  27. QGameControllerEventPrivate(QGameControllerEvent *q) : q_ptr(q) { }
  28. QGameControllerEvent * const q_ptr;
  29. uint ControllerId;
  30. };
  31. struct QGameControllerButtonEventPrivate : public QGameControllerEventPrivate
  32. {
  33. Q_DECLARE_PUBLIC(QGameControllerButtonEvent)
  34. QGameControllerButtonEventPrivate(QGameControllerEvent *q) : QGameControllerEventPrivate(q) { }
  35. uint Button;
  36. bool Pressed;
  37. };
  38. struct QGameControllerAxisEventPrivate : public QGameControllerEventPrivate
  39. {
  40. Q_DECLARE_PUBLIC(QGameControllerAxisEvent)
  41. QGameControllerAxisEventPrivate(QGameControllerEvent *q) : QGameControllerEventPrivate(q) { }
  42. uint Axis;
  43. float Value;
  44. };
  45. QT_END_NAMESPACE
  46. #endif // QGAMECONTROLLER_P_H