QMediaTimeRange#
The QMediaTimeRange
class represents a set of zero or more disjoint time intervals. More…
Synopsis#
Functions#
def
addInterval
(start, end)def
addInterval
(interval)def
addTimeRange
(arg__1)def
clear
()def
contains
(time)def
earliestTime
()def
intervals
()def
isContinuous
()def
isEmpty
()def
latestTime
()def
__ne__
(rhs)def
__add__
(r2)def
__iadd__
(arg__1)def
__iadd__
(arg__1)def
__sub__
(r2)def
__isub__
(arg__1)def
__isub__
(arg__1)def
__eq__
(rhs)def
removeInterval
(interval)def
removeInterval
(start, end)def
removeTimeRange
(arg__1)def
swap
(other)
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#
The earliestTime()
, latestTime()
, intervals()
and isEmpty()
methods are used to get information about the current time range.
The addInterval()
, removeInterval()
and clear()
methods are used to modify the current time range.
When adding or removing intervals from the time range, existing intervals within the range may be expanded, trimmed, deleted, merged or split to ensure that all intervals within the time range remain distinct and disjoint. As a consequence, all intervals added or removed from a time range must be normal
.
See also
Interval
- class PySide6.QtMultimedia.QMediaTimeRange#
PySide6.QtMultimedia.QMediaTimeRange(range)
PySide6.QtMultimedia.QMediaTimeRange(arg__1)
PySide6.QtMultimedia.QMediaTimeRange(start, end)
- Parameters:
start – int
end – int
Constructs an empty time range.
Constructs a time range by copying another time range
.
Constructs a time range that contains an initial interval, interval
.
If interval
is not normal
, the resulting time range will be empty.
See also
Constructs a time range that contains an initial interval from start
to end
inclusive.
If the interval is not normal
, the resulting time range will be empty.
See also
- PySide6.QtMultimedia.QMediaTimeRange.addInterval(start, end)#
- Parameters:
start – int
end – int
This is an overloaded function.
Adds the interval specified by start
and end
to the time range.
See also
- PySide6.QtMultimedia.QMediaTimeRange.addInterval(interval)
- Parameters:
Adds the specified interval
to the time range.
Adding intervals which are not normal
is invalid, and will be ignored.
If the specified interval is adjacent to, or overlaps existing intervals within the time range, these intervals will be merged.
This operation takes linear time.
See also
- PySide6.QtMultimedia.QMediaTimeRange.addTimeRange(arg__1)#
- Parameters:
arg__1 –
PySide6.QtMultimedia.QMediaTimeRange
Adds each of the intervals in range
to this time range.
Equivalent to calling addInterval()
for each interval in range
.
- PySide6.QtMultimedia.QMediaTimeRange.clear()#
Removes all intervals from the time range.
See also
- PySide6.QtMultimedia.QMediaTimeRange.contains(time)#
- Parameters:
time – int
- Return type:
bool
Returns true if the specified time
lies within the time range.
- PySide6.QtMultimedia.QMediaTimeRange.earliestTime()#
- Return type:
int
Returns the earliest time within the time range.
For empty time ranges, this value is equal to zero.
See also
- PySide6.QtMultimedia.QMediaTimeRange.intervals()#
Returns the list of intervals covered by this time range.
- PySide6.QtMultimedia.QMediaTimeRange.isContinuous()#
- Return type:
bool
Returns true if the time range consists of a continuous interval. That is, there is one or fewer disjoint intervals within the time range.
- PySide6.QtMultimedia.QMediaTimeRange.isEmpty()#
- Return type:
bool
Returns true if there are no intervals within the time range.
See also
- PySide6.QtMultimedia.QMediaTimeRange.latestTime()#
- Return type:
int
Returns the latest time within the time range.
For empty time ranges, this value is equal to zero.
See also
- PySide6.QtMultimedia.QMediaTimeRange.__ne__(rhs)#
- Parameters:
- Return type:
bool
Returns true if one or more intervals in lhs
are not present in rhs
.
- PySide6.QtMultimedia.QMediaTimeRange.__add__(r2)#
- Parameters:
- Return type:
Returns a time range containing the union between r1
and r2
.
- PySide6.QtMultimedia.QMediaTimeRange.__iadd__(arg__1)#
- Parameters:
arg__1 –
PySide6.QtMultimedia.QMediaTimeRange
- Return type:
Adds each interval in other
to the time range and returns the result.
- PySide6.QtMultimedia.QMediaTimeRange.__iadd__(arg__1)
- Parameters:
- Return type:
Adds the specified interval
to the time range and returns the result.
- PySide6.QtMultimedia.QMediaTimeRange.__sub__(r2)#
- Parameters:
- Return type:
Returns a time range containing r2
subtracted from r1
.
- PySide6.QtMultimedia.QMediaTimeRange.__isub__(arg__1)#
- Parameters:
arg__1 –
PySide6.QtMultimedia.QMediaTimeRange
- Return type:
Removes each interval in other
from the time range and returns the result.
- PySide6.QtMultimedia.QMediaTimeRange.__isub__(arg__1)
- Parameters:
- Return type:
Removes the specified interval
from the time range and returns the result.
- PySide6.QtMultimedia.QMediaTimeRange.__eq__(rhs)#
- Parameters:
- Return type:
bool
Returns true if all intervals in lhs
are present in rhs
.
- PySide6.QtMultimedia.QMediaTimeRange.removeInterval(interval)#
- Parameters:
Removes the specified interval
from the time range.
Removing intervals which are not normal
is invalid, and will be ignored.
Intervals within the time range will be trimmed, split or deleted such that no intervals within the time range include any part of the target interval.
This operation takes linear time.
See also
- PySide6.QtMultimedia.QMediaTimeRange.removeInterval(start, end)
- Parameters:
start – int
end – int
This is an overloaded function.
Removes the interval specified by start
and end
from the time range.
See also
- PySide6.QtMultimedia.QMediaTimeRange.removeTimeRange(arg__1)#
- Parameters:
arg__1 –
PySide6.QtMultimedia.QMediaTimeRange
Removes each of the intervals in range
from this time range.
Equivalent to calling removeInterval()
for each interval in range
.
- PySide6.QtMultimedia.QMediaTimeRange.swap(other)#
- Parameters:
Swaps the current instance with the other
.