Changeset View
Changeset View
Standalone View
Standalone View
dataengines/soliddevice/soliddeviceengine.cpp
Show First 20 Lines • Show All 396 Lines • ▼ Show 20 Line(s) | 393 | if (device.is<Solid::Battery>()) { | |||
---|---|---|---|---|---|
397 | } | 397 | } | ||
398 | 398 | | |||
399 | devicetypes << I18N_NOOP("Battery"); | 399 | devicetypes << I18N_NOOP("Battery"); | ||
400 | 400 | | |||
401 | QStringList batterytype; | 401 | QStringList batterytype; | ||
402 | batterytype << I18N_NOOP("Unknown Battery") << I18N_NOOP("PDA Battery") << I18N_NOOP("UPS Battery") | 402 | batterytype << I18N_NOOP("Unknown Battery") << I18N_NOOP("PDA Battery") << I18N_NOOP("UPS Battery") | ||
403 | << I18N_NOOP("Primary Battery") << I18N_NOOP("Mouse Battery") << I18N_NOOP("Keyboard Battery") | 403 | << I18N_NOOP("Primary Battery") << I18N_NOOP("Mouse Battery") << I18N_NOOP("Keyboard Battery") | ||
404 | << I18N_NOOP("Keyboard Mouse Battery") << I18N_NOOP("Camera Battery") << I18N_NOOP("Phone Battery") | 404 | << I18N_NOOP("Keyboard Mouse Battery") << I18N_NOOP("Camera Battery") << I18N_NOOP("Phone Battery") | ||
405 | << I18N_NOOP("Monitor Battery"); | 405 | << I18N_NOOP("Monitor Battery") << I18N_NOOP("Gaming Input Battery"); | ||
406 | 406 | | |||
407 | QStringList chargestate; | 407 | QStringList chargestate; | ||
408 | chargestate << I18N_NOOP("Not Charging") << I18N_NOOP("Charging") << I18N_NOOP("Discharging") << I18N_NOOP("Fully Charged"); | 408 | chargestate << I18N_NOOP("Not Charging") << I18N_NOOP("Charging") << I18N_NOOP("Discharging") << I18N_NOOP("Fully Charged"); | ||
409 | 409 | | |||
410 | setData(name, I18N_NOOP("Plugged In"), battery->isPresent()); // FIXME Rename when interested parties are adjusted | 410 | setData(name, I18N_NOOP("Plugged In"), battery->isPresent()); // FIXME Rename when interested parties are adjusted | ||
411 | setData(name, I18N_NOOP("Type"), batterytype.at((int)battery->type())); | 411 | setData(name, I18N_NOOP("Type"), batterytype.value((int)battery->type())); | ||
412 | setData(name, I18N_NOOP("Charge Percent"), battery->chargePercent()); | 412 | setData(name, I18N_NOOP("Charge Percent"), battery->chargePercent()); | ||
413 | setData(name, I18N_NOOP("Rechargeable"), battery->isRechargeable()); | 413 | setData(name, I18N_NOOP("Rechargeable"), battery->isRechargeable()); | ||
414 | setData(name, I18N_NOOP("Charge State"), chargestate.at((int)battery->chargeState())); | 414 | setData(name, I18N_NOOP("Charge State"), chargestate.at((int)battery->chargeState())); | ||
415 | 415 | | |||
416 | m_signalmanager->mapDevice(battery, device.udi()); | 416 | m_signalmanager->mapDevice(battery, device.udi()); | ||
417 | } | 417 | } | ||
418 | 418 | | |||
419 | using namespace Solid; | 419 | using namespace Solid; | ||
▲ Show 20 Lines • Show All 263 Lines • Show Last 20 Lines |