added lightning bolt

This commit is contained in:
2026-09-17 00:32:35 -05:00
parent 114d7d546c
commit 6931b0f8b5
3 changed files with 93 additions and 21 deletions
+12 -2
View File
@@ -8,17 +8,25 @@ class SystemInfo : public QObject
{
Q_OBJECT
Q_PROPERTY(int batteryPercent
READ batteryPercent
NOTIFY batteryPercentChanged)
READ batteryPercent
NOTIFY batteryPercentChanged)
Q_PROPERTY(bool charging
READ charging
NOTIFY chargingChanged)
public:
explicit SystemInfo(QObject *parent = nullptr);
int batteryPercent() const;
bool charging() const;
signals:
void batteryPercentChanged();
void chargingChanged();
private slots:
void updateBattery();
@@ -28,4 +36,6 @@ private:
int m_batteryPercent = -1;
QString m_capacityPath;
QTimer m_batteryTimer;
bool m_charging = false;
};