qqmlproperty.sip 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. // qqmlproperty.sip generated by MetaSIP
  2. //
  3. // This file is part of the QtQml 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 QQmlProperty
  22. {
  23. %TypeHeaderCode
  24. #include <qqmlproperty.h>
  25. %End
  26. public:
  27. enum PropertyTypeCategory
  28. {
  29. InvalidCategory,
  30. List,
  31. Object,
  32. Normal,
  33. };
  34. enum Type
  35. {
  36. Invalid,
  37. Property,
  38. SignalProperty,
  39. };
  40. QQmlProperty();
  41. QQmlProperty(QObject *);
  42. QQmlProperty(QObject *, QQmlContext *);
  43. QQmlProperty(QObject *, QQmlEngine *);
  44. QQmlProperty(QObject *, const QString &);
  45. QQmlProperty(QObject *, const QString &, QQmlContext *);
  46. QQmlProperty(QObject *, const QString &, QQmlEngine *);
  47. QQmlProperty(const QQmlProperty &);
  48. ~QQmlProperty();
  49. Py_hash_t __hash__() const;
  50. %MethodCode
  51. sipRes = qHash(*sipCpp);
  52. %End
  53. bool operator==(const QQmlProperty &) const;
  54. QQmlProperty::Type type() const;
  55. bool isValid() const;
  56. bool isProperty() const;
  57. bool isSignalProperty() const;
  58. %If (Qt_6_2_0 -)
  59. bool isBindable() const;
  60. %End
  61. int propertyType() const;
  62. QQmlProperty::PropertyTypeCategory propertyTypeCategory() const;
  63. const char *propertyTypeName() const;
  64. %If (Qt_6_1_0 -)
  65. QMetaType propertyMetaType() const;
  66. %End
  67. QString name() const;
  68. QVariant read() const;
  69. static QVariant read(const QObject *, const QString &);
  70. static QVariant read(const QObject *, const QString &, QQmlContext *);
  71. static QVariant read(const QObject *, const QString &, QQmlEngine *);
  72. bool write(const QVariant &) const;
  73. static bool write(QObject *, const QString &, const QVariant &);
  74. static bool write(QObject *, const QString &, const QVariant &, QQmlContext *);
  75. static bool write(QObject *, const QString &, const QVariant &, QQmlEngine *);
  76. bool reset() const;
  77. bool hasNotifySignal() const;
  78. bool needsNotifySignal() const;
  79. bool connectNotifySignal(SIP_PYOBJECT slot /TypeHint="PYQT_SLOT"/) const;
  80. %MethodCode
  81. QObject *receiver;
  82. QByteArray slot;
  83. if ((sipError = pyqt6_qtqml_get_connection_parts(a0, 0, "()", false, &receiver, slot)) == sipErrorNone)
  84. {
  85. sipRes = sipCpp->connectNotifySignal(receiver, slot.constData());
  86. }
  87. else if (sipError == sipErrorContinue)
  88. {
  89. sipError = sipBadCallableArg(0, a0);
  90. }
  91. %End
  92. bool connectNotifySignal(QObject *dest, int method) const;
  93. bool isWritable() const;
  94. bool isDesignable() const;
  95. bool isResettable() const;
  96. QObject *object() const;
  97. int index() const;
  98. QMetaProperty property() const;
  99. QMetaMethod method() const;
  100. %If (Qt_6_3_0 -)
  101. void swap(QQmlProperty &other /Constrained/);
  102. %End
  103. };
  104. typedef QList<QQmlProperty> QQmlProperties;
  105. %ModuleHeaderCode
  106. // Imports from QtCore.
  107. typedef sipErrorState (*pyqt6_qtqml_get_connection_parts_t)(PyObject *, QObject *, const char *, bool, QObject **, QByteArray &);
  108. extern pyqt6_qtqml_get_connection_parts_t pyqt6_qtqml_get_connection_parts;
  109. %End
  110. %ModuleCode
  111. // Imports from QtCore.
  112. pyqt6_qtqml_get_connection_parts_t pyqt6_qtqml_get_connection_parts;
  113. %End
  114. %PostInitialisationCode
  115. // Imports from QtCore.
  116. pyqt6_qtqml_get_connection_parts = (pyqt6_qtqml_get_connection_parts_t)sipImportSymbol("pyqt6_get_connection_parts");
  117. Q_ASSERT(pyqt6_qtqml_get_connection_parts);
  118. %End