19 Q_PROPERTY(qreal percentage READ percentage NOTIFY percentageChanged)
20 Q_PROPERTY(
DeviceState state READ state NOTIFY stateChanged)
21 Q_PROPERTY(
DeviceType type READ type NOTIFY typeChanged)
22 Q_PROPERTY(qreal timeToEmpty READ timeToEmpty NOTIFY timeToEmptyChanged)
23 Q_PROPERTY(qreal timeToFull READ timeToFull NOTIFY timeToFullChanged)
24 Q_PROPERTY(qreal energy READ energy NOTIFY energyChanged)
25 Q_PROPERTY(qreal energyCapacity READ energyCapacity NOTIFY energyCapacityChanged)
26 Q_PROPERTY(qreal energyFullDesign READ energyFullDesign NOTIFY energyFullDesignChanged)
27 Q_PROPERTY(qreal energyRate READ energyRate NOTIFY energyRateChanged)
28 Q_PROPERTY(QString nativePath READ nativePath NOTIFY nativePathChanged)
29 Q_PROPERTY(QString model READ model NOTIFY modelChanged)
30 Q_PROPERTY(QString iconName READ iconName NOTIFY iconNameChanged)
31 Q_PROPERTY(
bool powerSupply READ powerSupply NOTIFY powerSupplyChanged)
32 Q_PROPERTY(
bool isPresent READ isPresent NOTIFY isPresentChanged)
33 Q_PROPERTY(
bool isLaptopBattery READ isLaptopBattery NOTIFY isLaptopBatteryChanged)
34 Q_PROPERTY(qreal healthPercentage READ healthPercentage NOTIFY healthPercentageChanged)
62 explicit
UPowerDevice(const QString& dbusPath, QObject* parent =
nullptr);
65 [[nodiscard]] QString dbusPath() const;
66 [[nodiscard]] qreal percentage() const;
69 [[nodiscard]] qreal timeToEmpty() const;
70 [[nodiscard]] qreal timeToFull() const;
71 [[nodiscard]] qreal energy() const;
72 [[nodiscard]] qreal energyCapacity() const;
73 [[nodiscard]] qreal energyFullDesign() const;
74 [[nodiscard]] qreal energyRate() const;
75 [[nodiscard]] QString nativePath() const;
76 [[nodiscard]] QString model() const;
77 [[nodiscard]] QString iconName() const;
78 [[nodiscard]]
bool powerSupply() const;
79 [[nodiscard]]
bool isPresent() const;
80 [[nodiscard]]
bool isLaptopBattery() const;
81 [[nodiscard]] qreal healthPercentage() const;
84 void percentageChanged();
87 void timeToEmptyChanged();
88 void timeToFullChanged();
90 void energyCapacityChanged();
91 void energyFullDesignChanged();
92 void energyRateChanged();
93 void nativePathChanged();
95 void iconNameChanged();
96 void powerSupplyChanged();
97 void isPresentChanged();
98 void isLaptopBatteryChanged();
99 void healthPercentageChanged();
100 void propertiesRefreshed();
103 void _q_onPropertiesChanged(const QString& iface, const QVariantMap& changed, const QStringList& invalidated);
107 std::unique_ptr<Private> d;