QMediaTimeRange::Interval Struct
struct QMediaTimeRange::IntervalLa clase ` QMediaTimeRange::Interval ` representa un intervalo de tiempo con precisión entera. Más información...
Funciones públicas
| 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 |
Elementos no miembros relacionados
| bool | operator!=(QMediaTimeRange::Interval lhs, QMediaTimeRange::Interval rhs) |
| bool | operator==(QMediaTimeRange::Interval lhs, QMediaTimeRange::Interval rhs) |
Descripción detallada
Un intervalo se especifica mediante un tiempo inclusivo start() y end(). Estos deben establecerse en el constructor, ya que se trata de una clase inmutable. No se han definido las unidades de tiempo específicas representadas por la clase; es adecuada para cualquier tiempo que pueda representarse mediante un entero con signo de 64 bits.
El método isNormal() determina si un intervalo de tiempo es normal (un intervalo de tiempo normal cumple que start() <= end()). Se puede obtener un intervalo normal a partir de uno anormal llamando al método normalized().
El método contains() determina si una hora especificada se encuentra dentro del intervalo de tiempo.
El método ` translated()` devuelve un intervalo de tiempo que se ha desplazado hacia adelante o hacia atrás en el tiempo en un valor especificado.
Véase también QMediaTimeRange.
Documentación de funciones de miembro
[constexpr noexcept default] Interval::Interval()
Crea por defecto una instancia de ` Interval`.
[explicit constexpr noexcept] Interval::Interval(qint64 start, qint64 end)
Crea un intervalo con los tiempos especificados en « start » y « end ».
[constexpr noexcept] bool Interval::contains(qint64 time) const
Devuelve «true» si el intervalo de tiempo contiene el valor especificado time. Es decir, start() <= time <= end().
[constexpr noexcept] qint64 Interval::end() const
Devuelve la hora de finalización del intervalo.
Véase también start().
[constexpr noexcept] bool Interval::isNormal() const
Devuelve «true» si este intervalo de tiempo es normal. Un intervalo de tiempo normal cumple que start() <= end().
Véase también normalized().
[constexpr] QMediaTimeRange::Interval Interval::normalized() const
Devuelve una versión normalizada de este intervalo.
Si la hora de start() del intervalo es posterior a la de end(), el intervalo devuelto tendrá las horas de inicio y fin intercambiadas.
[constexpr noexcept] qint64 Interval::start() const
Devuelve la hora de inicio del intervalo.
Véase también end().
[constexpr] QMediaTimeRange::Interval Interval::translated(qint64 offset) const
Devuelve una copia de este intervalo de tiempo, desplazado en un valor de offset. Un intervalo puede desplazarse hacia adelante en el tiempo con un desplazamiento positivo, o hacia atrás en el tiempo con un desplazamiento negativo.
Elementos no miembros relacionados
[constexpr noexcept] bool operator!=(QMediaTimeRange::Interval lhs, QMediaTimeRange::Interval rhs)
Devuelve «true» si lhs no es exactamente igual a rhs.
[constexpr noexcept] bool operator==(QMediaTimeRange::Interval lhs, QMediaTimeRange::Interval rhs)
Devuelve «true» si « lhs » es exactamente igual a « rhs ».
© 2026 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.