The QMediaTimeInterval class represents a time interval with integer precision. More...
#include <QMediaTimeInterval>
This class was introduced in Qt Mobility 1.0.
QMediaTimeInterval () | |
QMediaTimeInterval ( qint64 start, qint64 end ) | |
QMediaTimeInterval ( const QMediaTimeInterval & other ) | |
bool | contains ( qint64 time ) const |
qint64 | end () const |
bool | isNormal () const |
QMediaTimeInterval | normalized () const |
qint64 | start () const |
QMediaTimeInterval | translated ( qint64 offset ) const |
The QMediaTimeInterval class represents a time interval with integer precision.
An interval is specified by an inclusive start() and end() 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.
The isNormal() method determines if a time interval is normal (a normal time interval has start() <= end()). An abnormal interval can be converted in to a normal interval by calling the normalized() method.
The contains() method determines if a specified time lies within the time interval.
The translated() method returns a time interval which has been translated forwards or backwards through time by a specified offset.
See also QMediaTimeRange.
Constructs an empty interval.
Constructs an interval with the specified start and end times.
This function was introduced in Qt Mobility 1.0.
Constructs an interval by taking a copy of other.
This function was introduced in Qt Mobility 1.0.
Returns true if the time interval contains the specified time. That is, start() <= time <= end().
This function was introduced in Qt Mobility 1.0.
Returns the end time of the interval.
This function was introduced in Qt Mobility 1.0.
See also start().
Returns true if this time interval is normal. A normal time interval has start() <= end().
This function was introduced in Qt Mobility 1.0.
See also normalized().
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.
This function was introduced in Qt Mobility 1.0.
Returns the start time of the interval.
This function was introduced in Qt Mobility 1.0.
See also end().
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.
This function was introduced in Qt Mobility 1.0.
© 2008-2011 Nokia Corporation and/or its subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation in Finland and/or other countries worldwide.
All other trademarks are property of their respective owners. Privacy Policy
Licensees holding valid Qt Commercial licenses may use this document in accordance with the Qt Commercial License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written agreement between you and Nokia.
Alternatively, this document may be used under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.