Module qtjambi
Package io.qt.core

Class QTimer

All Implemented Interfaces:
QtObjectInterface, QtSignalBlockerInterface, QtSignalEmitterInterface, QtThreadAffineInterface

public class QTimer extends QObject

Repetitive and single-shot timers

Java wrapper for Qt class QTimer

  • Field Details

  • Constructor Details

  • Method Details

    • interval

      @QtUninvokable public final int interval()
    • isActive

      @QtUninvokable public final boolean isActive()
    • isSingleShot

      @QtUninvokable public final boolean isSingleShot()
    • remainingTime

      @QtUninvokable public final int remainingTime()
    • setInterval

      @QtUninvokable public final void setInterval(int msec)
    • setSingleShot

      @QtUninvokable public final void setSingleShot(boolean singleShot)
    • setTimerType

      @QtUninvokable public final void setTimerType(Qt.TimerType atype)
    • start

      public final void start()
    • start

      public final void start(int msec)
    • stop

      public final void stop()
    • timerId

      @QtUninvokable public final int timerId()
    • timerType

      @QtUninvokable public final Qt.TimerType timerType()
    • timerEvent

      @QtUninvokable protected void timerEvent(QTimerEvent arg__1)
      Overrides:
      timerEvent in class QObject
    • singleShot

      public static void singleShot(int msec, QObject obj, String method)
      This static function calls a slot after a given time interval. It is very convenient to use this function because you do not need to bother with a timerEvent or create a local QTimer object. The receiver is the receiving object and the member is the slot. The time interval is msec milliseconds.
      See Also:
    • singleShot

      public static void singleShot(int msec, QObject context, QMetaObject.Slot0 slot)
      This static function calls slot after a given time interval. It is very convenient to use this function because you do not need to bother with a timerEvent or create a local QTimer object. The time interval is msec milliseconds. If context is destroyed before the interval occurs, the method will not be called. The function will be run in the thread of context. The context's thread must have a running Qt event loop.
      Since:
      5.4
      See Also:
    • singleShot

      public static void singleShot(int msec, Qt.TimerType timeType, QObject obj, String method)
      This static function calls a slot after a given time interval. It is very convenient to use this function because you do not need to bother with a timerEvent or create a local QTimer object. The receiver is the receiving object and the member is the slot. The time interval is msec milliseconds. The timerType affects the accuracy of the timer.
      See Also:
    • singleShot

      public static void singleShot(int msec, QMetaObject.Slot0 slot)
      This static function calls slot after a given time interval. It is very convenient to use this function because you do not need to bother with a timerEvent or create a local QTimer object. The time interval is msec milliseconds.
      Since:
      5.4
      See Also:
    • singleShot

      public static void singleShot(int msec, Qt.TimerType timeType, QMetaObject.Slot0 slot)
      This static function calls slot after a given time interval. It is very convenient to use this function because you do not need to bother with a timerEvent or create a local QTimer object. The time interval is msec milliseconds. The timerType affects the accuracy of the timer.
      Since:
      5.4
      See Also:
    • singleShot

      public static void singleShot(int msec, Qt.TimerType timeType, QObject context, QMetaObject.Slot0 slot)
      This static function calls slot after a given time interval. It is very convenient to use this function because you do not need to bother with a timerEvent or create a local QTimer object. The time interval is msec milliseconds. The timerType affects the accuracy of the timer. If context is destroyed before the interval occurs, the method will not be called. The function will be run in the thread of context. The context's thread must have a running Qt event loop.
      Since:
      5.4
      See Also: