qinputdevice.sip 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. // qinputdevice.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 QInputDevice : public QObject
  22. {
  23. %TypeHeaderCode
  24. #include <qinputdevice.h>
  25. %End
  26. public:
  27. enum class DeviceType /BaseType=Flag/
  28. {
  29. Unknown,
  30. Mouse,
  31. TouchScreen,
  32. TouchPad,
  33. Puck,
  34. Stylus,
  35. Airbrush,
  36. Keyboard,
  37. AllDevices,
  38. };
  39. typedef QFlags<QInputDevice::DeviceType> DeviceTypes;
  40. enum class Capability /BaseType=Flag/
  41. {
  42. None,
  43. Position,
  44. Area,
  45. Pressure,
  46. Velocity,
  47. NormalizedPosition,
  48. MouseEmulation,
  49. %If (Qt_6_2_0 -)
  50. PixelScroll,
  51. %End
  52. Scroll,
  53. Hover,
  54. Rotation,
  55. XTilt,
  56. YTilt,
  57. TangentialPressure,
  58. ZPosition,
  59. All,
  60. };
  61. typedef QFlags<QInputDevice::Capability> Capabilities;
  62. QInputDevice(const QString &name, qint64 systemId, QInputDevice::DeviceType type, const QString &seatName = QString(), QObject *parent /TransferThis/ = 0);
  63. QInputDevice(QObject *parent /TransferThis/ = 0);
  64. virtual ~QInputDevice();
  65. QString name() const;
  66. QInputDevice::DeviceType type() const;
  67. QInputDevice::Capabilities capabilities() const;
  68. bool hasCapability(QInputDevice::Capability cap) const;
  69. qint64 systemId() const;
  70. QString seatName() const;
  71. QRect availableVirtualGeometry() const;
  72. static QList<const QInputDevice *> devices();
  73. static const QInputDevice *primaryKeyboard(const QString &seatName = QString());
  74. bool operator==(const QInputDevice &other) const;
  75. signals:
  76. void availableVirtualGeometryChanged(QRect area);
  77. %If (Qt_6_9_0 -)
  78. void capabilitiesChanged(QInputDevice::Capabilities capabilities);
  79. %End
  80. public:
  81. %If (Qt_6_3_0 -)
  82. static QStringList seatNames();
  83. %End
  84. };