qdrag.sip 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. // qdrag.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 QDrag : public QObject
  22. {
  23. %TypeHeaderCode
  24. #include <qdrag.h>
  25. %End
  26. public:
  27. explicit QDrag(QObject *dragSource /TransferThis/);
  28. virtual ~QDrag();
  29. Qt::DropAction exec(Qt::DropActions supportedActions = Qt::MoveAction) /ReleaseGIL/;
  30. Qt::DropAction exec(Qt::DropActions supportedActions, Qt::DropAction defaultDropAction) /ReleaseGIL/;
  31. void setMimeData(QMimeData *data /Transfer/);
  32. QMimeData *mimeData() const;
  33. void setPixmap(const QPixmap &);
  34. QPixmap pixmap() const;
  35. void setHotSpot(const QPoint &hotspot);
  36. QPoint hotSpot() const;
  37. QObject *source() const;
  38. QObject *target() const;
  39. void setDragCursor(const QPixmap &cursor, Qt::DropAction action);
  40. signals:
  41. void actionChanged(Qt::DropAction action);
  42. void targetChanged(QObject *newTarget);
  43. public:
  44. QPixmap dragCursor(Qt::DropAction action) const;
  45. Qt::DropActions supportedActions() const;
  46. Qt::DropAction defaultAction() const;
  47. %If (Android || Linux || WebAssembly || Windows)
  48. static void cancel();
  49. %End
  50. };