Logo Search packages:      
Sourcecode: qt4-x11 version File versions  Download package

qint64 QIODevice::pos (  )  const [virtual, inherited]

For random-access devices, this function returns the position that data is written to or read from. For sequential devices or closed devices, where there is no concept of a "current position", 0 is returned.

The current read/write position of the device is maintained internally by QIODevice, so reimplementing this function is not necessary. When subclassing QIODevice, use QIODevice::seek() to notify QIODevice about changes in the device position.

See also:
isSequential(), seek()

Reimplemented in QBuffer, and QFile.

Definition at line 565 of file qiodevice.cpp.

Referenced by QPicture::exec(), QPictureIO::pictureFormat(), QFile::pos(), QBuffer::pos(), QMovie::QMovie(), and QDataStream::skipRawData().

{
    Q_D(const QIODevice);
#if defined QIODEVICE_DEBUG
    printf("%p QIODevice::pos() == %d\n", this, int(d->pos));
#endif
    return d->pos;
}


Generated by  Doxygen 1.6.0   Back to index