Dokit
Internal development documentation
|
Declares the PokitProduct enumeration, and related helper functions. More...
Go to the source code of this file.
Enumerations | |
enum class | PokitProduct : quint8 { PokitMeter = 0 , PokitPro = 1 } |
Pokit products known to, and supported by, the QtPokit library. More... | |
Functions | |
QTPOKIT_EXPORT QString | toString (const PokitProduct product) |
Returns product as user-friendly string. | |
QTPOKIT_EXPORT bool | isPokitProduct (const QBluetoothDeviceInfo &info) |
Returns true if info describes a Pokit device. | |
QTPOKIT_EXPORT PokitProduct | pokitProduct (const QBluetoothDeviceInfo &info) |
Returns the PokitProduct corresponding the Bluetotoh device info. | |
Declares the PokitProduct enumeration, and related helper functions.
Definition in file pokitproducts.h.
|
strong |
Pokit products known to, and supported by, the QtPokit library.
Enumerator | |
---|---|
PokitMeter | Pokit Meter. |
PokitPro | Pokit Pro. |
Definition at line 21 of file pokitproducts.h.
QTPOKIT_EXPORT bool isPokitProduct | ( | const QBluetoothDeviceInfo & | info | ) |
Returns true
if info describes a Pokit device.
Currently, this is based on whether or not info's service UUIDs includes a known Pokit Status service, but this test criteria might be swapped for something else sometime.
Definition at line 43 of file pokitproducts.cpp.
References isPokitProduct(), and QBluetoothDeviceInfo::serviceUuids().
Referenced by PokitDiscoveryAgentPrivate::deviceDiscovered(), DeviceCommand::deviceDiscovered(), PokitDiscoveryAgentPrivate::deviceUpdated(), isPokitProduct(), and isPokitProduct().
QTPOKIT_EXPORT PokitProduct pokitProduct | ( | const QBluetoothDeviceInfo & | info | ) |
Returns the PokitProduct corresponding the Bluetotoh device info.
If info is not a Pokit device, then result is undefined.
Definition at line 55 of file pokitproducts.cpp.
References pokitProduct(), and QBluetoothDeviceInfo::serviceUuids().
Referenced by DeviceCommand::deviceDiscovered(), pokitProduct(), and pokitProduct().
QTPOKIT_EXPORT QString toString | ( | const PokitProduct | product | ) |
Returns product
as user-friendly string.
Definition at line 26 of file pokitproducts.cpp.
References QString::arg(), PokitMeter, PokitPro, and QCoreApplication::translate().
Referenced by AbstractPokitServicePrivate::createServiceObject(), and DeviceCommand::deviceDiscovered().