TSerialPortWrapper Class
QSerialPort的包装 More...
| Header: | #include <TSerialPortWrapper> |
| Inherits: | QObject |
Public Functions
| TSerialPortWrapper(QObject *iParent = nullptr) | |
| ~TSerialPortWrapper() |
- 31 public functions inherited from QObject
Public Slots
| int | baudRate() const |
| qint64 | bytesAvailable() |
| qint64 | bytesToWrite() |
| void | close() |
| int | dataBits() const |
| QString | errorString() const |
| QString | flowControl() const |
| bool | isDataTerminalReady() |
| bool | isOpen() |
| bool | isRequestToSend() |
| bool | open(const QString &iMode = "rw") |
| QString | parity() const |
| QString | portName() const |
| QString | readAll() |
| bool | setBaudRate(int iBaudRate) |
| bool | setDataBits(int iDataBits) |
| bool | setDataTerminalReady(bool iSet) |
| bool | setFlowControl(const QString &iFlowStr) |
| bool | setParity(const QString &iParityStr) |
| void | setPortName(const QString &iName) |
| bool | setRequestToSend(bool iSet) |
| bool | setStopBits(const QString &iStopBits) |
| QString | stopBits() const |
| bool | waitForBytesWritten(int iMsec) |
| qint64 | write(const QString &iData) |
- 1 public slot inherited from QObject
Signals
| void | readyRead() |
- 2 signals inherited from QObject
Additional Inherited Members
- 1 property inherited from QObject
- 1 public variable inherited from QObject
- 10 static public members inherited from QObject
- 9 protected functions inherited from QObject
- 2 protected variables inherited from QObject
Detailed Description
QSerialPort的包装
var sp = new TSerialPort;
Member Function Documentation
TSerialPortWrapper::TSerialPortWrapper(QObject *iParent = nullptr)
Default constructs an instance of TSerialPortWrapper.
TSerialPortWrapper::~TSerialPortWrapper()
Destroys the instance of TSerialPortWrapper.
[slot] int TSerialPortWrapper::baudRate() const
See also setBaudRate().
[slot] qint64 TSerialPortWrapper::bytesAvailable()
[slot] qint64 TSerialPortWrapper::bytesToWrite()
[slot] void TSerialPortWrapper::close()
[slot] int TSerialPortWrapper::dataBits() const
See also setDataBits().
[slot] QString TSerialPortWrapper::errorString() const
[slot] QString TSerialPortWrapper::flowControl() const
See also setFlowControl().
[slot] bool TSerialPortWrapper::isDataTerminalReady()
[slot] bool TSerialPortWrapper::isOpen()
[slot] bool TSerialPortWrapper::isRequestToSend()
[slot] bool TSerialPortWrapper::open(const QString &iMode = "rw")
[slot] QString TSerialPortWrapper::parity() const
See also setParity().
[slot] QString TSerialPortWrapper::portName() const
See also setPortName().
[slot] QString TSerialPortWrapper::readAll()
[signal] void TSerialPortWrapper::readyRead()
[slot] bool TSerialPortWrapper::setBaudRate(int iBaudRate)
See also baudRate().
[slot] bool TSerialPortWrapper::setDataBits(int iDataBits)
See also dataBits().
[slot] bool TSerialPortWrapper::setDataTerminalReady(bool iSet)
See also isDataTerminalReady().
[slot] bool TSerialPortWrapper::setFlowControl(const QString &iFlowStr)
Sets the flow control. Options: Hardware | Software
See also flowControl().
[slot] bool TSerialPortWrapper::setParity(const QString &iParityStr)
setParity.Sets the parity. Options: None | Even | Odd | Space | Mark
See also parity().
[slot] void TSerialPortWrapper::setPortName(const QString &iName)
See also portName().
[slot] bool TSerialPortWrapper::setRequestToSend(bool iSet)
See also isRequestToSend().
[slot] bool TSerialPortWrapper::setStopBits(const QString &iStopBits)
Sets the number of stop bits. Options: 1 | 1.5 | 2
See also stopBits().
[slot] QString TSerialPortWrapper::stopBits() const
See also setStopBits().