BluezQt

declarativebattery.h
1/*
2 * BluezQt - Asynchronous BlueZ wrapper library
3 *
4 * SPDX-FileCopyrightText: 2019 Kai Uwe Broulik <kde@broulik.de>
5 *
6 * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
7 */
8
9#ifndef DECLARATIVEBATTERY_H
10#define DECLARATIVEBATTERY_H
11
12#include "battery.h"
13
14class DeclarativeBattery : public QObject
15{
17 Q_PROPERTY(int percentage READ percentage NOTIFY percentageChanged)
18
19public:
20 explicit DeclarativeBattery(const BluezQt::BatteryPtr &battery, QObject *parent = nullptr);
21
22 int percentage() const;
23
25 void percentageChanged(int percentage);
26
27private:
28 BluezQt::BatteryPtr m_battery;
29};
30
31#endif // DECLARATIVEBATTERY_H
Q_OBJECTQ_OBJECT
Q_PROPERTY(...)
Q_SIGNALSQ_SIGNALS
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:13:51 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.