QMediaTimeIntervalclass represents a time interval with integer precision. 更多 …
def
__eq__
(, arg__2)
def
__ne__
(, arg__2)
def
contains
(time)
def
end
()
def
isNormal
()
def
normalized
()
def
start
()
def
translated
(offset)
An interval is specified by an inclusive
start()andend()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 hasstart()<=end()). A normal interval can be received from an abnormal interval by calling thenormalized()方法。
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.另请参阅
QMediaTimeInterval
¶
QMediaTimeInterval(arg__1)
QMediaTimeInterval(start, end)
- param arg__1
- param start
qint64- param end
qint64
Constructs an empty interval.
Constructs an interval with the specified
start
and
end
times.
PySide2.QtMultimedia.QMediaTimeInterval.
contains
(
time
)
¶
time
–
qint64
bool
Returns true if the time interval contains the specified
time
. That is,
start()
<= time <=
end()
.
PySide2.QtMultimedia.QMediaTimeInterval.
end
(
)
¶
qint64
Returns the end time of the interval.
另请参阅
PySide2.QtMultimedia.QMediaTimeInterval.
isNormal
(
)
¶
bool
Returns true if this time interval is normal. A normal time interval has
start()
<=
end()
.
另请参阅
PySide2.QtMultimedia.QMediaTimeInterval.
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.
PySide2.QtMultimedia.QMediaTimeInterval.
__ne__
(
arg__2
)
¶
arg__2
–
QMediaTimeInterval
bool
PySide2.QtMultimedia.QMediaTimeInterval.
__eq__
(
arg__2
)
¶
arg__2
–
QMediaTimeInterval
bool
PySide2.QtMultimedia.QMediaTimeInterval.
start
(
)
¶
qint64
Returns the start time of the interval.
另请参阅
PySide2.QtMultimedia.QMediaTimeInterval.
translated
(
offset
)
¶
offset
–
qint64
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.