Interval Struct

struct QMediaTimeRange::Interval

QMediaTimeRange::Interval 클래스는 정수 정밀도의 시간 간격을 나타냅니다. 더 보기...

공용 함수

Interval(qint64 start, qint64 end)
bool contains(qint64 time) const
qint64 end() const
bool isNormal() const
QMediaTimeRange::Interval normalized() const
qint64 start() const
QMediaTimeRange::Interval translated(qint64 offset) const
bool operator!=(QMediaTimeRange::Interval lhs, QMediaTimeRange::Interval rhs)
bool operator==(QMediaTimeRange::Interval lhs, QMediaTimeRange::Interval rhs)

상세 설명

간격은 포괄적인 start() 및 end() 시간으로 지정됩니다. 이 클래스는 불변 클래스이므로 생성자에서 설정해야 합니다. 이 클래스가 나타내는 특정 시간 단위는 정의되지 않았으며 부호 있는 64비트 정수로 표현할 수 있는 모든 시간에 적합합니다.

isNormal() 메서드는 시간 간격이 정상인지 여부를 결정합니다(정상 시간 간격은 start() <= end()). 정상 간격은 normalized() 메서드를 호출하여 비정상 간격에서 수신할 수 있습니다.

contains() 메서드는 지정된 시간이 시간 간격 내에 있는지 여부를 확인합니다.

translated() 메서드는 지정된 오프셋만큼 시간을 앞뒤로 변환한 시간 간격을 반환합니다.

QMediaTimeRange참조하세요 .

멤버 함수 문서

[explicit constexpr noexcept] Interval::Interval(qint64 start, qint64 end)

지정된 startend 시간으로 간격을 구성합니다.

[constexpr noexcept] bool Interval::contains(qint64 time) const

시간 간격이 지정된 time 을 포함하면 참을 반환합니다. 즉, start() <= time <= end().

[constexpr noexcept] qint64 Interval::end() const

간격의 종료 시간을 반환합니다.

start()도 참조하세요 .

[constexpr noexcept] bool Interval::isNormal() const

이 시간 간격이 정상이면 true를 반환합니다. 정상 시간 간격은 start() <= end() 입니다.

normalized()도 참조하세요 .

[constexpr] QMediaTimeRange::Interval Interval::normalized() const

이 간격의 정규화된 버전을 반환합니다.

간격의 start() 시간이 end() 시간보다 큰 경우 반환된 간격의 시작 시간과 종료 시간이 바뀝니다.

[constexpr noexcept] qint64 Interval::start() const

간격의 시작 시간을 반환합니다.

end()도 참조하세요 .

[constexpr] QMediaTimeRange::Interval Interval::translated(qint64 offset) const

offset 값으로 변환된 이 시간 간격의 복사본을 반환합니다. 간격은 양수 오프셋을 사용하여 시간을 앞으로 이동하거나 음수 오프셋을 사용하여 시간을 뒤로 이동할 수 있습니다.

관련 비회원

[constexpr noexcept] bool operator!=(QMediaTimeRange::Interval lhs, QMediaTimeRange::Interval rhs)

lhsrhs 과 정확히 같지 않으면 true를 반환합니다 .

[constexpr noexcept] bool operator==(QMediaTimeRange::Interval lhs, QMediaTimeRange::Interval rhs)

lhsrhs 과 정확히 같으면 true를 반환합니다.

© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.