qjsprimitivevalue.sip 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. // qjsprimitivevalue.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. struct QJSPrimitiveUndefined
  23. {
  24. %TypeHeaderCode
  25. #include <qjsprimitivevalue.h>
  26. %End
  27. };
  28. %End
  29. %If (Qt_6_1_0 -)
  30. struct QJSPrimitiveNull
  31. {
  32. %TypeHeaderCode
  33. #include <qjsprimitivevalue.h>
  34. %End
  35. };
  36. %End
  37. %If (Qt_6_1_0 -)
  38. class QJSPrimitiveValue
  39. {
  40. %TypeHeaderCode
  41. #include <qjsprimitivevalue.h>
  42. %End
  43. public:
  44. enum Type : quint8
  45. {
  46. Undefined,
  47. Null,
  48. Boolean,
  49. Integer,
  50. Double,
  51. String,
  52. };
  53. QJSPrimitiveValue();
  54. QJSPrimitiveValue(QJSPrimitiveUndefined undefined);
  55. QJSPrimitiveValue(QJSPrimitiveNull null);
  56. QJSPrimitiveValue(bool value /Constrained/);
  57. QJSPrimitiveValue(int value /Constrained/);
  58. QJSPrimitiveValue(double value /Constrained/);
  59. QJSPrimitiveValue(QString string);
  60. QJSPrimitiveValue::Type type() const;
  61. bool toBoolean() const;
  62. int toInteger() const;
  63. double toDouble() const;
  64. QString toString() const;
  65. bool strictlyEquals(const QJSPrimitiveValue &other) const;
  66. bool equals(const QJSPrimitiveValue &other) const;
  67. %If (Qt_6_2_0 -)
  68. QJSPrimitiveValue operator+();
  69. %End
  70. %If (Qt_6_2_0 -)
  71. QJSPrimitiveValue operator-();
  72. %End
  73. %If (Qt_6_6_0 -)
  74. QMetaType metaType() const;
  75. %End
  76. %If (Qt_6_6_0 -)
  77. void *data();
  78. %End
  79. };
  80. %End
  81. %If (Qt_6_1_0 -)
  82. QJSPrimitiveValue operator+(const QJSPrimitiveValue &lhs, const QJSPrimitiveValue &rhs);
  83. %End
  84. %If (Qt_6_1_0 -)
  85. QJSPrimitiveValue operator-(const QJSPrimitiveValue &lhs, const QJSPrimitiveValue &rhs);
  86. %End
  87. %If (Qt_6_1_0 -)
  88. QJSPrimitiveValue operator*(const QJSPrimitiveValue &lhs, const QJSPrimitiveValue &rhs);
  89. %End
  90. %If (Qt_6_1_0 -)
  91. QJSPrimitiveValue operator/(const QJSPrimitiveValue &lhs, const QJSPrimitiveValue &rhs);
  92. %End
  93. %If (Qt_6_1_0 -)
  94. QJSPrimitiveValue operator%(const QJSPrimitiveValue &lhs, const QJSPrimitiveValue &rhs);
  95. %End
  96. %If (Qt_6_1_0 -)
  97. bool operator==(const QJSPrimitiveValue &lhs, const QJSPrimitiveValue &rhs);
  98. %End
  99. %If (Qt_6_1_0 -)
  100. bool operator!=(const QJSPrimitiveValue &lhs, const QJSPrimitiveValue &rhs);
  101. %End
  102. %If (Qt_6_1_0 -)
  103. bool operator<(const QJSPrimitiveValue &lhs, const QJSPrimitiveValue &rhs);
  104. %End
  105. %If (Qt_6_1_0 -)
  106. bool operator>(const QJSPrimitiveValue &lhs, const QJSPrimitiveValue &rhs);
  107. %End
  108. %If (Qt_6_1_0 -)
  109. bool operator<=(const QJSPrimitiveValue &lhs, const QJSPrimitiveValue &rhs);
  110. %End
  111. %If (Qt_6_1_0 -)
  112. bool operator>=(const QJSPrimitiveValue &lhs, const QJSPrimitiveValue &rhs);
  113. %End