Changeset View
Changeset View
Standalone View
Standalone View
src/solid/devices/backends/fakehw/fakebattery.cpp
Show First 20 Lines • Show All 52 Lines • ▼ Show 20 Line(s) | 42 | { | |||
---|---|---|---|---|---|
53 | } else if (name == "keyboard") { | 53 | } else if (name == "keyboard") { | ||
54 | return Solid::Battery::KeyboardBattery; | 54 | return Solid::Battery::KeyboardBattery; | ||
55 | } else if (name == "keyboard_mouse") { | 55 | } else if (name == "keyboard_mouse") { | ||
56 | return Solid::Battery::KeyboardMouseBattery; | 56 | return Solid::Battery::KeyboardMouseBattery; | ||
57 | } else if (name == "camera") { | 57 | } else if (name == "camera") { | ||
58 | return Solid::Battery::CameraBattery; | 58 | return Solid::Battery::CameraBattery; | ||
59 | } else if (name == "gaminginput") { | 59 | } else if (name == "gaminginput") { | ||
60 | return Solid::Battery::GamingInputBattery; | 60 | return Solid::Battery::GamingInputBattery; | ||
61 | } else if (name == "bluetooth") { | ||||
62 | return Solid::Battery::BluetoothBattery; | ||||
61 | } else { | 63 | } else { | ||
62 | return Solid::Battery::UnknownBattery; | 64 | return Solid::Battery::UnknownBattery; | ||
63 | } | 65 | } | ||
64 | } | 66 | } | ||
65 | 67 | | |||
66 | int FakeBattery::chargePercent() const | 68 | int FakeBattery::chargePercent() const | ||
67 | { | 69 | { | ||
68 | int last_full = fakeDevice()->property("lastFullLevel").toInt(); | 70 | int last_full = fakeDevice()->property("lastFullLevel").toInt(); | ||
▲ Show 20 Lines • Show All 138 Lines • Show Last 20 Lines |