PySide6.QtMultimedia.QMediaTimeRange.Interval¶
- class Interval¶
Synopsis¶
Methods¶
def
__init__()
def
contains()
def
end()
def
isNormal()
def
normalized()
def
__ne__()
def
__eq__()
def
start()
def
translated()
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
Detailed Description¶
- __init__()¶
- __init__(start, end)
- Parameters:
start – int
end – int
Constructs an interval with the specified
start
andend
times.- contains(time)¶
- Parameters:
time – int
- Return type:
bool
Returns true if the time interval contains the specified
time
. That is,start()
<= time <=end()
.- end()¶
- Return type:
int
Returns the end time of the interval.
See also
start()
- isNormal()¶
- Return type:
bool
Returns true if this time interval is normal. A normal time interval has
start()
<=end()
.See also
normalized()
- normalized()¶
- Return type:
Interval
Returns a normalized version of this interval.
If the
start()
time of the interval is greater than theend()
time, then the returned interval has the start and end times swapped.- __ne__(rhs)¶
- Parameters:
rhs –
Interval
- Return type:
bool
Returns true if
lhs
is not exactly equal torhs
.- __eq__(rhs)¶
- Parameters:
rhs –
Interval
- Return type:
bool
Returns true if
lhs
is exactly equal torhs
.- start()¶
- Return type:
int
Returns the start time of the interval.
See also
end()
- translated(offset)¶
- Parameters:
offset – int
- Return type:
Interval
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.