Qt 5.11 | Qt Multimedia | C++ Classes | QMediaTimeInterval

Qt 5.11.3 Reference Documentation

# QMediaTimeInterval Class

The QMediaTimeInterval class represents a time interval with integer precision. More...

Header: | #include <QMediaTimeInterval>
qmake: | QT += multimedia

- List of all members, including inherited members

## Public Functions

| QMediaTimeInterval()
| QMediaTimeInterval(qint64 start, qint64 end)
| QMediaTimeInterval(const QMediaTimeInterval &)
bool | contains(qint64 time) const
qint64 | end() const
bool | isNormal() const
QMediaTimeInterval | normalized() const
qint64 | start() const
QMediaTimeInterval | translated(qint64 offset) const

## Detailed Description

The QMediaTimeInterval class represents a time interval with integer precision.

An interval is specified by an inclusive start() and end() time. These must be set in the constructor, as this is an immutable class. The specific units of time represented by the class have not been defined - it is suitable for any times which can be represented by a signed 64 bit integer.

The isNormal() method determines if a time interval is normal (a normal time interval has start() <= end()). A normal interval can be received from an abnormal interval by calling the normalized() method.

The contains() method determines if a specified time lies within the time interval.

The translated() method returns a time interval which has been translated forwards or backwards through time by a specified offset.

See also QMediaTimeRange.

## Member Function Documentation

### QMediaTimeInterval::QMediaTimeInterval()

Default constructs an instance of QMediaTimeInterval.

### QMediaTimeInterval::QMediaTimeInterval(qint64 start, qint64 end)

Default constructs an instance of QMediaTimeInterval.

### QMediaTimeInterval::QMediaTimeInterval(const QMediaTimeInterval &)

Default constructs an instance of QMediaTimeInterval.

### bool QMediaTimeInterval::contains(qint64 time) const

### qint64 QMediaTimeInterval::end() const

### bool QMediaTimeInterval::isNormal() const

### QMediaTimeInterval QMediaTimeInterval::normalized() const

### qint64 QMediaTimeInterval::start() const

### QMediaTimeInterval QMediaTimeInterval::translated(qint64 offset) const