Loading...
Searching...
No Matches
LomiriUtil::Timer Class Reference

`#include <plugins/Utils/Timer.h>`

Inheritance diagram for LomiriUtil::Timer:
[legend]
Collaboration diagram for LomiriUtil::Timer:
[legend]

## Public Member Functions

| Timer (QObject *parent=nullptr)
int | interval () const override
void | setInterval (int msecs) override
void | start () override
void | stop () override
bool | isRunning () const override
bool | isSingleShot () const override
void | setSingleShot (bool value) override
Public Member Functions inherited from LomiriUtil::AbstractTimer
| AbstractTimer (QObject *parent)

## Additional Inherited Members

Signals inherited from LomiriUtil::AbstractTimer
void | timeout ()

## Detailed Description

A QTimer wrapper

Definition at line 46 of file Timer.h.

## Constructor & Destructor Documentation

## Timer()

LomiriUtil::Timer::Timer | ( | QObject * | parent = nullptr | ) |

Definition at line 21 of file Timer.cpp.

: AbstractTimer(parent)
{
m_timer.setSingleShot(true);
connect(&m_timer, &QTimer::timeout, this, &AbstractTimer::timeout);
}

## Member Function Documentation

## interval()

int LomiriUtil::Timer::interval | ( |  | ) | const

override virtual

Implements LomiriUtil::AbstractTimer.

Definition at line 27 of file Timer.cpp.

{
return m_timer.interval();
}

## isRunning()

bool LomiriUtil::Timer::isRunning | ( |  | ) | const

override virtual

Implements LomiriUtil::AbstractTimer.

Definition at line 47 of file Timer.cpp.

{
return m_timer.isActive();
}

## isSingleShot()

bool LomiriUtil::Timer::isSingleShot | ( |  | ) | const

override virtual

Implements LomiriUtil::AbstractTimer.

Definition at line 52 of file Timer.cpp.

{
return m_timer.isSingleShot();
}

## setInterval()

void LomiriUtil::Timer::setInterval | ( | int | msecs | ) |

override virtual

Implements LomiriUtil::AbstractTimer.

Definition at line 32 of file Timer.cpp.

{
m_timer.setInterval(msecs);
}

## setSingleShot()

void LomiriUtil::Timer::setSingleShot | ( | bool | value | ) |

override virtual

Implements LomiriUtil::AbstractTimer.

Definition at line 57 of file Timer.cpp.

{
m_timer.setSingleShot(value);
}

## start()

void LomiriUtil::Timer::start | ( |  | ) |

override virtual

Implements LomiriUtil::AbstractTimer.

Definition at line 37 of file Timer.cpp.

{
m_timer.start();
}

## stop()

void LomiriUtil::Timer::stop | ( |  | ) |

override virtual

Implements LomiriUtil::AbstractTimer.

Definition at line 42 of file Timer.cpp.

{
m_timer.stop();
}

The documentation for this class was generated from the following files:

- plugins/Utils/Timer.h
- plugins/Utils/Timer.cpp