Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Toutes les fonctions  ·  Vues d'ensemble  · 

QMediaTimeRange Class Reference

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.

Public Functions

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 )

Related Non-Members

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 )

Detailed Description

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.

Member Function Documentation

QMediaTimeRange::QMediaTimeRange ()

Constructs an empty time range.

QMediaTimeRange::QMediaTimeRange ( qint64 start, qint64 end )

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().

QMediaTimeRange::QMediaTimeRange ( const QMediaTimeInterval & interval )

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().

QMediaTimeRange::QMediaTimeRange ( const QMediaTimeRange & range )

Constructs a time range by copying another time range.

This function was introduced in Qt Mobility 1.0.

QMediaTimeRange::~QMediaTimeRange ()

Destructor.

void QMediaTimeRange::addInterval ( const QMediaTimeInterval & interval )

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().

void QMediaTimeRange::addInterval ( qint64 start, qint64 end )

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().

void QMediaTimeRange::addTimeRange ( const QMediaTimeRange & range )

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.

void QMediaTimeRange::clear ()

Removes all intervals from the time range.

This function was introduced in Qt Mobility 1.0.

See also removeInterval().

bool QMediaTimeRange::contains ( qint64 time ) const

Returns true if the specified time lies within the time range.

This function was introduced in Qt Mobility 1.0.

qint64 QMediaTimeRange::earliestTime () const

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().

QList<QMediaTimeInterval> QMediaTimeRange::intervals () const

Returns the list of intervals covered by this time range.

This function was introduced in Qt Mobility 1.0.

bool QMediaTimeRange::isContinuous () const

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.

bool QMediaTimeRange::isEmpty () const

Returns true if there are no intervals within the time range.

This function was introduced in Qt Mobility 1.0.

See also intervals().

qint64 QMediaTimeRange::latestTime () const

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().

void QMediaTimeRange::removeInterval ( const QMediaTimeInterval & interval )

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().

void QMediaTimeRange::removeInterval ( qint64 start, qint64 end )

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().

void QMediaTimeRange::removeTimeRange ( const QMediaTimeRange & range )

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.

QMediaTimeRange & QMediaTimeRange::operator+= ( const QMediaTimeRange & other )

Adds each interval in other to the time range and returns the result.

This function was introduced in Qt Mobility 1.0.

QMediaTimeRange & QMediaTimeRange::operator+= ( const QMediaTimeInterval & interval )

Adds the specified interval to the time range and returns the result.

This function was introduced in Qt Mobility 1.0.

QMediaTimeRange & QMediaTimeRange::operator-= ( const QMediaTimeRange & other )

Removes each interval in other from the time range and returns the result.

This function was introduced in Qt Mobility 1.0.

QMediaTimeRange & QMediaTimeRange::operator-= ( const QMediaTimeInterval & interval )

Removes the specified interval from the time range and returns the result.

This function was introduced in Qt Mobility 1.0.

QMediaTimeRange & QMediaTimeRange::operator= ( const QMediaTimeRange & other )

Takes a copy of the other time range and returns itself.

This function was introduced in Qt Mobility 1.0.

QMediaTimeRange & QMediaTimeRange::operator= ( const QMediaTimeInterval & interval )

Sets the time range to a single continuous interval, interval.

This function was introduced in Qt Mobility 1.0.

Related Non-Members

bool operator!= ( const QMediaTimeRange & a, const QMediaTimeRange & b )

Returns true if one or more intervals in a are not present in b.

This function was introduced in Qt Mobility 1.0.

bool operator!= ( const QMediaTimeInterval & a, const QMediaTimeInterval & b )

Returns true if a is not exactly equal to b.

This function was introduced in Qt Mobility 1.0.

bool operator== ( const QMediaTimeInterval & a, const QMediaTimeInterval & b )

Returns true if a is exactly equal to b.

This function was introduced in Qt Mobility 1.0.

bool operator== ( const QMediaTimeRange & a, const QMediaTimeRange & b )

Returns true if all intervals in a are present in b.

This function was introduced in Qt Mobility 1.0.

Publicité

Best Of

Actualités les plus lues

Semaine
Mois
Année
  1. « Quelque chose ne va vraiment pas avec les développeurs "modernes" », un développeur à "l'ancienne" critique la multiplication des bibliothèques 94
  2. Apercevoir la troisième dimension ou l'utilisation multithreadée d'OpenGL dans Qt, un article des Qt Quarterly traduit par Guillaume Belz 0
  3. Les développeurs ignorent-ils trop les failles découvertes dans leur code ? Prenez-vous en compte les remarques des autres ? 17
  4. Pourquoi les programmeurs sont-ils moins payés que les gestionnaires de programmes ? Manquent-ils de pouvoir de négociation ? 42
  5. Quelles nouveautés de C++11 Visual C++ doit-il rapidement intégrer ? Donnez-nous votre avis 10
  6. Adieu qmake, bienvenue qbs : Qt Building Suite, un outil déclaratif et extensible pour la compilation de projets Qt 17
  7. 2017 : un quinquennat pour une nouvelle version du C++ ? Possible, selon Herb Sutter 6
Page suivante

Le Qt Labs au hasard

Logo

Le moteur de rendu OpenGL

Les Qt Labs sont les laboratoires des développeurs de Qt, où ils peuvent partager des impressions sur le framework, son utilisation, ce que pourrait être son futur. Lire l'article.

Communauté

Ressources

Liens utiles

Contact

  • Vous souhaitez rejoindre la rédaction ou proposer un tutoriel, une traduction, une question... ? Postez dans le forum Contribuez ou contactez-nous par MP ou par email (voir en bas de page).

Qt dans le magazine

Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt qtmobility-1.2
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web