QMediaTimeRange::Interval 类表示采用整数精度的时间间隔。 更多...
Interval (qint64 start , qint64 end ) | |
bool | contains (qint64 time ) const |
qint64 | end () const |
bool | isNormal () const |
Interval | normalized () const |
qint64 | start () const |
Interval | translated (qint64 offset ) const |
bool | operator!= (Interval lhs , Interval rhs ) |
bool | operator== (Interval lhs , Interval rhs ) |
An interval is specified by an inclusive start () 和 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.
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 () 方法。
contains () method determines if a specified time lies within the time interval.
translated () method returns a time interval which has been translated forwards or backwards through time by a specified offset.
另请参阅 QMediaTimeRange .
Constructs an interval with the specified start and end times.
Returns true if the time interval contains the specified time . That is, start () <= time <= end ().
Returns the end time of the interval.
另请参阅 start ().
Returns true if this time interval is normal. A normal time interval has start () <= end ().
另请参阅 normalized ().
Returns a normalized version of this interval.
若 start () time of the interval is greater than the end () time, then the returned interval has the start and end times swapped.
Returns the start time of the interval.
另请参阅 end ().
Returns a copy of this time interval, translated by a value of offset . An interval can be moved forward through time with a positive offset, or backward through time with a negative offset.
返回 true 若 lhs is not exactly equal to rhs .
返回 true 若 lhs is exactly equal to rhs .