qeventpoint.sip 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. // qeventpoint.sip generated by MetaSIP
  2. //
  3. // This file is part of the QtGui Python extension module.
  4. //
  5. // Copyright (c) 2026 Riverbank Computing Limited <info@riverbankcomputing.com>
  6. //
  7. // This file is part of PyQt6.
  8. //
  9. // This file may be used under the terms of the GNU General Public License
  10. // version 3.0 as published by the Free Software Foundation and appearing in
  11. // the file LICENSE included in the packaging of this file. Please review the
  12. // following information to ensure the GNU General Public License version 3.0
  13. // requirements will be met: http://www.gnu.org/copyleft/gpl.html.
  14. //
  15. // If you do not wish to use this file under the terms of the GPL version 3.0
  16. // then you may purchase a commercial license. For more information contact
  17. // info@riverbankcomputing.com.
  18. //
  19. // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
  20. // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  21. class QEventPoint
  22. {
  23. %TypeHeaderCode
  24. #include <qeventpoint.h>
  25. %End
  26. public:
  27. enum State /BaseType=Flag/
  28. {
  29. Unknown,
  30. Stationary,
  31. Pressed,
  32. Updated,
  33. Released,
  34. };
  35. typedef QFlags<QEventPoint::State> States;
  36. QEventPoint(int pointId, QEventPoint::State state, const QPointF &scenePosition, const QPointF &globalPosition);
  37. QEventPoint(const QEventPoint &other);
  38. bool operator==(const QEventPoint &other) const;
  39. bool operator!=(const QEventPoint &other) const;
  40. ~QEventPoint();
  41. void swap(QEventPoint &other /Constrained/);
  42. QPointF position() const;
  43. QPointF pressPosition() const;
  44. QPointF grabPosition() const;
  45. QPointF lastPosition() const;
  46. QPointF scenePosition() const;
  47. QPointF scenePressPosition() const;
  48. QPointF sceneGrabPosition() const;
  49. QPointF sceneLastPosition() const;
  50. QPointF globalPosition() const;
  51. QPointF globalPressPosition() const;
  52. QPointF globalGrabPosition() const;
  53. QPointF globalLastPosition() const;
  54. QPointF normalizedPosition() const;
  55. QVector2D velocity() const;
  56. QEventPoint::State state() const;
  57. const QPointingDevice *device() const;
  58. int id() const;
  59. QPointingDeviceUniqueId uniqueId() const;
  60. ulong timestamp() const;
  61. ulong lastTimestamp() const;
  62. ulong pressTimestamp() const;
  63. qreal timeHeld() const;
  64. qreal pressure() const;
  65. qreal rotation() const;
  66. QSizeF ellipseDiameters() const;
  67. bool isAccepted() const;
  68. void setAccepted(bool accepted = true);
  69. };