added lightning bolt
This commit is contained in:
+12
-2
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user