返回介绍

QIODeviceSource Class

发布于 2019-10-04 15:00:52 字数 2535 浏览 1033 评论 0 收藏 0

The QIODeviceSource class is a QDataSource that draws data from a QIODevice. More...

#include <qasyncio.h>

Inherits QDataSource.

List of all member functions.

Public Members

  • QIODeviceSource ( QIODevice*device, intbuffer_size = 4096 )
  • ~QIODeviceSource ()
  • virtual int readyToSend ()
  • virtual void sendTo ( QDataSink*sink, intn )
  • virtual bool rewindable () const
  • virtual void enableRewind ( boolon )
  • virtual void rewind ()

Detailed Description

This class is obsolete. It is provided to keep old source working. We strongly advise against using it in new code.

The QIODeviceSource class is a QDataSource that draws data from a QIODevice.

This class encapsulates retrieving data from a QIODevice (such as a QFile).


Member Function Documentation

QIODeviceSource::QIODeviceSource ( QIODevice*device, intbuffer_size = 4096 )

Constructs a QIODeviceSource from the QIODevice device. The QIODevice must be dynamically allocated, becomes owned by the QIODeviceSource, and will be deleted when the QIODeviceSource is destroyed. buffer_size determines the size of buffering to use between asynchronous operations. The higher the buffer_size, the more efficient, but the less interleaved the operation will be with other processing.

QIODeviceSource::~QIODeviceSource ()

Destroys the QIODeviceSource, deleting the QIODevice from which it was constructed.

void QIODeviceSource::enableRewind ( boolon ) [virtual]

If on is set to TRUE then rewinding is enabled. No special action is taken. If on is set to FALSE then rewinding is disabled.

Reimplemented from QDataSource.

int QIODeviceSource::readyToSend () [virtual]

Ready until end-of-file.

Reimplemented from QDataSource.

void QIODeviceSource::rewind () [virtual]

Calls reset() on the QIODevice.

Reimplemented from QDataSource.

bool QIODeviceSource::rewindable () const [virtual]

All QIODeviceSource's are rewindable.

Reimplemented from QDataSource.

void QIODeviceSource::sendTo ( QDataSink*sink, intn ) [virtual]

Reads a block of data and sends up to n bytes to the sink.

Reimplemented from QDataSource.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文