Commit 0fa34f6f authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇
Browse files

[Device Viewer] Add battery percentage bar

parent b6c322ac
......@@ -21,6 +21,8 @@
#include "soldevicetypes.h"
#include <QProgressBar>
#include <kcapacitybar.h>
#include <KFormat>
......@@ -491,8 +493,17 @@ QVListLayout *SolBatteryDevice::infoPanelLayout()
labels << i18n("Battery Type: ")
<< type
<< i18n("Charge Status: ")
<< state;
<< state
<< i18n("Charge Percent: ");
deviceInfoLayout->applyQListToLayout(labels);
QProgressBar *chargePercent = new QProgressBar();
chargePercent->setMaximum(100);
chargePercent->setValue(batdev->chargePercent());
chargePercent->setEnabled(batdev->isPresent());
deviceInfoLayout->addWidget(chargePercent);
return deviceInfoLayout;
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment