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  · 

QMediaTimeInterval Class Reference

The QMediaTimeInterval class represents a time interval with integer precision. More...

 #include <QMediaTimeInterval>

This class was introduced in Qt Mobility 1.0.

Public Functions

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

Detailed Description

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.

Member Function Documentation

QMediaTimeInterval::QMediaTimeInterval ()

Constructs an empty interval.

QMediaTimeInterval::QMediaTimeInterval ( qint64 start, qint64 end )

Constructs an interval with the specified start and end times.

This function was introduced in Qt Mobility 1.0.

QMediaTimeInterval::QMediaTimeInterval ( const QMediaTimeInterval & other )

Constructs an interval by taking a copy of other.

This function was introduced in Qt Mobility 1.0.

bool QMediaTimeInterval::contains ( qint64 time ) const

Returns true if the time interval contains the specified time. That is, start() <= time <= end().

This function was introduced in Qt Mobility 1.0.

qint64 QMediaTimeInterval::end () const

Returns the end time of the interval.

This function was introduced in Qt Mobility 1.0.

See also start().

bool QMediaTimeInterval::isNormal () const

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

QMediaTimeInterval QMediaTimeInterval::normalized () const

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.

qint64 QMediaTimeInterval::start () const

Returns the start time of the interval.

This function was introduced in Qt Mobility 1.0.

See also end().

QMediaTimeInterval QMediaTimeInterval::translated ( qint64 offset ) const

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.

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 53
  2. Les développeurs ignorent-ils trop les failles découvertes dans leur code ? Prenez-vous en compte les remarques des autres ? 17
  3. Apercevoir la troisième dimension ou l'utilisation multithreadée d'OpenGL dans Qt, un article des Qt Quarterly traduit par Guillaume Belz 0
  4. BlackBerry 10 : premières images du prochain OS de RIM qui devrait intégrer des widgets et des tuiles inspirées de Windows Phone 0
  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. La rubrique Qt a besoin de vous ! 1
Page suivante

Le Qt Quarterly au hasard

Logo

XQuery et la météo

Qt Quarterly est la revue trimestrielle proposée par Nokia et à destination des développeurs Qt. Ces articles d'une grande qualité technique sont rédigés par des experts Qt. 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