Dokit
Native Qt library for Pokit devices
Loading...
Searching...
No Matches
pokitproducts.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2022-2024 Paul Colby <git@colby.id.au>
2// SPDX-License-Identifier: LGPL-3.0-or-later
3
4/*!
5 * \file
6 * Declares the #PokitProduct enumeration, and related helper functions.
7 */
8
9#ifndef QTPOKIT_POKITPRODUCTS_H
10#define QTPOKIT_POKITPRODUCTS_H
11
12#include "qtpokit_global.h"
13
14#include <QBluetoothDeviceInfo>
15#include <QFlags>
16#include <QString>
17
18QTPOKIT_BEGIN_NAMESPACE
19
20/// \brief Pokit products known to, and supported by, the QtPokit library.
21enum class PokitProduct : quint8 {
22 //PokitClamp = 3, ///< \todo Pokit Clamp
23 PokitMeter = 0, ///< Pokit Meter
24 PokitPro = 1, ///< Pokit Pro
25};
26Q_DECLARE_FLAGS(PokitProducts, PokitProduct)
27QTPOKIT_EXPORT QString toString(const PokitProduct product);
28
29QTPOKIT_EXPORT bool isPokitProduct(const QBluetoothDeviceInfo &info);
30
31QTPOKIT_EXPORT PokitProduct pokitProduct(const QBluetoothDeviceInfo &info);
32
33QTPOKIT_END_NAMESPACE
34
35#endif // QTPOKIT_POKITPRODUCTS_H
Encapsulates details specific to Pokit Meter devices.
Definition pokitmeter.h:19
Encapsulates details specific to Pokit Pro devices.
Definition pokitpro.h:19
QTPOKIT_EXPORT PokitProduct pokitProduct(const QBluetoothDeviceInfo &info)
Returns the PokitProduct corresponding the Bluetotoh device info.
Definition pokitproducts.cpp:55
PokitProduct
Pokit products known to, and supported by, the QtPokit library.
Definition pokitproducts.h:21
QTPOKIT_EXPORT QString toString(const PokitProduct product)
Returns product as user-friendly string.
Definition pokitproducts.cpp:26
QTPOKIT_EXPORT bool isPokitProduct(const QBluetoothDeviceInfo &info)
Returns true if info describes a Pokit device.
Definition pokitproducts.cpp:43
Global QtPokit library macros.