Dokit
dev
v0.6.0
v0.5.8
v0.5.7
v0.5.6
v0.5.5
v0.5.4
v0.5.3
v0.5.2
v0.5.1
v0.5.0
v0.4.0
v0.3.0
v0.2.0
v0.1.2
v0.1.1
v0.1.0
User docs
Internal
Coverage
Internal development documentation
Toggle main menu visibility
Loading...
Searching...
No Matches
flashledcommand.h
1
// SPDX-FileCopyrightText: 2022-2026 Paul Colby <git@colby.id.au>
2
// SPDX-License-Identifier: LGPL-3.0-or-later
3
4
#include "devicecommand.h"
5
6
QTPOKIT_FORWARD_DECLARE_CLASS
(
StatusService
)
7
8
class
FlashLedCommand
: public
DeviceCommand
9
{
10
Q_OBJECT
11
12
public
:
13
explicit
FlashLedCommand
(
QObject
*
const
parent
=
nullptr
);
14
15
QStringList
requiredOptions
(
const
QCommandLineParser
&parser)
const override
;
16
QStringList
supportedOptions
(
const
QCommandLineParser
&parser)
const override
;
17
18
public
slots:
19
QStringList
processOptions
(
const
QCommandLineParser
&parser)
override
;
20
21
protected
:
22
AbstractPokitService
*
getService
()
override
;
23
24
protected
slots:
25
void
serviceDetailsDiscovered
()
override
;
26
27
private
:
28
StatusService
*
service
{
nullptr
};
///< Bluetooth service this command interacts with.
29
30
private
slots:
31
void
deviceLedFlashed();
32
33
QTPOKIT_BEFRIEND_TEST
(
FlashLedCommand
)
34
};
AbstractPokitService
The AbstractPokitService class provides a common base for Pokit services classes.
Definition
abstractpokitservice.h:27
DeviceCommand::DeviceCommand
DeviceCommand(QObject *const parent=nullptr)
Construct a new DeviceCommand object with parent.
Definition
devicecommand.cpp:21
FlashLedCommand
The FlashLedCommand class implements the flash-led CLI command.
Definition
flashledcommand.h:9
FlashLedCommand::supportedOptions
QStringList supportedOptions(const QCommandLineParser &parser) const override
Returns a list of CLI option names supported by this command.
Definition
flashledcommand.cpp:34
FlashLedCommand::requiredOptions
QStringList requiredOptions(const QCommandLineParser &parser) const override
Returns a list of CLI option names required by this command.
Definition
flashledcommand.cpp:28
FlashLedCommand::service
StatusService * service
Bluetooth service this command interacts with.
Definition
flashledcommand.h:28
FlashLedCommand::FlashLedCommand
FlashLedCommand(QObject *const parent=nullptr)
Construct a new FlashLedCommand object with parent.
Definition
flashledcommand.cpp:23
FlashLedCommand::processOptions
QStringList processOptions(const QCommandLineParser &parser) override
Processes the relevant options from the command line parser.
Definition
flashledcommand.cpp:45
FlashLedCommand::getService
AbstractPokitService * getService() override
Returns a Pokit service object for the derived command class.
Definition
flashledcommand.cpp:60
FlashLedCommand::serviceDetailsDiscovered
void serviceDetailsDiscovered() override
Handles service detail discovery events.
Definition
flashledcommand.cpp:77
StatusService
The StatusService class accesses the Pokit Status service of Pokit devices.
Definition
statusservice.h:23
QCommandLineParser
QObject::QObject
QObject(QObject *parent)
QObject::Q_OBJECT
Q_OBJECTQ_OBJECT
QObject::parent
QObject * parent() const const
QStringList
QTPOKIT_FORWARD_DECLARE_CLASS
#define QTPOKIT_FORWARD_DECLARE_CLASS(name)
Macro for forward declaring classes in the QtPokit library's top-most namespace (if one is defined).
Definition
qtpokit_global.h:94
QTPOKIT_BEFRIEND_TEST
#define QTPOKIT_BEFRIEND_TEST(Class)
Macro for befriending a related unit test class, but only when QT_TESTLIB_LIB is defined.
Definition
qtpokit_global.h:118
dokit
dokit
src
cli
flashledcommand.h
Generated by
1.18.0