The QMediaTimeRange class represents a set of zero or more disjoint time intervals. More...
#include <QMediaTimeRange>
Note: All functions in this class are reentrant.
This class was introduced in Qt Mobility 1.0.
QMediaTimeRange () | |
QMediaTimeRange ( qint64 start, qint64 end ) | |
QMediaTimeRange ( const QMediaTimeInterval & interval ) | |
QMediaTimeRange ( const QMediaTimeRange & range ) | |
~QMediaTimeRange () | |
void | addInterval ( const QMediaTimeInterval & interval ) |
void | addInterval ( qint64 start, qint64 end ) |
void | addTimeRange ( const QMediaTimeRange & range ) |
void | clear () |
bool | contains ( qint64 time ) const |
qint64 | earliestTime () const |
QList<QMediaTimeInterval> | intervals () const |
bool | isContinuous () const |
bool | isEmpty () const |
qint64 | latestTime () const |
void | removeInterval ( const QMediaTimeInterval & interval ) |
void | removeInterval ( qint64 start, qint64 end ) |
void | removeTimeRange ( const QMediaTimeRange & range ) |
QMediaTimeRange & | operator+= ( const QMediaTimeRange & other ) |
QMediaTimeRange & | operator+= ( const QMediaTimeInterval & interval ) |
QMediaTimeRange & | operator-= ( const QMediaTimeRange & other ) |
QMediaTimeRange & | operator-= ( const QMediaTimeInterval & interval ) |
QMediaTimeRange & | operator= ( const QMediaTimeRange & other ) |
QMediaTimeRange & | operator= ( const QMediaTimeInterval & interval ) |
bool | operator!= ( const QMediaTimeRange & a, const QMediaTimeRange & b ) |
bool | operator!= ( const QMediaTimeInterval & a, const QMediaTimeInterval & b ) |
bool | operator== ( const QMediaTimeInterval & a, const QMediaTimeInterval & b ) |
bool | operator== ( const QMediaTimeRange & a, const QMediaTimeRange & b ) |
The QMediaTimeRange class represents a set of zero or more disjoint time intervals.
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 QMediaTimeInterval.
Constructs an empty time range.
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.
This function was introduced in Qt Mobility 1.0.
See also addInterval().
Constructs a time range that contains an intitial interval, interval.
If interval is not normal, the resulting time range will be empty.
This function was introduced in Qt Mobility 1.0.
See also addInterval().
Constructs a time range by copying another time range.
This function was introduced in Qt Mobility 1.0.
Destructor.
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
This function was introduced in Qt Mobility 1.0.
See also removeInterval().
This is an overloaded function.
Adds the interval specified by start and end to the time range.
This function was introduced in Qt Mobility 1.0.
See also addInterval().
Adds each of the intervals in range to this time range.
Equivalent to calling addInterval() for each interval in range.
This function was introduced in Qt Mobility 1.0.
Removes all intervals from the time range.
This function was introduced in Qt Mobility 1.0.
See also removeInterval().
Returns true if the specified time lies within the time range.
This function was introduced in Qt Mobility 1.0.
Returns the earliest time within the time range.
For empty time ranges, this value is equal to zero.
This function was introduced in Qt Mobility 1.0.
See also latestTime().
Returns the list of intervals covered by this time range.
This function was introduced in Qt Mobility 1.0.
Returns true if the time range consists of a continuous interval. That is, there is one or fewer disjoint intervals within the time range.
This function was introduced in Qt Mobility 1.0.
Returns true if there are no intervals within the time range.
This function was introduced in Qt Mobility 1.0.
See also intervals().
Returns the latest time within the time range.
For empty time ranges, this value is equal to zero.
This function was introduced in Qt Mobility 1.0.
See also earliestTime().
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
This function was introduced in Qt Mobility 1.0.
See also addInterval().
This is an overloaded function.
Removes the interval specified by start and end from the time range.
This function was introduced in Qt Mobility 1.0.
See also removeInterval().
Removes each of the intervals in range from this time range.
Equivalent to calling removeInterval() for each interval in range.
This function was introduced in Qt Mobility 1.0.
Adds each interval in other to the time range and returns the result.
This function was introduced in Qt Mobility 1.0.
Adds the specified interval to the time range and returns the result.
This function was introduced in Qt Mobility 1.0.
Removes each interval in other from the time range and returns the result.
This function was introduced in Qt Mobility 1.0.
Removes the specified interval from the time range and returns the result.
This function was introduced in Qt Mobility 1.0.
Takes a copy of the other time range and returns itself.
This function was introduced in Qt Mobility 1.0.
Sets the time range to a single continuous interval, interval.
This function was introduced in Qt Mobility 1.0.
Returns true if one or more intervals in a are not present in b.
This function was introduced in Qt Mobility 1.0.
Returns true if a is not exactly equal to b.
This function was introduced in Qt Mobility 1.0.
Returns true if a is exactly equal to b.
This function was introduced in Qt Mobility 1.0.
Returns true if all intervals in a are present in b.
This function was introduced in Qt Mobility 1.0.