QIODeviceBase Class
The QIODeviceBase class provides the open mode flags shared by I/O devices. More…
| Header | #include <QIODeviceBase> |
|---|---|
| CMake | target_link_libraries(app PRIVATE Nt::Core) |
| Module | Nt Core C++ Classes |
| Inherited by | QIODevice |
List of all members, including inherited members
Public Types
| enum | OpenModeFlag |
| typedef | OpenMode |
Detailed Description
QIODeviceBase is the base class of QIODevice. It holds the OpenModeFlag enum and the OpenMode flags type, so that they can be named through any device class, for example as QFile::ReadOnly.
See also QIODevice.
Differences from Qt
QIODeviceBase has no other members.
Member Type Documentation
typedef QIODeviceBase::OpenMode
The OpenMode type is a typedef for QFlags<OpenModeFlag>. It stores an OR combination of OpenModeFlag values.
enum QIODeviceBase::OpenModeFlag
Describes how a device is opened. The OpenMode type is a typedef for QFlags<OpenModeFlag>.
| Constant | Description |
|---|---|
QIODeviceBase::NotOpen | The device is not open. |
QIODeviceBase::ReadOnly | The device is open for reading. |
QIODeviceBase::WriteOnly | The device is open for writing. Note that this mode implies Truncate for files unless Append or ReadOnly is also given. |
QIODeviceBase::ReadWrite | The device is open for reading and writing. |
QIODeviceBase::Append | The device is opened in append mode, so that all data is written to the end of the file. Implies WriteOnly for files. |
QIODeviceBase::Truncate | If possible, the device is truncated before it is opened. All earlier contents are lost. Implies WriteOnly for files. |
QIODeviceBase::Text | Marks the device as a text device. QFile does not translate line endings. |
QIODeviceBase::Unbuffered | Accepted for compatibility; devices in Nt do not change their behavior. |
QIODeviceBase::NewOnly | Fail if the file to be opened already exists. Create and open the file only if it does not exist. |
QIODeviceBase::ExistingOnly | Fail if the file to be opened does not exist. |