- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Directories
- Examples

- Class List
- Class Hierarchy
- Class Members

Public Types | Signals | Public Member Functions | Protected Member Functions

# QIODevice Class Reference

Search for all occurrences

## Detailed Description

Definition at line 66 of file qiodevice.h.

`#include <qiodevice.h>`

Inheritance diagram for QIODevice:
[legend]

List of all members.

## Public Types
enum | OpenModeFlag { NotOpen = 0x0000, ReadOnly = 0x0001, WriteOnly = 0x0002, ReadWrite = ReadOnly | WriteOnly, Append = 0x0004, Truncate = 0x0008, Text = 0x0010, Unbuffered = 0x0020 }
## Signals
void | readyRead ()
void | bytesWritten (qint64 bytes)
void | aboutToClose ()
void | readChannelFinished ()
## Public Member Functions
| QIODevice ()
| QIODevice (QObject *parent)
virtual | ~QIODevice ()
OpenMode | openMode () const
void | setTextModeEnabled (bool enabled)
bool | isTextModeEnabled () const
bool | isOpen () const
bool | isReadable () const
bool | isWritable () const
virtual bool | isSequential () const
virtual bool | open (OpenMode mode)
virtual void | close ()
virtual qint64 | pos () const
virtual qint64 | size () const
virtual bool | seek (qint64 pos)
virtual bool | atEnd () const
virtual bool | reset ()
virtual qint64 | bytesAvailable () const
virtual qint64 | bytesToWrite () const
qint64 | read (char *data, qint64 maxlen)
QByteArray | read (qint64 maxlen)
QByteArray | readAll ()
qint64 | readLine (char *data, qint64 maxlen)
QByteArray | readLine (qint64 maxlen=0)
virtual bool | canReadLine () const
qint64 | write (const char *data, qint64 len)
qint64 | write (const char *data)
qint64 | write (const QByteArray &data)
qint64 | peek (char *data, qint64 maxlen)
QByteArray | peek (qint64 maxlen)
virtual bool | waitForReadyRead (int msecs)
virtual bool | waitForBytesWritten (int msecs)
void | ungetChar (char c)
bool | putChar (char c)
bool | getChar (char *c)
QString | errorString () const
## Protected Member Functions
| QIODevice (QIODevicePrivate &dd, QObject *parent=0)
virtual qint64 | readData (char *data, qint64 maxlen)=0
virtual qint64 | readLineData (char *data, qint64 maxlen)
virtual qint64 | writeData (const char *data, qint64 len)=0
void | setOpenMode (OpenMode openMode)
void | setErrorString (const QString &errorString)

## Member Enumeration Documentation

enum OpenModeFlag

Search for all occurrences

Enumerator:

  NotOpen | Search for all occurrences
  ReadOnly | Search for all occurrences
  WriteOnly | Search for all occurrences
  ReadWrite | Search for all occurrences
  Append | Search for all occurrences
  Truncate | Search for all occurrences
  Text | Search for all occurrences
  Unbuffered | Search for all occurrences

Definition at line 75 of file qiodevice.h.

                          {
            NotOpen = 0x0000,
            ReadOnly = 0x0001,
            WriteOnly = 0x0002,
            ReadWrite = ReadOnly | WriteOnly,
            Append = 0x0004,
            Truncate = 0x0008,
            Text = 0x0010,
            Unbuffered = 0x0020
        };

## Constructor & Destructor Documentation

QIODevice | ( |  | ) |

QIODevice | ( | QObject * | parent | ) | `[explicit]`

virtual ~QIODevice | ( |  | ) | `[virtual]`

QIODevice | ( | QIODevicePrivate & | dd,
|  | QObject * | parent = `0`
| ) |  | `[protected]`

## Member Function Documentation

OpenMode openMode | ( |  | ) | const

Search for all occurrences

void setTextModeEnabled | ( | bool | enabled | ) |

Search for all occurrences

bool isTextModeEnabled | ( |  | ) | const

Search for all occurrences

bool isOpen | ( |  | ) | const

Search for all occurrences

bool isReadable | ( |  | ) | const

Search for all occurrences

bool isWritable | ( |  | ) | const

Search for all occurrences

virtual bool isSequential | ( |  | ) | const `[virtual]`

Search for all occurrences

Reimplemented in QFile, QProcess, QAuthDevice, QAbstractSocket, QLocalSocket, and QNetworkReply.

virtual bool open | ( | OpenMode | mode | ) | `[virtual]`

Search for all occurrences

Reimplemented in QBuffer, QFile, and QTemporaryFile.

virtual void close | ( |  | ) | `[virtual]`

Search for all occurrences

Reimplemented in QBuffer, QFile, QProcess, QAbstractSocket, QLocalSocket, QNetworkReply, and QSslSocket.

