Class QfSerialPortModel
#include <qfserialportmodel.h>
Inherits the following classes: QAbstractListModel
Public Types
| Type | Name |
|---|---|
| enum | Roles The roles provided by this model. |
Public Functions
| Type | Name |
|---|---|
| QfSerialPortModel (QObject * parent=nullptr) |
|
| QVariant | data (const QModelIndex & index, int role=Qt::DisplayRole) override const |
| Q_INVOKABLE int | findIndexFromName (const QString & name) const |
| Q_INVOKABLE void | refresh () |
| QHash< int, QByteArray > | roleNames () override const |
| int | rowCount (const QModelIndex & parent=QModelIndex()) override const |
Detailed Description
A model that provides serial ports available on the device.
Public Types Documentation
enum Roles
The roles provided by this model.
enum QfSerialPortModel::Roles {
PortNameRole = Qt::UserRole + 1,
DescriptionRole
};
Public Functions Documentation
function QfSerialPortModel
explicit QfSerialPortModel::QfSerialPortModel (
QObject * parent=nullptr
)
function data
QVariant QfSerialPortModel::data (
const QModelIndex & index,
int role=Qt::DisplayRole
) override const
function findIndexFromName
Q_INVOKABLE int QfSerialPortModel::findIndexFromName (
const QString & name
) const
Returns the row index for a given serial port name.
function refresh
Q_INVOKABLE void QfSerialPortModel::refresh ()
Refresh the list of available serial ports.
function roleNames
QHash< int, QByteArray > QfSerialPortModel::roleNames () override const
function rowCount
int QfSerialPortModel::rowCount (
const QModelIndex & parent=QModelIndex()
) override const
The documentation for this class was generated from the following file src/core/positioning/qfserialportmodel.h