Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions codeless banner

QNullSerialIODevice Class Reference
[QtBaseModule]

The QNullSerialIODevice class provides a null implementation of serial device functionality More...

    #include <QNullSerialIODevice>

Inherits QSerialIODevice.

Public Functions

Protected Functions

Additional Inherited Members


Detailed Description

The QNullSerialIODevice class provides a null implementation of serial device functionality

All bytes written to a QNullSerialIODevice instance are quietly ignored, and no data will ever arrive on the device.

This class can be used when a regular serial device could not be opened with QSerialPort::create(), but the application still needs a valid object.

See also QSerialIODevice and QSerialPort.


Member Function Documentation

QNullSerialIODevice::QNullSerialIODevice ( QObject * parent = 0 )

Create a null serial device and attach it to parent.

QNullSerialIODevice::~QNullSerialIODevice ()

Destruct this null serial device.

qint64 QNullSerialIODevice::bytesAvailable () const   [virtual]

Returns the number of bytes that are available on this null serial device (always 0).

Reimplemented from QIODevice.

void QNullSerialIODevice::close ()   [virtual]

Closes this null serial device.

Reimplemented from QIODevice.

bool QNullSerialIODevice::isValid () const   [virtual]

This override always returns false.

Reimplemented from QSerialIODevice.

bool QNullSerialIODevice::open ( OpenMode mode )

Opens this null serial device in mode. Returns true if the device can be opened; false otherwise.

qint64 QNullSerialIODevice::readData ( char * data, qint64 maxlen )   [virtual protected]

Read up to maxlen bytes of data from this serial device into data.

Reimplemented from QIODevice.

qint64 QNullSerialIODevice::writeData ( const char * data, qint64 len )   [virtual protected]

Write len bytes from data.

Reimplemented from QIODevice.


Copyright © 2009 Nokia Trademarks
Qt Extended 4.4.3