Public Member Functions | Static Public Member Functions | Friends

QTime Class Reference

Search for all occurrences

Detailed Description

Definition at line 148 of file qdatetime.h.

#include <qdatetime.h>

List of all members.

Public Member Functions

  QTime ()
  QTime (int h, int m, int s=0, int ms=0)
bool  isNull () const
bool  isValid () const
int  hour () const
int  minute () const
int  second () const
int  msec () const
QString  toString (Qt::DateFormat f=Qt::TextDate) const
QString  toString (const QString &format) const
bool  setHMS (int h, int m, int s, int ms=0)
QTime  addSecs (int secs) const
int  secsTo (const QTime &) const
QTime  addMSecs (int ms) const
int  msecsTo (const QTime &) const
bool  operator== (const QTime &other) const
bool  operator!= (const QTime &other) const
bool  operator< (const QTime &other) const
bool  operator<= (const QTime &other) const
bool  operator> (const QTime &other) const
bool  operator>= (const QTime &other) const
void  start ()
int  restart ()
int  elapsed () const

Static Public Member Functions

static QTime  currentTime ()
static QTime  fromString (const QString &s, Qt::DateFormat f=Qt::TextDate)
static QTime  fromString (const QString &s, const QString &format)
static bool  isValid (int h, int m, int s, int ms=0)

Friends

class  QDateTime
class  QDateTimePrivate
Q_CORE_EXPORT QDataStream operator<< (QDataStream &, const QTime &)
Q_CORE_EXPORT QDataStream operator>> (QDataStream &, QTime &)

Constructor & Destructor Documentation

QTime ( ) [inline]

Definition at line 151 of file qdatetime.h.

           : mds(NullTime)
#if defined(Q_OS_WINCE)
        , startTick(NullTime)
#endif
    {}
QTime ( int  h,
int  m,
int  s = 0,
int  ms = 0 
)

Member Function Documentation

bool isNull ( ) const [inline]

Definition at line 158 of file qdatetime.h.

{ return mds == NullTime; }
bool isValid ( ) const
int hour ( ) const
int minute ( ) const
int second ( ) const
int msec ( ) const
QString toString ( Qt::DateFormat  f = Qt::TextDate ) const
QString toString ( const QString format ) const
bool setHMS ( int  h,
int  m,
int  s,
int  ms = 0 
)
QTime addSecs ( int  secs ) const
int secsTo ( const QTime ) const
QTime addMSecs ( int  ms ) const
int msecsTo ( const QTime ) const
bool operator== ( const QTime other ) const [inline]

Definition at line 176 of file qdatetime.h.

{ return mds == other.mds; }
bool operator!= ( const QTime other ) const [inline]

Definition at line 177 of file qdatetime.h.

{ return mds != other.mds; }
bool operator< ( const QTime other ) const [inline]

Definition at line 178 of file qdatetime.h.

{ return mds < other.mds; }
bool operator<= ( const QTime other ) const [inline]

Definition at line 179 of file qdatetime.h.

{ return mds <= other.mds; }
bool operator> ( const QTime other ) const [inline]

Definition at line 180 of file qdatetime.h.

{ return mds > other.mds; }
bool operator>= ( const QTime other ) const [inline]

Definition at line 181 of file qdatetime.h.

{ return mds >= other.mds; }
static QTime currentTime ( ) [static]
static QTime fromString ( const QString s,
Qt::DateFormat  f = Qt::TextDate 
) [static]
static QTime fromString ( const QString s,
const QString format 
) [static]
static bool isValid ( int  h,
int  m,
int  s,
int  ms = 0 
) [static]
void start ( )
int restart ( )
int elapsed ( ) const

Friends And Related Function Documentation

friend class QDateTime [friend]

Definition at line 205 of file qdatetime.h.

friend class QDateTimePrivate [friend]

Definition at line 206 of file qdatetime.h.

Q_CORE_EXPORT QDataStream& operator<< ( QDataStream ,
const QTime  
) [friend]
Q_CORE_EXPORT QDataStream& operator>> ( QDataStream ,
QTime  
) [friend]

The documentation for this class was generated from the following file:

QTime QTime QTime QTime QTime QTime QTime QTime QTime QTime
QTime QTime QTime QTime QTime QTime QTime QTime QTime QTime