qversionnumber.sip 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. // qversionnumber.sip generated by MetaSIP
  2. //
  3. // This file is part of the QtCore 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 QVersionNumber
  22. {
  23. %TypeHeaderCode
  24. #include <qversionnumber.h>
  25. %End
  26. public:
  27. QVersionNumber();
  28. explicit QVersionNumber(const QList<int> &seg);
  29. explicit QVersionNumber(int maj);
  30. QVersionNumber(int maj, int min);
  31. QVersionNumber(int maj, int min, int mic);
  32. bool isNull() const;
  33. bool isNormalized() const;
  34. int majorVersion() const;
  35. int minorVersion() const;
  36. int microVersion() const;
  37. QVersionNumber normalized() const;
  38. QList<int> segments() const;
  39. %If (Qt_6_4_0 -)
  40. int segmentAt(qsizetype index) const;
  41. %End
  42. %If (- Qt_6_4_0)
  43. int segmentAt(int index) const;
  44. %End
  45. %If (Qt_6_4_0 -)
  46. qsizetype segmentCount() const;
  47. %End
  48. %If (- Qt_6_4_0)
  49. int segmentCount() const;
  50. %End
  51. bool isPrefixOf(const QVersionNumber &other) const;
  52. static int compare(const QVersionNumber &v1, const QVersionNumber &v2);
  53. static QVersionNumber commonPrefix(const QVersionNumber &v1, const QVersionNumber &v2);
  54. QString toString() const;
  55. %If (Qt_6_4_0 -)
  56. static QVersionNumber fromString(QAnyStringView string, qsizetype *suffixIndex = 0);
  57. %End
  58. %If (- Qt_6_4_0)
  59. static QVersionNumber fromString(const QString &string, int *suffixIndex = 0);
  60. %End
  61. Py_hash_t __hash__() const;
  62. %MethodCode
  63. sipRes = qHash(*sipCpp);
  64. %End
  65. };
  66. bool operator>(const QVersionNumber &lhs, const QVersionNumber &rhs);
  67. bool operator>=(const QVersionNumber &lhs, const QVersionNumber &rhs);
  68. bool operator<(const QVersionNumber &lhs, const QVersionNumber &rhs);
  69. bool operator<=(const QVersionNumber &lhs, const QVersionNumber &rhs);
  70. bool operator==(const QVersionNumber &lhs, const QVersionNumber &rhs);
  71. bool operator!=(const QVersionNumber &lhs, const QVersionNumber &rhs);
  72. QDataStream &operator<<(QDataStream &out, const QVersionNumber &version) /ReleaseGIL/;
  73. QDataStream &operator>>(QDataStream &in, QVersionNumber &version /Constrained/) /ReleaseGIL/;
  74. %If (- Qt_6_7_0)
  75. class QTypeRevision
  76. {
  77. %TypeHeaderCode
  78. #include <qversionnumber.h>
  79. %End
  80. public:
  81. QTypeRevision();
  82. bool hasMajorVersion() const;
  83. quint8 majorVersion() const;
  84. bool hasMinorVersion() const;
  85. quint8 minorVersion() const;
  86. bool isValid() const;
  87. unsigned short toEncodedVersion() const;
  88. %MethodCode
  89. sipRes = sipCpp->toEncodedVersion<unsigned short>();
  90. %End
  91. Py_hash_t __hash__() const;
  92. %MethodCode
  93. sipRes = qHash(*sipCpp);
  94. %End
  95. static QTypeRevision fromEncodedVersion(int value);
  96. static QTypeRevision zero();
  97. };
  98. %End
  99. %If (- Qt_6_7_0)
  100. bool operator>(QTypeRevision lhs, QTypeRevision rhs);
  101. %End
  102. %If (- Qt_6_7_0)
  103. bool operator>=(QTypeRevision lhs, QTypeRevision rhs);
  104. %End
  105. %If (- Qt_6_7_0)
  106. bool operator<(QTypeRevision lhs, QTypeRevision rhs);
  107. %End
  108. %If (- Qt_6_7_0)
  109. bool operator<=(QTypeRevision lhs, QTypeRevision rhs);
  110. %End
  111. %If (- Qt_6_7_0)
  112. bool operator==(QTypeRevision lhs, QTypeRevision rhs);
  113. %End
  114. %If (- Qt_6_7_0)
  115. bool operator!=(QTypeRevision lhs, QTypeRevision rhs);
  116. %End
  117. %If (- Qt_6_7_0)
  118. QDataStream &operator<<(QDataStream &out, const QTypeRevision &revision) /ReleaseGIL/;
  119. %End
  120. %If (- Qt_6_7_0)
  121. QDataStream &operator>>(QDataStream &in, QTypeRevision &revision /Constrained/) /ReleaseGIL/;
  122. %End