⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 qiodevice.3qt

📁 Linux下的基于X11的图形开发环境。
💻 3QT
📖 第 1 页 / 共 2 页
字号:
.SH "QIODevice::Offset"The offset within the device..SH MEMBER FUNCTION DOCUMENTATION.SH "QIODevice::QIODevice ()"Constructs an I/O device..SH "QIODevice::~QIODevice ()\fC [virtual]\fR"Destroys the I/O device..SH "Offset QIODevice::at () const\fC [virtual]\fR"Virtual function that returns the current I/O device position..PPThis is the position of the data read/write head of the I/O device..PPSee also size()..PPReimplemented in QSocket..SH "bool QIODevice::at ( Offset pos )\fC [virtual]\fR"Virtual function that sets the I/O device position to \fIpos\fR. Returns TRUE if the position was successfully set, i.e. \fIpos\fR is within range; otherwise returns FALSE..PPSee also size()..PPReimplemented in QSocket..SH "bool QIODevice::atEnd () const\fC [virtual]\fR"Virtual function that returns TRUE if the I/O device position is at the end of the input; otherwise returns FALSE..PPReimplemented in QFile and QSocket..SH "void QIODevice::close ()\fC [pure virtual]\fR"Closes the I/O device..PPThis virtual function must be reimplemented by all subclasses..PPSee also open()..PPReimplemented in QFile and QSocket..SH "int QIODevice::flags () const"Returns the current I/O device flags setting..PPFlags consists of mode flags and state flags..PPSee also mode() and state()..SH "void QIODevice::flush ()\fC [pure virtual]\fR"Flushes an open I/O device..PPThis virtual function must be reimplemented by all subclasses..PPReimplemented in QFile and QSocket..SH "int QIODevice::getch ()\fC [pure virtual]\fR"Reads a single byte/character from the I/O device..PPReturns the byte/character read, or -1 if the end of the I/O device has been reached..PPThis virtual function must be reimplemented by all subclasses..PPSee also putch() and ungetch()..PPReimplemented in QFile and QSocket..SH "bool QIODevice::isAsynchronous () const"Returns TRUE if the device is an asynchronous device; otherwise returns FALSE, i.e. if the device is a synchronous device..PPThis mode is currently not in use..PPSee also isSynchronous()..SH "bool QIODevice::isBuffered () const"Returns TRUE if the I/O device is a buffered device; otherwise returns FALSE, i.e. the device is a raw device..PPSee also isRaw()..SH "bool QIODevice::isCombinedAccess () const"Returns TRUE if the I/O device is a combined access (both direct and sequential) device; otherwise returns FALSE..PPThis access method is currently not in use..SH "bool QIODevice::isDirectAccess () const"Returns TRUE if the I/O device is a direct access device; otherwise returns FALSE, i.e. if the device is a sequential access device..PPSee also isSequentialAccess()..SH "bool QIODevice::isInactive () const"Returns TRUE if the I/O device state is 0, i.e. the device is not open; otherwise returns FALSE..PPSee also isOpen()..SH "bool QIODevice::isOpen () const"Returns TRUE if the I/O device has been opened; otherwise returns FALSE..PPSee also isInactive()..PPExample: network/networkprotocol/nntp.cpp..SH "bool QIODevice::isRaw () const"Returns TRUE if the device is a raw device; otherwise returns FALSE, i.e. if the device is a buffered device..PPSee also isBuffered()..SH "bool QIODevice::isReadWrite () const"Returns TRUE if the I/O device was opened using IO_ReadWrite mode; otherwise returns FALSE..PPSee also isReadable() and isWritable()..SH "bool QIODevice::isReadable () const"Returns TRUE if the I/O device was opened using IO_ReadOnly or IO_ReadWrite mode; otherwise returns FALSE..PPSee also isWritable() and isReadWrite()..SH "bool QIODevice::isSequentialAccess () const"Returns TRUE if the device is a sequential access device; otherwise returns FALSE, i.e. if the device is a direct access device..PPOperations involving size() and at(int) are not valid on sequential devices..PPSee also isDirectAccess()..SH "bool QIODevice::isSynchronous () const"Returns TRUE if the I/O device is a synchronous device; otherwise returns FALSE, i.e. the device is an asynchronous device..PPSee also isAsynchronous()..SH "bool QIODevice::isTranslated () const"Returns TRUE if the I/O device translates carriage-return and linefeed characters; otherwise returns FALSE..PPA QFile is translated if it is opened with the IO_Translate mode flag..SH "bool QIODevice::isWritable () const"Returns TRUE if the I/O device was opened using IO_WriteOnly or IO_ReadWrite mode; otherwise returns FALSE..PPSee also isReadable() and isReadWrite()..SH "int QIODevice::mode () const"Returns bits OR'ed together that specify the current operation mode..PPThese are the flags that were given to the open() function..PPThe flags are IO_ReadOnly, IO_WriteOnly, IO_ReadWrite, IO_Append, IO_Truncate and IO_Translate..SH "bool QIODevice::open ( int mode )\fC [pure virtual]\fR"Opens the I/O device using the specified \fImode\fR. Returns TRUE if the device was successfully opened; otherwise returns FALSE..PPThe mode parameter \fImode\fR must be an OR'ed combination of the following flags. <center>.nf.TSl - l. Mode flags Meaning IO_Raw specifies raw (unbuffered) file access. IO_ReadOnly opens a file in read-only mode. IO_WriteOnly opens a file in write-only mode. IO_ReadWrite opens a file in read/write mode. IO_Append sets the file index to the end of the file. IO_Truncate truncates the file. IO_Translate.TE.fi</center>.PPThis virtual function must be reimplemented by all subclasses..PPSee also close()..PPReimplemented in QFile and QSocket..SH "int QIODevice::putch ( int ch )\fC [pure virtual]\fR"Writes the character \fIch\fR to the I/O device..PPReturns \fIch\fR, or -1 if an error occurred..PPThis virtual function must be reimplemented by all subclasses..PPSee also getch() and ungetch()..PPReimplemented in QFile and QSocket..SH "QByteArray QIODevice::readAll ()\fC [virtual]\fR"This convenience function returns all of the remaining data in the device..SH "Q_LONG QIODevice::readBlock ( char * data, Q_ULONG maxlen )\fC [pure virtual]\fR"Reads at most \fImaxlen\fR bytes from the I/O device into \fIdata\fR and returns the number of bytes actually read..PPThis function should return -1 if a fatal error occurs and should return 0 if there are no bytes to read..PPThe device must be opened for reading, and \fIdata\fR must not be 0..PPThis virtual function must be reimplemented by all subclasses..PPSee also writeBlock(), isOpen(), and isReadable()..PPReimplemented in QSocket and QSocketDevice..SH "Q_LONG QIODevice::readLine ( char * data, Q_ULONG maxlen )\fC [virtual]\fR"Reads a line of text, (or up to \fImaxlen\fR bytes if a newline isn't encountered) plus a terminating '&#92;0' into \fIdata\fR. If there is a newline at the end if the line, it is not stripped..PPReturns the number of bytes read including the terminating '&#92;0', or -1 if an error occurred..PPThis virtual function can be reimplemented much more efficiently by the most subclasses..PPSee also readBlock() and QTextStream::readLine()..PPReimplemented in QFile..SH "bool QIODevice::reset ()"Sets the device index position to 0..PPSee also at()..SH "void QIODevice::resetStatus ()"Sets the I/O device status to IO_Ok..PPSee also status()..SH "Offset QIODevice::size () const\fC [pure virtual]\fR"Virtual function that returns the size of the I/O device..PPSee also at()..PPReimplemented in QFile and QSocket..SH "int QIODevice::state () const"Returns bits OR'ed together that specify the current state..PPThe flags are: \fCIO_Open\fR..PPSubclasses may define additional flags..SH "int QIODevice::status () const"Returns the I/O device status..PPThe I/O device status returns an error code. If open() returns FALSE or readBlock() or writeBlock() return -1, this function can be called to find out the reason why the operation failed..PP.PPThe status codes are: <center>.nf.TSl - l. Status code Meaning IO_Ok The operation was successful. IO_ReadError Could not read from the device. IO_WriteError Could not write to the device. IO_FatalError A fatal unrecoverable error occurred. IO_OpenError Could not open the device. IO_ConnectError Could not connect to the device. IO_AbortError The operation was unexpectedly aborted. IO_TimeOutError The operation timed out. IO_UnspecifiedError.TE.fi</center>.PPSee also resetStatus()..SH "int QIODevice::ungetch ( int ch )\fC [pure virtual]\fR"Puts the character \fIch\fR back into the I/O device and decrements the index position if it is not zero..PPThis function is normally called to "undo" a getch() operation..PPReturns \fIch\fR, or -1 if an error occurred..PPThis virtual function must be reimplemented by all subclasses..PPSee also getch() and putch()..PPReimplemented in QFile and QSocket..SH "Q_LONG QIODevice::writeBlock ( const char * data, Q_ULONG len )\fC [pure virtual]\fR"Writes \fIlen\fR bytes from \fIdata\fR to the I/O device and returns the number of bytes actually written..PPThis function should return -1 if a fatal error occurs..PPThis virtual function must be reimplemented by all subclasses..PPSee also readBlock()..PPReimplemented in QBuffer, QSocket, and QSocketDevice..SH "Q_LONG QIODevice::writeBlock ( const QByteArray & data )"This is an overloaded member function, provided for convenience. It behaves essentially like the above function..PPThis convenience function is the same as calling writeBlock(data.data(), data.size() )..SH "SEE ALSO".BR http://doc.trolltech.com/qiodevice.html.BR http://www.trolltech.com/faq/tech.html.SH COPYRIGHTCopyright 1992-2001 Trolltech AS, http://www.trolltech.com.  See thelicense file included in the distribution for a complete licensestatement..SH AUTHORGenerated automatically from the source code..SH BUGSIf you find a bug in Qt, please report it as described in.BR http://doc.trolltech.com/bughowto.html .Good bug reports help us to help you. Thank you..PThe definitive Qt documentation is provided in HTML format; it islocated at $QTDIR/doc/html and can be read using Qt Assistant or witha web browser. This man page is provided as a convenience for thoseusers who prefer man pages, although this format is not officiallysupported by Trolltech. .PIf you find errors in this manual page, please report them to.BR qt-bugs@trolltech.com .Please include the name of the manual page (qiodevice.3qt) and the Qtversion (3.1.1).

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -