QMediaTimeRange¶
The
QMediaTimeRange
class represents a set of zero or more disjoint time intervals. More…
Synopsis¶
Functions¶
def
__add__
(, arg__2)def
__eq__
(, arg__2)def
__iadd__
(arg__1)def
__iadd__
(arg__1)def
__isub__
(arg__1)def
__isub__
(arg__1)def
__ne__
(, arg__2)def
__sub__
(, arg__2)def
addInterval
(interval)def
addInterval
(start, end)def
addTimeRange
(arg__1)def
clear
()def
contains
(time)def
earliestTime
()def
intervals
()def
isContinuous
()def
isEmpty
()def
latestTime
()def
operator=
(arg__1)def
removeInterval
(interval)def
removeInterval
(start, end)def
removeTimeRange
(arg__1)
Detailed Description¶
The
earliestTime()
,latestTime()
,intervals()
andisEmpty()
methods are used to get information about the current time range.The
addInterval()
,removeInterval()
andclear()
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
- class PySide2.QtMultimedia.QMediaTimeRange¶
PySide2.QtMultimedia.QMediaTimeRange(arg__1)
PySide2.QtMultimedia.QMediaTimeRange(range)
PySide2.QtMultimedia.QMediaTimeRange(start, end)
- param range:
- param arg__1:
- param start:
int
- param end:
int
Constructs an empty time range.
Constructs a time range that contains an initial interval from
start
toend
inclusive.If the interval is not
normal
, the resulting time range will be empty.See also
- PySide2.QtMultimedia.QMediaTimeRange.addInterval(interval)¶
- Parameters:
interval –
PySide2.QtMultimedia.QMediaTimeInterval
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
- PySide2.QtMultimedia.QMediaTimeRange.addInterval(start, end)
- Parameters:
start – int
end – int
This is an overloaded function.
Adds the interval specified by
start
andend
to the time range.See also
- PySide2.QtMultimedia.QMediaTimeRange.addTimeRange(arg__1)¶
- Parameters:
arg__1 –
PySide2.QtMultimedia.QMediaTimeRange
Adds each of the intervals in
range
to this time range.Equivalent to calling
addInterval()
for each interval inrange
.
- PySide2.QtMultimedia.QMediaTimeRange.clear()¶
Removes all intervals from the time range.
See also
- PySide2.QtMultimedia.QMediaTimeRange.contains(time)¶
- Parameters:
time – int
- Return type:
bool
Returns true if the specified
time
lies within the time range.
- PySide2.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
- PySide2.QtMultimedia.QMediaTimeRange.intervals()¶
- Return type:
Returns the list of intervals covered by this time range.
- PySide2.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.
- PySide2.QtMultimedia.QMediaTimeRange.isEmpty()¶
- Return type:
bool
Returns true if there are no intervals within the time range.
See also
- PySide2.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
- PySide2.QtMultimedia.QMediaTimeRange.__ne__(arg__2)¶
- Parameters:
arg__2 –
PySide2.QtMultimedia.QMediaTimeRange
- Return type:
bool
- PySide2.QtMultimedia.QMediaTimeRange.__add__(arg__2)¶
- Parameters:
arg__2 –
PySide2.QtMultimedia.QMediaTimeRange
- Return type:
- PySide2.QtMultimedia.QMediaTimeRange.__iadd__(arg__1)¶
- Parameters:
- Return type:
- PySide2.QtMultimedia.QMediaTimeRange.__iadd__(arg__1)
- Parameters:
arg__1 –
PySide2.QtMultimedia.QMediaTimeRange
- Return type:
- PySide2.QtMultimedia.QMediaTimeRange.__sub__(arg__2)¶
- Parameters:
arg__2 –
PySide2.QtMultimedia.QMediaTimeRange
- Return type:
- PySide2.QtMultimedia.QMediaTimeRange.__isub__(arg__1)¶
- Parameters:
- Return type:
- PySide2.QtMultimedia.QMediaTimeRange.__isub__(arg__1)
- Parameters:
arg__1 –
PySide2.QtMultimedia.QMediaTimeRange
- Return type:
- PySide2.QtMultimedia.QMediaTimeRange.operator=(arg__1)
- Parameters:
- Return type:
- PySide2.QtMultimedia.QMediaTimeRange.__eq__(arg__2)¶
- Parameters:
arg__2 –
PySide2.QtMultimedia.QMediaTimeRange
- Return type:
bool
- PySide2.QtMultimedia.QMediaTimeRange.removeInterval(interval)¶
- Parameters:
interval –
PySide2.QtMultimedia.QMediaTimeInterval
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
- PySide2.QtMultimedia.QMediaTimeRange.removeInterval(start, end)
- Parameters:
start – int
end – int
This is an overloaded function.
Removes the interval specified by
start
andend
from the time range.See also
- PySide2.QtMultimedia.QMediaTimeRange.removeTimeRange(arg__1)¶
- Parameters:
arg__1 –
PySide2.QtMultimedia.QMediaTimeRange
Removes each of the intervals in
range
from this time range.Equivalent to calling
removeInterval()
for each interval inrange
.
© 2022 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.