class Interval#

Synopsis#

Methods#

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 and end 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 the end() time, then the returned interval has the start and end times swapped.

__ne__(rhs)#
Parameters:

rhsInterval

Return type:

bool

Returns true if lhs is not exactly equal to rhs.

__eq__(rhs)#
Parameters:

rhsInterval

Return type:

bool

Returns true if lhs is exactly equal to rhs.

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.