qjsmanagedvalue.sip 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. // qjsmanagedvalue.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. %If (Qt_6_1_0 -)
  22. class QJSManagedValue /NoDefaultCtors/
  23. {
  24. %TypeHeaderCode
  25. #include <qjsmanagedvalue.h>
  26. %End
  27. public:
  28. enum Type
  29. {
  30. Undefined,
  31. Boolean,
  32. Number,
  33. String,
  34. Object,
  35. Symbol,
  36. Function,
  37. };
  38. QJSManagedValue();
  39. QJSManagedValue(QJSValue value, QJSEngine *engine);
  40. QJSManagedValue(const QJSPrimitiveValue &value, QJSEngine *engine);
  41. QJSManagedValue(const QString &string, QJSEngine *engine);
  42. QJSManagedValue(const QVariant &variant, QJSEngine *engine);
  43. ~QJSManagedValue();
  44. bool equals(const QJSManagedValue &other) const;
  45. bool strictlyEquals(const QJSManagedValue &other) const;
  46. QJSEngine *engine() const;
  47. QJSManagedValue prototype() const;
  48. void setPrototype(const QJSManagedValue &prototype);
  49. QJSManagedValue::Type type() const;
  50. bool isUndefined() const;
  51. bool isBoolean() const;
  52. bool isNumber() const;
  53. bool isString() const;
  54. bool isObject() const;
  55. bool isSymbol() const;
  56. bool isFunction() const;
  57. bool isInteger() const;
  58. bool isNull() const;
  59. bool isRegularExpression() const;
  60. bool isArray() const;
  61. bool isUrl() const;
  62. bool isVariant() const;
  63. bool isQObject() const;
  64. bool isQMetaObject() const;
  65. bool isDate() const;
  66. bool isError() const;
  67. QString toString() const;
  68. double toNumber() const;
  69. bool toBoolean() const;
  70. QJSPrimitiveValue toPrimitive() const;
  71. QJSValue toJSValue() const;
  72. QVariant toVariant() const;
  73. int toInteger() const;
  74. QRegularExpression toRegularExpression() const;
  75. QUrl toUrl() const;
  76. QObject *toQObject() const;
  77. const QMetaObject *toQMetaObject() const;
  78. QDateTime toDateTime() const;
  79. bool hasProperty(const QString &name) const;
  80. bool hasOwnProperty(const QString &name) const;
  81. QJSValue property(const QString &name) const;
  82. void setProperty(const QString &name, const QJSValue &value);
  83. bool deleteProperty(const QString &name);
  84. bool hasProperty(quint32 arrayIndex) const;
  85. bool hasOwnProperty(quint32 arrayIndex) const;
  86. QJSValue property(quint32 arrayIndex) const;
  87. void setProperty(quint32 arrayIndex, const QJSValue &value);
  88. bool deleteProperty(quint32 arrayIndex);
  89. QJSValue call(const QJSValueList &arguments = {}) const;
  90. QJSValue callWithInstance(const QJSValue &instance, const QJSValueList &arguments = {}) const;
  91. QJSValue callAsConstructor(const QJSValueList &arguments = {}) const;
  92. };
  93. %End