Commit e706ec5c authored by David Redondo's avatar David Redondo 🏎

Set sensor prefixes in the base NetworkDevice

We rely on the prefixes on the front page of plasma-systemmonitor; spare every
subclass from having to do it.
parent be88b542
......@@ -13,32 +13,40 @@ NetworkDevice::NetworkDevice(const QString &id, const QString &name)
{
m_networkSensor = new SensorProperty(QStringLiteral("network"), i18nc("@title", "Network Name"), this);
m_networkSensor->setShortName(i18nc("@title Short of Network Name", "Name"));
m_networkSensor->setPrefix(name);
m_signalSensor = new SensorProperty(QStringLiteral("signal"), i18nc("@title", "Signal Strength"), this);
m_signalSensor->setShortName(i18nc("@title Short of Signal Strength", "Signal"));
m_signalSensor->setUnit(KSysGuard::UnitPercent);
m_signalSensor->setMin(0);
m_signalSensor->setMax(100);
m_signalSensor->setPrefix(name);
m_ipv4Sensor = new SensorProperty(QStringLiteral("ipv4address"), i18nc("@title", "IPv4 Address"), this);
m_ipv4Sensor->setShortName(i18nc("@title Short of IPv4 Address", "IPv4"));
m_ipv4Sensor->setPrefix(name);
m_ipv6Sensor = new SensorProperty(QStringLiteral("ipv6address"), i18nc("@title", "IPv6 Address"), this);
m_ipv6Sensor->setShortName(i18nc("@title Short of IPv6 Address", "IPv6"));
m_ipv6Sensor->setPrefix(name);
m_downloadSensor = new SensorProperty(QStringLiteral("download"), i18nc("@title", "Download Rate"), this);
m_downloadSensor->setShortName(i18nc("@title Short for Download Rate", "Download"));
m_downloadSensor->setUnit(KSysGuard::UnitByteRate);
m_downloadSensor->setPrefix(name);
m_uploadSensor = new SensorProperty(QStringLiteral("upload"), i18nc("@title", "Upload Rate"), this);
m_uploadSensor->setShortName(i18nc("@title Short for Upload Rate", "Upload"));
m_uploadSensor->setUnit(KSysGuard::UnitByteRate);
m_uploadSensor->setPrefix(name);
m_totalDownloadSensor = new SensorProperty(QStringLiteral("totalDownload"), i18nc("@title", "Total Downloaded"), this);
m_totalDownloadSensor->setShortName(i18nc("@title Short for Total Downloaded", "Downloaded"));
m_totalDownloadSensor->setUnit(KSysGuard::UnitByte);
m_totalDownloadSensor->setPrefix(name);
m_totalUploadSensor = new SensorProperty(QStringLiteral("totalUpload"), i18nc("@title", "Total Uploaded"), this);
m_totalUploadSensor->setShortName(i18nc("@title Short for Total Uploaded", "Uploaded"));
m_totalUploadSensor->setUnit(KSysGuard::UnitByte);
m_totalDownloadSensor->setPrefix(name);
}
Markdown is supported
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