Skip to content

DeadlineTimer

Base classes

Name Children Inherits
QDeadlineTimer
PySide6.QtCore
QDeadlineTimer(self, /) -> None

⋔ Inheritance diagram

graph TD
  1247961472["core.DeadlineTimer"]
  32264788["QtCore.QDeadlineTimer"]
  37984305["Shiboken.Object"]
  2751680898["builtins.object"]
  32264788 --> 1247961472
  37984305 --> 32264788
  2751680898 --> 37984305

🛈 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))

:fa-brands-github: Show source on GitHub