qdeadlinetimer.sip 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. // qdeadlinetimer.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 QDeadlineTimer
  22. {
  23. %TypeHeaderCode
  24. #include <qdeadlinetimer.h>
  25. %End
  26. public:
  27. %If (- Qt_6_6_0)
  28. enum ForeverConstant
  29. {
  30. Forever,
  31. };
  32. %End
  33. %If (Qt_6_6_0 -)
  34. enum class ForeverConstant
  35. {
  36. Forever,
  37. };
  38. %End
  39. // This was replaced in Qt v6.6 with two overloads but we need the optional keyword argument.
  40. QDeadlineTimer(Qt::TimerType type = Qt::CoarseTimer);
  41. QDeadlineTimer(QDeadlineTimer::ForeverConstant, Qt::TimerType type = Qt::CoarseTimer);
  42. QDeadlineTimer(qint64 msecs, Qt::TimerType type = Qt::CoarseTimer);
  43. void swap(QDeadlineTimer &other /Constrained/);
  44. bool isForever() const;
  45. bool hasExpired() const;
  46. Qt::TimerType timerType() const;
  47. void setTimerType(Qt::TimerType type);
  48. qint64 remainingTime() const;
  49. qint64 remainingTimeNSecs() const;
  50. void setRemainingTime(qint64 msecs, Qt::TimerType type = Qt::CoarseTimer);
  51. void setPreciseRemainingTime(qint64 secs, qint64 nsecs = 0, Qt::TimerType type = Qt::CoarseTimer);
  52. qint64 deadline() const;
  53. qint64 deadlineNSecs() const;
  54. void setDeadline(qint64 msecs, Qt::TimerType type = Qt::CoarseTimer);
  55. void setPreciseDeadline(qint64 secs, qint64 nsecs = 0, Qt::TimerType type = Qt::CoarseTimer);
  56. static QDeadlineTimer addNSecs(QDeadlineTimer dt, qint64 nsecs);
  57. static QDeadlineTimer current(Qt::TimerType type = Qt::CoarseTimer);
  58. QDeadlineTimer &operator+=(qint64 msecs);
  59. QDeadlineTimer &operator-=(qint64 msecs);
  60. };
  61. %If (Qt_6_8_0 -)
  62. bool operator==(const QDeadlineTimer &lhs, const QDeadlineTimer &rhs);
  63. %End
  64. %If (- Qt_6_8_0)
  65. bool operator==(QDeadlineTimer d1, QDeadlineTimer d2);
  66. %End
  67. %If (Qt_6_8_0 -)
  68. bool operator!=(const QDeadlineTimer &lhs, const QDeadlineTimer &rhs);
  69. %End
  70. %If (- Qt_6_8_0)
  71. bool operator!=(QDeadlineTimer d1, QDeadlineTimer d2);
  72. %End
  73. %If (Qt_6_8_0 -)
  74. bool operator<(const QDeadlineTimer &lhs, const QDeadlineTimer &rhs);
  75. %End
  76. %If (- Qt_6_8_0)
  77. bool operator<(QDeadlineTimer d1, QDeadlineTimer d2);
  78. %End
  79. %If (Qt_6_8_0 -)
  80. bool operator<=(const QDeadlineTimer &lhs, const QDeadlineTimer &rhs);
  81. %End
  82. %If (- Qt_6_8_0)
  83. bool operator<=(QDeadlineTimer d1, QDeadlineTimer d2);
  84. %End
  85. %If (Qt_6_8_0 -)
  86. bool operator>(const QDeadlineTimer &lhs, const QDeadlineTimer &rhs);
  87. %End
  88. %If (- Qt_6_8_0)
  89. bool operator>(QDeadlineTimer d1, QDeadlineTimer d2);
  90. %End
  91. %If (Qt_6_8_0 -)
  92. bool operator>=(const QDeadlineTimer &lhs, const QDeadlineTimer &rhs);
  93. %End
  94. %If (- Qt_6_8_0)
  95. bool operator>=(QDeadlineTimer d1, QDeadlineTimer d2);
  96. %End
  97. QDeadlineTimer operator+(QDeadlineTimer dt, qint64 msecs);
  98. QDeadlineTimer operator+(qint64 msecs, QDeadlineTimer dt);
  99. QDeadlineTimer operator-(QDeadlineTimer dt, qint64 msecs);
  100. qint64 operator-(QDeadlineTimer dt1, QDeadlineTimer dt2);