virtual qint64 pos | ( |  | ) | const `[virtual]`

Search for all occurrences

Reimplemented in QBuffer, and QFile.

virtual qint64 size | ( |  | ) | const `[virtual]`

Search for all occurrences

Reimplemented in QBuffer, and QFile.

virtual bool seek | ( | qint64 | pos | ) | `[virtual]`

Search for all occurrences

Reimplemented in QBuffer, QFile, and QAuthDevice.

virtual bool atEnd | ( |  | ) | const `[virtual]`

Search for all occurrences

Reimplemented in QBuffer, QFile, QProcess, QAuthDevice, QAbstractSocket, and QSslSocket.

virtual bool reset | ( |  | ) | `[virtual]`

Search for all occurrences

virtual qint64 bytesAvailable | ( |  | ) | const `[virtual]`

Search for all occurrences

Reimplemented in QProcess, QAuthDevice, QAbstractSocket, QLocalSocket, and QSslSocket.

virtual qint64 bytesToWrite | ( |  | ) | const `[virtual]`

Search for all occurrences

Reimplemented in QProcess, QAuthDevice, QAbstractSocket, QLocalSocket, and QSslSocket.

qint64 read | ( | char * | data,
|  | qint64 | maxlen
| ) |  |

Search for all occurrences

QByteArray read | ( | qint64 | maxlen | ) |

Search for all occurrences

QByteArray readAll | ( |  | ) |

Search for all occurrences

qint64 readLine | ( | char * | data,
|  | qint64 | maxlen
| ) |  |

Search for all occurrences

QByteArray readLine | ( | qint64 | maxlen = `0` | ) |

Search for all occurrences

virtual bool canReadLine | ( |  | ) | const `[virtual]`

Search for all occurrences

Reimplemented in QBuffer, QProcess, QAbstractSocket, QLocalSocket, and QSslSocket.

qint64 write | ( | const char * | data,
|  | qint64 | len
| ) |  |

Search for all occurrences

Examples:
  STLExport/STLExporter.cpp.

qint64 write | ( | const char * | data | ) |

Search for all occurrences

qint64 write | ( | const QByteArray & | data | ) | `[inline]`

Search for all occurrences

Definition at line 126 of file qiodevice.h.

        { return write(data.constData(), data.size()); }

qint64 peek | ( | char * | data,
|  | qint64 | maxlen
| ) |  |

Search for all occurrences

QByteArray peek | ( | qint64 | maxlen | ) |

Search for all occurrences

virtual bool waitForReadyRead | ( | int | msecs | ) | `[virtual]`

Search for all occurrences

Reimplemented in QProcess, QAbstractSocket, QLocalSocket, and QSslSocket.

virtual bool waitForBytesWritten | ( | int | msecs | ) | `[virtual]`

Search for all occurrences

Reimplemented in QProcess, QAbstractSocket, QLocalSocket, and QSslSocket.

void ungetChar | ( | char | c | ) |

Search for all occurrences

bool putChar | ( | char | c | ) |

Search for all occurrences

bool getChar | ( | char * | c | ) |

Search for all occurrences

QString errorString | ( |  | ) | const

Search for all occurrences

void readyRead | ( |  | ) | `[signal]`

Search for all occurrences

void bytesWritten | ( | qint64 | bytes | ) | `[signal]`

Search for all occurrences

void aboutToClose | ( |  | ) | `[signal]`

Search for all occurrences

void readChannelFinished | ( |  | ) | `[signal]`

Search for all occurrences

virtual qint64 readData | ( | char * | data,
|  | qint64 | maxlen
| ) |  | `[protected, pure virtual]`

Search for all occurrences

Implemented in QBuffer, QFile, QProcess, QAuthDevice, QAbstractSocket, QLocalSocket, and QSslSocket.

virtual qint64 readLineData | ( | char * | data,
|  | qint64 | maxlen
| ) |  | `[protected, virtual]`

Search for all occurrences

Reimplemented in QFile, and QAbstractSocket.

virtual qint64 writeData | ( | const char * | data,
|  | qint64 | len
| ) |  | `[protected, pure virtual]`

Search for all occurrences

Implemented in QBuffer, QFile, QProcess, QAuthDevice, QAbstractSocket, QLocalSocket, QNetworkReply, and QSslSocket.

void setOpenMode | ( | OpenMode | openMode | ) | `[protected]`

Search for all occurrences

void setErrorString | ( | const QString & | errorString | ) | `[protected]`

Search for all occurrences

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

- QtCore/qiodevice.h

QIODevice QIODevice QIODevice QIODevice QIODevice QIODevice QIODevice QIODevice QIODevice QIODevice
QIODevice QIODevice QIODevice QIODevice QIODevice QIODevice QIODevice QIODevice QIODevice QIODevice