Skip to content

DeadlineTimer

Qt Base Class: QDeadlineTimer

Signature: QDeadlineTimer(self, QDeadlineTimer: Union[PySide6.QtCore.QDeadlineTimer, PySide6.QtCore.QDeadlineTimer.ForeverConstant, PySide6.QtCore.Qt.TimerType, int]) -> None QDeadlineTimer(self, arg__1: PySide6.QtCore.QDeadlineTimer.ForeverConstant, type_: PySide6.QtCore.Qt.TimerType = Instance(Qt.CoarseTimer)) -> None QDeadlineTimer(self, msecs: int, type: PySide6.QtCore.Qt.TimerType = Instance(Qt.CoarseTimer)) -> None QDeadlineTimer(self, type_: PySide6.QtCore.Qt.TimerType = Instance(Qt.CoarseTimer)) -> None

Base classes

Name Children Inherits
QDeadlineTimer
PySide6.QtCore
QDeadlineTimer(self, QDeadlineTimer: Union[PySide6.QtCore.QDeadlineTimer, PySide6.QtCore.QDeadlineTimer.ForeverConstant, PySide6.QtCore.Qt.TimerType, int]) -> None

⋔ Inheritance diagram

graph TD
  1473299785744["core.DeadlineTimer"]
  1473288948624["QtCore.QDeadlineTimer"]
  1473291690208["Shiboken.Object"]
  140713234304496["builtins.object"]
  1473288948624 --> 1473299785744
  1473291690208 --> 1473288948624
  140713234304496 --> 1473291690208

🛈 DocStrings

Bases: QDeadlineTimer

Marks a deadline in the future.

Source code in prettyqt\core\deadlinetimer.py
class DeadlineTimer(QtCore.QDeadlineTimer):
    """Marks a deadline in the future."""

    def set_type(self, typ: constants.TimerTypeStr | constants.TimerType):
        """Set the timer type.

        Args:
            typ: timer type
        """
        self.setTimerType(constants.TIMER_TYPE.get_enum_value(typ))

    def get_type(self) -> constants.TimerTypeStr:
        """Return current timer type.

        Returns:
            timer type
        """
        return constants.TIMER_TYPE.inverse[self.timerType()]

get_type() -> constants.TimerTypeStr

Return current timer type.

Source code in prettyqt\core\deadlinetimer.py
def get_type(self) -> constants.TimerTypeStr:
    """Return current timer type.

    Returns:
        timer type
    """
    return constants.TIMER_TYPE.inverse[self.timerType()]

set_type(typ: constants.TimerTypeStr | constants.TimerType)

Set the timer type.

Parameters:

Name Type Description Default
typ TimerTypeStr | TimerType

timer type

required
Source code in prettyqt\core\deadlinetimer.py
def set_type(self, typ: constants.TimerTypeStr | constants.TimerType):
    """Set the timer type.

    Args:
        typ: timer type
    """
    self.setTimerType(constants.TIMER_TYPE.get_enum_value(typ))